RIP tp::Strings

This commit is contained in:
IlyaShurupov 2024-03-22 14:44:26 +03:00
parent aa53a4addb
commit 893a07e924
90 changed files with 419 additions and 1475 deletions

View file

@ -17,12 +17,12 @@ SUITE(Core) {
integer->val = 10;
printf("%s\n", NDO->toString(integer).read());
printf("%s\n", NDO->toString(integer).c_str());
NDO->save(integer, "tmp.o");
auto savedInt = NDO->load("tmp.o");
printf("%s\n", NDO->toString(savedInt).read());
printf("%s\n", NDO->toString(savedInt).c_str());
CHECK(NDO->compare(integer, savedInt));
CHECK(NDO_CAST(IntObject, savedInt));

View file

@ -13,7 +13,7 @@ SUITE(Parser) {
{
Parser parser;
String stream = "";
std::string stream = "";
auto res = parser.parse(stream);
CHECK(!res.isError);
@ -24,7 +24,7 @@ SUITE(Parser) {
{
Parser parser;
String stream = "var i = true;";
std::string stream = "var i = true;";
auto res = parser.parse(stream);
CHECK(!res.isError);
@ -35,7 +35,7 @@ SUITE(Parser) {
{
Parser parser;
String stream = "var i = true; print (i + 1) * 10;";
std::string stream = "var i = true; print (i + 1) * 10;";
auto res = parser.parse(stream);
CHECK(!res.isError);
@ -51,7 +51,7 @@ SUITE(Parser) {
{
Parser parser;
String stream = "var i = true; print (i + 1) * 10; invalidCharacter ";
std::string stream = "var i = true; print (i + 1) * 10; invalidCharacter ";
auto res = parser.parse(stream);
CHECK(res.isError);

View file

@ -7,6 +7,5 @@ tp::ModuleManifest* objDeps[] = { &obj::gModuleObjects, nullptr };
tp::ModuleManifest objTestModule("ObjectsTests", nullptr, nullptr, objDeps);
#include <UnitTest++/UnitTest++.h>
#include <UnitTest++/TestReporterStdout.h>
int main(int /*argc*/, char** /*argv*/) { return UnitTest::RunAllTests(); }