hoohah, test command line compiles now
authorFred T. Hamster <fred@feistymeow.org>
Sat, 7 Feb 2026 01:44:19 +0000 (20:44 -0500)
committerFred T. Hamster <fred@feistymeow.org>
Sat, 7 Feb 2026 01:44:19 +0000 (20:44 -0500)
and it runs, and seems to yield the appropriate results.  we're on our way now..!

nucleus/library/tests_application/makefile
nucleus/library/tests_application/test_command_line.cpp

index f899f5dbe7b8f037aa5382053d30308916fff40f..d27e52f1568d06a79eb180d1f8c14630274b2ad7 100644 (file)
@@ -15,18 +15,15 @@ TARGETS =    test_command_line.exe \
 #endif
 ##LOCAL_LIBS_USED = basis i_library 
 DEFINITIONS += USE_FEISTY_MEOW_DLLS
-LOCAL_LIBS_USED = unit_test application 
-#configuration filesystem loggers \
-#  mathematics nodes processes structures textual timely structures basis  \
-#loggers 
+LOCAL_LIBS_USED = unit_test application configuration filesystem loggers \
+  mathematics nodes processes structures textual timely structures basis
 
 #VCPP_USE_GUI=t
 #USE_HOOPLE_DLLS=t
 
-#RUN_TARGETS = $(ACTUAL_TARGETS)
+RUN_TARGETS = $(ACTUAL_TARGETS)
 # run every test except test_rendezvous, which waits for a key.
-RUN_TARGETS =    test_command_line.exe \
-
+#RUN_TARGETS =    test_command_line.exe \
 #test_break_signal.exe test_byte_filer.exe 
 #  test_directory.exe test_directory_tree.exe test_filename.exe \
 #  test_huge_file.exe test_ini_configurator.exe test_ini_parser.exe test_logger.exe \
index f3de28170d5593dc3446cfc14d4086fa8d473774..963b7d9dbf408eb3e4a887de2c6bf2c13dfb07a4 100644 (file)
 
 #include <application/application_shell.h>
 #include <application/command_line.h>
+#include <application/hoople_main.h>
 #include <loggers/console_logger.h>
 #include <loggers/critical_events.h>
 #include <loggers/program_wide_logger.h>
 #include <filesystem/filename.h>
 #include <structures/static_memory_gremlin.h>
 #include <structures/string_array.h>
+#include <unit_test/unit_base.h>
 
 using namespace application;
 using namespace basis;
@@ -38,11 +40,11 @@ using namespace loggers;
 using namespace structures;
 //using namespace textual;
 //using namespace timely;
-//using namespace unit_test;
+using namespace unit_test;
 
 #define LOG(s) CLASS_EMERGENCY_LOG(program_wide_logger::get(), s)
 
-class test_command_line : public application_shell
+class test_command_line : virtual public unit_base, virtual public application_shell
 {
 public:
   test_command_line() : application_shell() {}
@@ -88,43 +90,43 @@ int test_command_line::execute()
 //log(a_sprintf("parm 0: type=%d text=%s", spumeco.type(), spumeco.text().s()));
     if (spumeco.type() != command_parameter::VALUE)
       non_continuable_error(class_name(), "test 2", "spumeco is wrong type");
-    if (spumeco.text() != "spumeco")
+    if (spumeco.text() != astring("spumeco"))
       non_continuable_error(class_name(), "test 2", "spumeco is erroneous");
 
     command_parameter gflag = cl2.get(1);
     if (gflag.type() != command_parameter::CHAR_FLAG)
       non_continuable_error(class_name(), "test 2", "G flag had wrong type");
-    if (gflag.text() != "g")
+    if (gflag.text() != astring("g"))
       non_continuable_error(class_name(), "test 2", "G flag had wrong value");
 
     command_parameter qflag = cl2.get(2);
     if (qflag.type() != command_parameter::CHAR_FLAG)
       non_continuable_error(class_name(), "test 2", "Q flag had wrong type");
-    if (qflag.text() != "q")
+    if (qflag.text() != astring("q"))
       non_continuable_error(class_name(), "test 2", "Q flag had wrong value");
 
     command_parameter fleemflag = cl2.get(3);
     if (fleemflag.type() != command_parameter::STRING_FLAG)
       non_continuable_error(class_name(), "test 2", "fleem flag had wrong type");
-    if (fleemflag.text() != "fleem")
+    if (fleemflag.text() != astring("fleem"))
       non_continuable_error(class_name(), "test 2", "fleem flag had wrong value");
 
     command_parameter rflag = cl2.get(4);
     if (rflag.type() != command_parameter::CHAR_FLAG)
       non_continuable_error(class_name(), "test 2", "R flag had wrong type");
-    if (rflag.text() != "r")
+    if (rflag.text() != astring("r"))
       non_continuable_error(class_name(), "test 2", "R flag had wrong value");
 
     command_parameter spugval = cl2.get(5);
     if (spugval.type() != command_parameter::VALUE)
       non_continuable_error(class_name(), "test 2", "spugval had wrong type");
-    if (spugval.text() != "spugnats.txt")
+    if (spugval.text() != astring("spugnats.txt"))
       non_continuable_error(class_name(), "test 2", "spugval had wrong value");
 
     command_parameter crumval = cl2.get(6);
     if (crumval.type() != command_parameter::VALUE)
       non_continuable_error(class_name(), "test 2", "crumval had wrong type");
-    if (crumval.text() != "crumbole.h")
+    if (crumval.text() != astring("crumbole.h"))
       non_continuable_error(class_name(), "test 2", "crumval had wrong value");
 
     command_parameter bogus = cl2.get(7);
@@ -134,7 +136,7 @@ int test_command_line::execute()
 
 //more tests!
 
-  guards::alert_message("command_line:: works for those functions tested.");
+  critical_events::alert_message("command_line:: works for those functions tested.");
   return 0;
 }