nb::Error objects now working
This commit is contained in:
@@ -3,9 +3,8 @@
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include "Errors.hpp"
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include "TypeTraits.hpp"
|
||||
#include "Utils.hpp"
|
||||
|
||||
using namespace nb;
|
||||
|
||||
@@ -36,12 +35,6 @@ const ErrorCodeMap TestError::ErrorMessages{
|
||||
|
||||
|
||||
TEST(ErrorTest, Test) {
|
||||
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"
|
||||
);
|
||||
auto err = TestError(0, TestError(1, TestError(2, TestError(3, TestError(2)))));
|
||||
ASSERT_STREQ(err.what(), "Hey!\n Trace: How\n Trace: You\n Trace: Doin\n Trace: You\n");
|
||||
}
|
||||
Reference in New Issue
Block a user