test registry config is in now
authorFred T. Hamster <fred@feistymeow.org>
Sun, 8 Feb 2026 19:23:08 +0000 (14:23 -0500)
committerFred T. Hamster <fred@feistymeow.org>
Sun, 8 Feb 2026 19:23:08 +0000 (14:23 -0500)
not sure it does anything; it's intended for working on windows where there's a global system registry (also known as an operating system single point of failure).

nucleus/library/tests_application/makefile
nucleus/library/tests_application/test_break_signal.cpp
nucleus/library/tests_application/test_path_configuration.cpp
nucleus/library/tests_application/test_registry_configurator.cpp
scripts/buildor/upgrade_hoople_to_feistymeow.sh

index 52e2f2ef40b29d55bc0541211d770b854709d482..99d375365937a4276ccef39dd3b3bdd5a3a031dc 100644 (file)
@@ -4,10 +4,10 @@ include cpp/variables.def
 
 PROJECT = tests_application
 TYPE = test
-TARGETS = test_break_signal.exe test_command_line.exe test_path_configuration.exe
-
+TARGETS = test_break_signal.exe test_command_line.exe test_path_configuration.exe \
+  test_registry_configurator.exe 
 #  test_logger.exe \
-#  test_registry_configurator.exe test_redirection.exe \
+#  test_redirection.exe \
 #  test_rendezvous.exe test_system_values.exe test_timer_driver.exe
 #ifeq "$(findstring EMBEDDED_BUILD, $(DEFINITIONS))" ""
 #  TARGETS += test_shared_memory.exe 
index 1582c1232373663c1dd38aff72129960f1bbb86d..00e8ef9bab66d0ec3ee7eec2f2192fcbd6702458 100644 (file)
@@ -89,5 +89,3 @@ int test_break_signal::execute()
 
 HOOPLE_MAIN(test_break_signal, )
 
-#undef static_class_name
-
index 93b40feeac35b0a0411cb03b3ac6164bc3894f00..a0ce8c9af2e8ebab61f9ec63abf5cefa14e87b11 100644 (file)
@@ -50,6 +50,9 @@ int main(int argc, char *argv[])
   LOG(astring("app dir is: ") + app_dir);
 
   critical_events::alert_message(astring(static_class_name()) + ": works for those functions tested.");
+
   return 0;
 }
 
+#undef static_class_name
+
index 45f2989d993068edafef51be498bebb1444e4816..947bddd35792e4c59e92ed25c8d3c55e6a71fd71 100644 (file)
@@ -17,35 +17,44 @@ const int test_iterations = 10;
 //#define DEBUG_REGISTRY_CONFIGURATOR_TEST
   // uncomment for debugging version.
 
-#include <basis/function.h>
+#include <application/hoople_main.h>
+#include <basis/functions.h>
 #include <basis/guards.h>
-#include <basis/istring.h>
-#include <data_struct/string_table.h>
-#include <data_struct/static_memory_gremlin.h>
+#include <basis/astring.h>
+#include <structures/string_table.h>
+#include <structures/static_memory_gremlin.h>
 #include <geometric/rectangle.h>
 #include <geometric/screen_rectangle.h>
 #include <loggers/console_logger.h>
-#include <mathematics/float_plus.h>
-#include <opsystem/path_configuration.h>
-#include <opsystem/registry_config.h>
-#include <textual/byte_format.h>
+#include <mathematics/double_plus.h>
+#include <configuration/application_configuration.h>
+#include <application/registry_config.h>
+#include <textual/byte_formatter.h>
 
 #include <stdio.h>
 
 HOOPLE_STARTUP_CODE;
 
+using namespace basis;
+using namespace configuration;
 using namespace geometric;
+using namespace loggers;
+using namespace mathematics;
+//using namespace textual;
 
-typedef float_plus<double> frunkle;
+typedef double_plus frunkle;
 
 #define WHERE __WHERE__.s()
 
