Use GTest; resolves #34 (#90)

This commit is contained in:
liuzicheng1987
2024-04-22 23:12:35 +02:00
committed by GitHub
parent bf1c9bea36
commit 325d163196
682 changed files with 1123 additions and 4799 deletions
+4 -11
View File
@@ -6,22 +6,15 @@
#include <string>
#include <vector>
#include "test_box.hpp"
#include <gtest/gtest.h>
namespace test_box2 {
void test() {
std::cout << std::source_location::current().function_name() << std::endl;
TEST(json, test_box2) {
auto ptr = std::make_unique<std::string>("Hello World!");
const rfl::Result<rfl::Box<std::string>> box =
rfl::make_box<std::string>(std::move(ptr));
if (box) {
std::cout << "OK" << std::endl << std::endl;
} else {
std::cout << "Expected the result to be successful." << std::endl
<< std::endl;
}
}
ASSERT_TRUE(box && true);
}
} // namespace test_box2