]> Kevux Git Server - fll/commitdiff
Feature: Add F_test status codes.
authorKevin Day <Kevin@kevux.org>
Sat, 8 Mar 2025 05:30:20 +0000 (23:30 -0600)
committerKevin Day <Kevin@kevux.org>
Sat, 8 Mar 2025 05:30:20 +0000 (23:30 -0600)
These codes are notably useful during the unit and runtime testing.

level_0/f_status/c/status.h
level_0/f_status_string/c/status_string.c
level_0/f_status_string/c/status_string.h
level_0/f_status_string/tests/unit/c/test-status_string-to.c
level_1/fl_status_string/c/status_string.c
level_1/fl_status_string/tests/unit/c/test-status_string-from.c

index e129cb8b1a710483f630393420f41c22c1f1f1ad..70aecbfd07327dcf5674dd4362edc81bd24a45dc 100644 (file)
@@ -519,6 +519,8 @@ extern "C" {
     F_syntax_not,
     F_terminate,
     F_terminate_not,
+    F_test,
+    F_test_not,
     F_thread,
     F_thread_not,
     F_time,
index a0955ed0c35526db004caee464a41d2083ec6479..96af3cb5bc86ef471fe6fda51d153c3edcdd06e8 100644 (file)
@@ -383,6 +383,8 @@ extern "C" {
   const f_string_static_t f_status_syntax_not_s = macro_f_string_static_t_initialize_1(F_status_syntax_not_s, 0, F_status_syntax_not_s_length);
   const f_string_static_t f_status_terminate_s = macro_f_string_static_t_initialize_1(F_status_terminate_s, 0, F_status_terminate_s_length);
   const f_string_static_t f_status_terminate_not_s = macro_f_string_static_t_initialize_1(F_status_terminate_not_s, 0, F_status_terminate_not_s_length);
+  const f_string_static_t f_status_test_s = macro_f_string_static_t_initialize_1(F_status_test_s, 0, F_status_test_s_length);
+  const f_string_static_t f_status_test_not_s = macro_f_string_static_t_initialize_1(F_status_test_not_s, 0, F_status_test_not_s_length);
   const f_string_static_t f_status_thread_s = macro_f_string_static_t_initialize_1(F_status_thread_s, 0, F_status_thread_s_length);
   const f_string_static_t f_status_thread_not_s = macro_f_string_static_t_initialize_1(F_status_thread_not_s, 0, F_status_thread_not_s_length);
   const f_string_static_t f_status_time_s = macro_f_string_static_t_initialize_1(F_status_time_s, 0, F_status_time_s_length);
@@ -2594,6 +2596,16 @@ extern "C" {
 
         break;
 
+      case F_test:
+        *name = f_status_test_s;
+
+        break;
+
+      case F_test_not:
+        *name = f_status_test_not_s;
+
+        break;
+
       case F_thread:
         *name = f_status_thread_s;
 
index 90c3db972c2121dfc37fba2936c290b47c56e3fb..87f62c7d41db2896643cc892047c40448ce49c37 100644 (file)
@@ -543,6 +543,8 @@ extern "C" {
   #define F_status_syntax_not_s            "F_syntax_not"
   #define F_status_terminate_s             "F_terminate"
   #define F_status_terminate_not_s         "F_terminate_not"
+  #define F_status_test_s                  "F_test"
+  #define F_status_test_not_s              "F_test_not"
   #define F_status_thread_s                "F_thread"
   #define F_status_thread_not_s            "F_thread_not"
   #define F_status_time_s                  "F_time"
@@ -899,6 +901,8 @@ extern "C" {
   #define F_status_syntax_not_s_length            12
   #define F_status_terminate_s_length             11
   #define F_status_terminate_not_s_length         15
+  #define F_status_test_s_length                  6
+  #define F_status_test_not_s_length              10
   #define F_status_thread_s_length                8
   #define F_status_thread_not_s_length            12
   #define F_status_time_s_length                  6
@@ -1249,6 +1253,8 @@ extern "C" {
   extern const f_string_static_t f_status_syntax_not_s;
   extern const f_string_static_t f_status_terminate_s;
   extern const f_string_static_t f_status_terminate_not_s;
+  extern const f_string_static_t f_status_test_s;
+  extern const f_string_static_t f_status_test_not_s;
   extern const f_string_static_t f_status_thread_s;
   extern const f_string_static_t f_status_thread_not_s;
   extern const f_string_static_t f_status_time_s;
index 95a7081e9952475f1bf76230ffcabbc51db50a92..15c93e025087ae7e13d1fcf44d519e66b571395f 100644 (file)
@@ -413,6 +413,8 @@ void test__f_status_string_to__works(void **state) {
     F_syntax_not,
     F_terminate,
     F_terminate_not,
+    F_test,
+    F_test_not,
     F_thread,
     F_thread_not,
     F_time,
@@ -1070,6 +1072,8 @@ void test__f_status_string_to__works(void **state) {
     f_status_syntax_not_s,
     f_status_terminate_s,
     f_status_terminate_not_s,
+    f_status_test_s,
+    f_status_test_not_s,
     f_status_thread_s,
     f_status_thread_not_s,
     f_status_time_s,
@@ -1343,7 +1347,7 @@ void test__f_status_string_to__works(void **state) {
     f_status_status_code_last_s,
   };
 
-  for (uint16_t i = 0; i < 650; ++i) {
+  for (uint16_t i = 0; i < 652; ++i) {
 
     f_string_static_t result = f_string_static_t_initialize;
 
index cdc8b65b6f3eabcb96bfcd5836a28688192a8c36..42f9e5b2cffa538d055d8389d2e126b99bd2954f 100644 (file)
@@ -2319,6 +2319,18 @@ extern "C" {
       return F_okay;
     }
 
+    if (f_compare_dynamic(name, f_status_test_s) == F_equal_to) {
+      *code = F_test;
+
+      return F_okay;
+    }
+
+    if (f_compare_dynamic(name, f_status_test_not_s) == F_equal_to) {
+      *code = F_test_not;
+
+      return F_okay;
+    }
+
     if (f_compare_dynamic(name, f_status_thread_s) == F_equal_to) {
       *code = F_thread;
 
index dc8132617c89ec99af1a526444b9d39adaa5ca82..939ed2359725d2c25ae1600c885ec967a0fbf421 100644 (file)
@@ -429,6 +429,8 @@ void test__fl_status_string_from__works(void **state) {
     F_syntax_not,
     F_terminate,
     F_terminate_not,
+    F_test,
+    F_test_not,
     F_thread,
     F_thread_not,
     F_time,
@@ -1086,6 +1088,8 @@ void test__fl_status_string_from__works(void **state) {
     f_status_syntax_not_s,
     f_status_terminate_s,
     f_status_terminate_not_s,
+    f_status_test_s,
+    f_status_test_not_s,
     f_status_thread_s,
     f_status_thread_not_s,
     f_status_time_s,
@@ -1359,7 +1363,7 @@ void test__fl_status_string_from__works(void **state) {
     f_status_status_code_last_s,
   };
 
-  for (uint16_t i = 0; i < 650; ++i) {
+  for (uint16_t i = 0; i < 652; ++i) {
 
     f_status_t result = F_okay;