Man im so tired This is wrong but I can taste it, im close
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
#define CODE_ERROR_LOCATIONS
|
||||
|
||||
#include "Errors.hpp"
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "Errors.hpp"
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include "TypeTraits.hpp"
|
||||
|
||||
using namespace nb;
|
||||
|
||||
@@ -33,5 +36,12 @@ const ErrorCodeMap TestError::ErrorMessages{
|
||||
|
||||
|
||||
TEST(ErrorTest, Test) {
|
||||
std::cout << TestError(0, TestError(1, TestError(2))).what();
|
||||
auto err = TestError(0, TestError(1));
|
||||
nb::stream(std::cout,
|
||||
"len string: ", err.what_str().length(), "\n",
|
||||
"len wstring: ", err.what_str<std::wstring>().length(), "\n"
|
||||
);
|
||||
nb::stream(std::wcout,
|
||||
err.what_str<std::wstring>(), L"\n"
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user