Dropping smartstreams (not fully cleared) and added get_pid()

This commit is contained in:
NaifBanana
2026-01-18 18:24:26 -06:00
parent c4ee778040
commit 847bf3a078
9 changed files with 114 additions and 296 deletions
+1 -1
View File
@@ -2,4 +2,4 @@ cmake_minimum_required(VERSION 3.26.0)
project(gtest_Graphics VERSION 0.1.0 LANGUAGES C CXX)
add_subdirectory(./ErrorTest)
add_subdirectory(./SmartStreamTest)
add_subdirectory(./ProcessTest)
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.26.0)
project(gtest_Graphics VERSION 0.1.0 LANGUAGES C CXX)
add_executable(SmartStreamTest main.cpp)
target_link_libraries(SmartStreamTest NBCore)
add_executable(ProcessTest main.cpp)
target_link_libraries(ProcessTest NBCore)
+17
View File
@@ -0,0 +1,17 @@
#define CODE_ERROR_LOCATIONS
#include <iostream>
#include "Processes.hpp"
#include <Windows.h>
int main() {
std::cout << "nb::get_pid() -> " << nb::get_pid() << std::endl;
#ifdef _TARGET_WINDOWS
std::cout << "GetCurrentProcessId() -> " << GetCurrentProcessId() << std::endl;
#endif // _TARGET_WINDOWS
return 0;
}
@@ -1,28 +0,0 @@
#include <exception>
#include <iostream>
#include <fstream>
#include "SmartStreams.hpp"
int main() {
nb::SmartStream<decltype(std::cout), nb::SmartStreamFormatter> stout(std::cout);
stout << nb::SmartText{5} << "\ngoop\n";
/* nb::SmartText test(100);
std::cout << test;
std::ofstream file;
file.open("test.txt");
if (file.is_open()) {
file << test;
}
file.close(); */
return 0;
}