From 90a29b23a138585af1f8dec5b6aafa44bd9bd50a Mon Sep 17 00:00:00 2001 From: "Fred T. Hamster" Date: Wed, 18 Feb 2026 16:07:33 -0500 Subject: [PATCH] getting the tests under control some more 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 | 2 +- .../tests_processes/input_data_state_machine.txt | 4 ++-- nucleus/library/tests_processes/test_state_machine.cpp | 10 +++++++--- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/nucleus/library/processes/state_machine.cpp b/nucleus/library/processes/state_machine.cpp index e2f7150d..07253f3e 100644 --- a/nucleus/library/processes/state_machine.cpp +++ b/nucleus/library/processes/state_machine.cpp @@ -29,7 +29,7 @@ namespace processes { ////////////// -//#define DEBUG_STATE_MACHINE +#define DEBUG_STATE_MACHINE // uncomment if you want the debugging version. //hmmm: implement logging... diff --git a/nucleus/library/tests_processes/input_data_state_machine.txt b/nucleus/library/tests_processes/input_data_state_machine.txt index 08608c5e..5d1b3214 100644 --- a/nucleus/library/tests_processes/input_data_state_machine.txt +++ b/nucleus/library/tests_processes/input_data_state_machine.txt @@ -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 diff --git a/nucleus/library/tests_processes/test_state_machine.cpp b/nucleus/library/tests_processes/test_state_machine.cpp index 27a60edb..f9991600 100644 --- a/nucleus/library/tests_processes/test_state_machine.cpp +++ b/nucleus/library/tests_processes/test_state_machine.cpp @@ -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(); -- 2.43.0