From: Fred T. Hamster Date: Sun, 8 Feb 2026 18:51:03 +0000 (-0500) Subject: added finalization noise after test X-Git-Tag: 2.140.190^2~21 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=8de93c3efd16df9ad27a0ef4910500ffa4127ca4;p=feisty_meow.git added finalization noise after test --- diff --git a/nucleus/library/tests_configuration/test_ini_configurator.cpp b/nucleus/library/tests_configuration/test_ini_configurator.cpp index ce92bc91..864efd14 100644 --- a/nucleus/library/tests_configuration/test_ini_configurator.cpp +++ b/nucleus/library/tests_configuration/test_ini_configurator.cpp @@ -190,8 +190,8 @@ LOG(astring("exe directory is currently: ") + application_configuration::applica } } - astring to_print("ini_configurator:: works for those functions tested."); - critical_events::alert_message(to_print.s()); + critical_events::alert_message(astring(static_class_name()) + ": works for those functions tested."); + return 0; } diff --git a/nucleus/library/tests_configuration/test_ini_parser.cpp b/nucleus/library/tests_configuration/test_ini_parser.cpp index b25516d5..32175447 100644 --- a/nucleus/library/tests_configuration/test_ini_parser.cpp +++ b/nucleus/library/tests_configuration/test_ini_parser.cpp @@ -12,29 +12,28 @@ * Please send any updates to: fred@gruntose.com * \*****************************************************************************/ +#include +#include +#include #include #include -#include -#include -#include +#include #include #include #include #include -#include #include +#include #include #include using namespace application; using namespace basis; using namespace configuration; -//using namespace mathematics; -//using namespace filesystem; +using namespace filesystem; using namespace loggers; using namespace structures; using namespace textual; -//using namespace timely; using namespace unit_test; #define LOG(s) CLASS_EMERGENCY_LOG(program_wide_logger::get(), s) @@ -50,7 +49,7 @@ noodles=fungus\n\ dora=34\n\ "; -//#define READ_FILE_TEST +//#define RUN_READ_FILE_TEST // uncomment to read in a file and parse it. class test_ini_parser : virtual public unit_base, virtual public application_shell @@ -63,6 +62,7 @@ public: int test_ini_parser::execute() { + FUNCDEF("execute") program_wide_logger::get().eol(parser_bits::NO_ENDING); ini_parser par(INI_FILE_1); @@ -77,11 +77,11 @@ int test_ini_parser::execute() //LOG(astring("twerf section is: ") + twerf.text_form()); if (!twerf.find("noodles")) deadly_error(class_name(), "get_section 1", "item #1 was not found"); - if (*twerf.find("noodles") != "fungus") + if (*twerf.find("noodles") != astring("fungus")) deadly_error(class_name(), "get_section 1", "item #1 found is incorrect"); if (!twerf.find("dora")) deadly_error(class_name(), "get_section 1", "item #2 was not found"); - if (*twerf.find("dora") != "34") + if (*twerf.find("dora") != astring("34")) deadly_error(class_name(), "get_section 1", "item #2 found is incorrect"); string_table bork; @@ -89,15 +89,15 @@ int test_ini_parser::execute() deadly_error(class_name(), "get_section 2", "bork section was not found"); if (!bork.find("norple")) deadly_error(class_name(), "get_section 2", "item #1 was not found"); - if (*bork.find("norple") != "1") + if (*bork.find("norple") != astring("1")) deadly_error(class_name(), "get_section 2", "item #1 found is incorrect"); if (!bork.find("train")) deadly_error(class_name(), "get_section 2", "item #2 was not found"); - if (*bork.find("train") != "12.5") + if (*bork.find("train") != astring("12.5")) deadly_error(class_name(), "get_section 2", "item #2 found is incorrect"); if (!bork.find("singhy")) deadly_error(class_name(), "get_section 2", "item #3 was not found"); - if (*bork.find("singhy") != "9") + if (*bork.find("singhy") != astring("9")) deadly_error(class_name(), "get_section 2", "item #3 found is incorrect"); astring new_ini; @@ -106,7 +106,10 @@ int test_ini_parser::execute() program_wide_logger::get().eol(parser_bits::CRLF_AT_END); LOG(""); -#ifdef READ_FILE_TEST +//hmmm: this could be a useful additional feature if it weren't a hard-coded filename; +// make this test take command line parameters which are interpreted as files to process here. +// loop over all of them and do the test. +#ifdef RUN_READ_FILE_TEST byte_filer input("c:/home/fungal.lld", "rb"); int len = input.length(); LOG(a_sprintf("fungal len is %d", len)); @@ -121,7 +124,7 @@ int test_ini_parser::execute() LOG(dump2); #endif - critical_events::alert_message("ini_parser:: works for those functions tested.\n"); + critical_events::alert_message(astring(class_name()) + ": works for those functions tested."); return 0; } diff --git a/nucleus/library/tests_configuration/test_section_manager.cpp b/nucleus/library/tests_configuration/test_section_manager.cpp index 72acd84e..7dff3801 100644 --- a/nucleus/library/tests_configuration/test_section_manager.cpp +++ b/nucleus/library/tests_configuration/test_section_manager.cpp @@ -118,7 +118,9 @@ int test_section_manager::execute() } { // astring TEST = "Second Test"; - } + } + + critical_events::alert_message(astring(class_name()) + ": works for those functions tested."); return final_report(); } diff --git a/nucleus/library/tests_configuration/test_tokenizer.cpp b/nucleus/library/tests_configuration/test_tokenizer.cpp index 62b5ea8f..50da5dda 100644 --- a/nucleus/library/tests_configuration/test_tokenizer.cpp +++ b/nucleus/library/tests_configuration/test_tokenizer.cpp @@ -274,7 +274,9 @@ LOG(a_sprintf("gorp has %d fields, jed has %d fields", gorp.symbols(), jed.symbo TEST + "value for punzola missing or invalid"); ASSERT_EQUAL(jed.find("mensch"), astring("racer X"), TEST + "value for mensch missing or invalid"); - } + } + + critical_events::alert_message(astring(class_name()) + ": works for those functions tested."); return final_report(); }