+//hmmm: ugly old main() without using the hoople machinery.  ack.
+astring static_class_name() { return "test_registry_configurator"; }
+
 const registry_configurator::registry_hives THE_HIVE
     = registry_configurator::hkey_current_user;
 
-const istring REGISTRY_SECTION = "boobo/tahini/nunkshus";
+const astring REGISTRY_SECTION = "boobo/tahini/nunkshus";
 
-#define LOG(s) program_wide_logger().log(s)
+#define LOG(s) program_wide_logger::get().log(s)
 
 int main(int formal(argc), char *formal(argv)[])
 {
@@ -73,7 +82,7 @@ console_logger out;
       screen_rectangle default_rectangle(10, 289, 388, 191);
       ini.delete_entry(REGISTRY_SECTION, "window_size");
       screen_rectangle win_size;
-      istring tmp = ini.load(REGISTRY_SECTION, "window_size",
+      astring tmp = ini.load(REGISTRY_SECTION, "window_size",
           default_rectangle.text_form());
       win_size.from_text(tmp);
       if (win_size != default_rectangle)
@@ -92,17 +101,17 @@ console_logger out;
     {
       // second test set.
       const char *TEST_NAME = "second test: string";
-      istring junk("this is a junky string to be stored as bytes....");
+      astring junk("this is a junky string to be stored as bytes....");
       byte_array to_store(junk.length() + 1, (byte *)junk.observe());
-      istring as_bytes;
-      byte_format::bytes_to_string(to_store, as_bytes);
+      astring as_bytes;
+      byte_formatter::bytes_to_string(to_store, as_bytes);
       ini.store(REGISTRY_SECTION + "/test_of_byte_store", "test1", as_bytes);
-      istring blort = "blort_fest!";
-      istring rettle = ini.load(REGISTRY_SECTION + "/test_of_byte_store",
+      astring blort = "blort_fest!";
+      astring rettle = ini.load(REGISTRY_SECTION + "/test_of_byte_store",
           "test1", blort);
       byte_array found_byte;
-      byte_format::string_to_bytes(rettle, found_byte);
-      istring found_junk((const char *)found_byte.observe());
+      byte_formatter::string_to_bytes(rettle, found_byte);
+      astring found_junk((const char *)found_byte.observe());
       if (rettle == blort)
         deadly_error(REGISTRY_SECTION, TEST_NAME,
            "registry_configurator load failed: default was used");
@@ -114,9 +123,9 @@ console_logger out;
       // third test set.
       const char *TEST_NAME = "third test: frunkle";
       frunkle def_frunkle(3.14159265358);
-      istring def_text(istring::SPRINTF, "%f", def_frunkle.value());
+      astring def_text(astring::SPRINTF, "%f", def_frunkle.value());
       ini.store(REGISTRY_SECTION, TEST_NAME, def_text);
-      istring found_string = ini.load(REGISTRY_SECTION, TEST_NAME, "9949494.3");
+      astring found_string = ini.load(REGISTRY_SECTION, TEST_NAME, "9949494.3");
       frunkle found_frunkle = found_string.convert(0.0);
       if (found_frunkle == frunkle(9949494.3))
         deadly_error(REGISTRY_SECTION, TEST_NAME, 
@@ -129,9 +138,9 @@ console_logger out;
       // fourth test set.
       const char *TEST_NAME = "fourth test: frunkle";
       frunkle def_frunkle(1487335673.1415926535834985987);
-      istring def_text(istring::SPRINTF, "%f", def_frunkle.value());
+      astring def_text(astring::SPRINTF, "%f", def_frunkle.value());
       ini.store(REGISTRY_SECTION + "/test", "frunkle_test", def_text);
-      istring found_string = ini.load(REGISTRY_SECTION + "/test",
+      astring found_string = ini.load(REGISTRY_SECTION + "/test",
           "frunkle_test", "9949494.3");
       frunkle found_frunkle = found_string.convert(0.0);
       if (found_frunkle == frunkle(9949494.3))
@@ -144,15 +153,15 @@ console_logger out;
     {
       // fifth test set.
       const char *TEST_NAME = "fifth test: bytes";
-      istring urp("urp");
-      istring junk("this is a junky string to be stored as bytes....");
+      astring urp("urp");
+      astring junk("this is a junky string to be stored as bytes....");
       byte_array default_bytes(urp.length() + 1, (byte *)urp.observe());
-      istring defbytes_string;
-      byte_format::bytes_to_string(default_bytes, defbytes_string);
+      astring defbytes_string;
+      byte_formatter::bytes_to_string(default_bytes, defbytes_string);
       byte_array found;
-      istring tmp = ini.load(REGISTRY_SECTION + "/test_of_byte_store", "test1", defbytes_string);
-      byte_format::string_to_bytes(tmp, found);
-      istring string_found = (char *)found.observe();
+      astring tmp = ini.load(REGISTRY_SECTION + "/test_of_byte_store", "test1", defbytes_string);
+      byte_formatter::string_to_bytes(tmp, found);
+      astring string_found = (char *)found.observe();
       if (string_found == urp)
         deadly_error(REGISTRY_SECTION, TEST_NAME,
             "registry_configurator load_bytes failed: default was used");
@@ -167,13 +176,13 @@ console_logger out;
       // sixth test set.
       const char *TEST_NAME = "sixth test: blank string";
       ini.delete_entry(REGISTRY_SECTION + "/test_of_blank_string", "test1");
-      istring blank("");
-      istring fund = ini.load(REGISTRY_SECTION + "/test_of_blank_string", "test1", blank);
+      astring blank("");
+      astring fund = ini.load(REGISTRY_SECTION + "/test_of_blank_string", "test1", blank);
       if (fund != blank)
         deadly_error(REGISTRY_SECTION, TEST_NAME, "registry_configurator load string "
                "with blank default failed: didn't return blank");
       ini.delete_entry(REGISTRY_SECTION + "/test_of_blank_string", "test1");
-      istring non_blank("blinkblankblunk");
+      astring non_blank("blinkblankblunk");
       fund = ini.load(REGISTRY_SECTION + "/test_of_blank_string", "test1", non_blank);
       if (fund != non_blank)
         deadly_error(REGISTRY_SECTION, TEST_NAME, "registry_configurator load string "
@@ -193,7 +202,7 @@ console_logger out;
       if (!worked)
         deadly_error(REGISTRY_SECTION, TEST_NAME, "failed to get sample section (environment)");
 //to see if it worked...
-//      LOG(istring("got section:\n") + sect.text_form());
+//      LOG(astring("got section:\n") + sect.text_form());
     }
     {
       // 8th set, test put_section.
@@ -226,8 +235,8 @@ console_logger out;
 
 #endif // win32.
 
-  istring to_print("registry_configurator:: works for those functions tested.");
-  guards::alert_message(to_print.s());
+  critical_events::alert_message(astring(static_class_name()) + ": works for those functions tested.");
+
   return 0;
 }
 
index fa06ce917720b5275c843079b93301264b38d485..e3465a8ffc31669b83ec4fda06d3a5ecf4f1e88d 100644 (file)
@@ -155,6 +155,7 @@ standards and usages."
     | sed -e 's/guards::alert_message/critical_events::alert_message/g' \
     | sed -e 's/^#include <mathematics\/float_plus.h> *$/#include <mathematics\/double_plus.h>/g' \
     | sed -e 's/^#include <opsystem\/ini_parser.h> *$/#include <configuration\/ini_parser.h>/g' \
+    | sed -e 's/^#include <opsystem\/registry_config.h> *$/#include <application\/registry_config.h>/g' \
     | sed -e 's/log_base::NO_ENDING/parser_bits::NO_ENDING/g' \
     | sed -e 's/log_base::CRLF_AT_END/parser_bits::CRLF_AT_END/g' \
     | sed -e 's/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/[\/]*/\/\/\/\/\/\/\/\/\/\/\/\/\/\//g' \