]> feistymeow.org Git - feisty_meow.git/commitdiff
getting the tests under control some more
authorFred T. Hamster <fred@feistymeow.org>
Wed, 18 Feb 2026 21:07:33 +0000 (16:07 -0500)
committerFred T. Hamster <fred@feistymeow.org>
Wed, 18 Feb 2026 21:07:33 +0000 (16:07 -0500)
state machine tester compiles now, and knows to use a local input file if no parms are provided,
but it also totally fails on the input, rejecting every line (even when they should have been accepted).
but it compiles!...

nucleus/library/processes/state_machine.cpp
nucleus/library/tests_processes/input_data_state_machine.txt
nucleus/library/tests_processes/test_state_machine.cpp

index e2f7150dc4809960361a5c36c37cb923591e0a8b..07253f3eb6c02ba023e481bda9bc980ad735a00d 100644 (file)
@@ -29,7 +29,7 @@ namespace processes {
 
 //////////////
 
-//#define DEBUG_STATE_MACHINE
+#define DEBUG_STATE_MACHINE
   // uncomment if you want the debugging version.
 
 //hmmm: implement logging...
index 08608c5e06b0e1287024f361294aea3487e3b5b9..5d1b321458c1da14bf7a943b731868937a40fee4 100644 (file)
@@ -8,13 +8,13 @@ common_outcomes.h
 contracts.h
 definitions.h
 enhance_cpp.h
-environment.cpp
+environment.c
 environment.h
 functions.h
 guards.cpp
 guards.h
 makefile
-mutex.cpp
+mutex.o
 mutex.h
 outcome.h
 utf_conversion.cpp
index 27a60edb39c93d79090b48e7ce6294c6f53ec6b3..f999160020707331381ccc3dce0366413e1a74f3 100644 (file)
@@ -146,11 +146,15 @@ int test_state_machine::execute()
   transition_map recog;
   setup_state_machine(recog);
 
+  astring filename;
   if (application::_global_argc < 2) {
-    print_instructions();
-    return 1;
+    // automating for unit test with a simple input file.
+    filename = "./input_data_state_machine.txt";
+///    print_instructions();
+///    return 1;
+  } else {
+    filename = astring(application::_global_argv[1]);
   }
-  astring filename = astring(application::_global_argv[1]);
 ///  int indy = filename.find(' ');
   if (!filename) {
     print_instructions();