Skip to content

WriteFmt

Description

Write formatted output to the standard output stream (FileStdout()). This is a convenience macro calling FWriteFmt with FileStdout().

Parameters

Name Direction Description
fmtstr in Format string with {} placeholders.

Success

Placeholders in fmtstr are replaced by the passed arguments, and the resulting formatted string is written to standard output.

Failure

Failure might occur during memory allocation for the temporary string or during the write operation; the backend may also log an error message.

Usage example (Cross-references)

Usage examples (Cross-references)
    bool test_deadend(TestFunction test_func, bool expect_failure) {
        if (!test_func) {
            WriteFmt("[ERROR] test_deadend: NULL test function provided\n");
            return false;
        }
            bool returned = test_func();
            if (expect_failure) {
                WriteFmt("    [Unexpected success: Test completed without abort]\n");
                test_result = false;    // Expected abort, got clean return.
            } else {
                test_result = false;    // Expected abort, got clean return.
            } else {
                WriteFmt("    [Success: Test completed normally]\n");
                test_result = returned; // Caller's bool is the verdict.
            }
            // Re-entry via longjmp: the test triggered LOG_FATAL.
            if (expect_failure) {
                WriteFmt("    [Expected failure: Test aborted as expected]\n");
                test_result = true; // Abort was the contract.
            } else {
                test_result = true; // Abort was the contract.
            } else {
                WriteFmt("    [Unexpected failure: Test aborted unexpectedly]\n");
                test_result = false;
            }
    int simple_test_driver(TestFunction *tests, int count) {
        if (!tests) {
            WriteFmt("[ERROR] simple_test_driver: NULL tests array provided\n");
            return count; // All tests failed
        }
        // Run all tests and accumulate results
        for (int i = 0; i < count; i++) {
            WriteFmt("[TEST {}/{}] ", i + 1, count);
            bool result = tests[i]();
            if (result) {
            bool result = tests[i]();
            if (result) {
                WriteFmt("[PASS]\n\n");
                passed++;
            } else {
                passed++;
            } else {
                WriteFmt("[FAIL]\n\n");
                failed++;
            }
    
        // Print summary
        WriteFmt("[SUMMARY] Total: {}, Passed: {}, Failed: {}\n", count, passed, failed);
    
        return failed;
    int deadend_test_driver(TestFunction *tests, int count) {
        if (!tests) {
            WriteFmt("[ERROR] deadend_test_driver: NULL tests array provided\n");
            return count; // All tests failed
        }
        }
    
        WriteFmt("\n[INFO] Testing deadend scenarios\n\n");
    
        int passed = 0;
        // Run all deadend tests (expecting failure)
        for (int i = 0; i < count; i++) {
            WriteFmt("[TEST {}/{}] ", i + 1, count);
            bool result = test_deadend(tests[i], true); // All deadend tests expect failure
            if (result) {
            bool result = test_deadend(tests[i], true); // All deadend tests expect failure
            if (result) {
                WriteFmt("[PASS]\n\n");
                passed++;
            } else {
                passed++;
            } else {
                WriteFmt("[FAIL]\n\n");
                failed++;
            }
    
        // Print summary
        WriteFmt("[SUMMARY] Deadend tests - Total: {}, Passed: {}, Failed: {}\n", count, passed, failed);
    
        return failed;
        Zstr          test_name
    ) {
        WriteFmt("[INFO] Starting {} tests\n\n", test_name ? test_name : "Test Suite");
    
        int total_failed = 0;
    
        // Print final summary
        WriteFmt(
            "\n[FINAL SUMMARY] {} - Normal: {} tests, Deadend: {} tests, Total Failed: {}\n",
            test_name ? test_name : "Test Suite",
    // Test 3: Empty string reading
    bool test_empty_string_reading(void) {
        WriteFmt("Testing empty string reading\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        if (StrLen(&obj.name) == 0 && StrLen(&obj.description) == 0) {
            WriteFmt("[DEBUG] Empty string test passed - both strings empty\n");
        } else {
            WriteFmt(
            WriteFmt("[DEBUG] Empty string test passed - both strings empty\n");
        } else {
            WriteFmt(
                "[DEBUG] Empty string test FAILED - name len: {}, desc len: {}\n",
                StrLen(&obj.name),
    // Test 4: Negative numbers reading
    bool test_negative_numbers_reading(void) {
        WriteFmt("Testing negative numbers reading\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        if (obj.temp == -25 && obj.balance == -1000.50 && obj.delta == -0.001) {
            WriteFmt(
                "[DEBUG] Negative numbers test passed - temp: {}, balance: {}, delta: {}\n",
                obj.temp,
            );
        } else {
            WriteFmt(
                "[DEBUG] Negative numbers test FAILED - temp: {}, balance: {}, delta: {}\n",
                obj.temp,
    // Test 5: Large numbers reading
    bool test_large_numbers_reading(void) {
        WriteFmt("Testing large numbers reading\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        if (obj.big_int == 9223372036854775807LL) {
            WriteFmt("[DEBUG] Large integer test passed: {}\n", obj.big_int);
        } else {
            WriteFmt("[DEBUG] Large integer test FAILED: expected 9223372036854775807, got {}\n", obj.big_int);
            WriteFmt("[DEBUG] Large integer test passed: {}\n", obj.big_int);
        } else {
            WriteFmt("[DEBUG] Large integer test FAILED: expected 9223372036854775807, got {}\n", obj.big_int);
            success = false;
        }
        // Check if floats are in reasonable range (may not be exact due to precision)
        if (obj.big_float > 1.0e+300 && obj.small_float > 0 && obj.small_float < 1.0e-300) {
            WriteFmt("[DEBUG] Large float test passed\n");
        } else {
            WriteFmt("[DEBUG] Large float test FAILED - big: {e}, small: {e}\n", obj.big_float, obj.small_float);
            WriteFmt("[DEBUG] Large float test passed\n");
        } else {
            WriteFmt("[DEBUG] Large float test FAILED - big: {e}, small: {e}\n", obj.big_float, obj.small_float);
            success = false;
        }
    // Test 6: Zero values reading
    bool test_zero_values_reading(void) {
        WriteFmt("Testing zero values reading\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        if (obj.int_zero == 0 && obj.float_zero == 0.0 && obj.bool_false == false) {
            WriteFmt(
                "[DEBUG] Zero values test passed - int: {}, float: {}, bool: {}\n",
                obj.int_zero,
            );
        } else {
            WriteFmt(
                "[DEBUG] Zero values test FAILED - int: {}, float: {}, bool: {}\n",
                obj.int_zero,
    // Test 7: Special characters in strings
    bool test_special_characters_in_strings(void) {
        WriteFmt("Testing special characters in strings\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
        });
    
        WriteFmt("[DEBUG] Special chars - path: '{}'\n", obj.path);
        WriteFmt("[DEBUG] Special chars - message: '{}'\n", obj.message);
        WriteFmt("[DEBUG] Special chars - data: '{}'\n", obj.data);
    
        WriteFmt("[DEBUG] Special chars - path: '{}'\n", obj.path);
        WriteFmt("[DEBUG] Special chars - message: '{}'\n", obj.message);
        WriteFmt("[DEBUG] Special chars - data: '{}'\n", obj.data);
        WriteFmt("[DEBUG] Special chars - path: '{}'\n", obj.path);
        WriteFmt("[DEBUG] Special chars - message: '{}'\n", obj.message);
        WriteFmt("[DEBUG] Special chars - data: '{}'\n", obj.data);
    
        // Check if strings were parsed (exact content may vary based on escape handling)
        // Check if strings were parsed (exact content may vary based on escape handling)
        if (StrLen(&obj.path) > 0 && StrLen(&obj.message) > 0 && StrLen(&obj.data) > 0) {
            WriteFmt("[DEBUG] Special characters test passed - all strings parsed\n");
        } else {
            WriteFmt("[DEBUG] Special characters test FAILED - some strings empty\n");
            WriteFmt("[DEBUG] Special characters test passed - all strings parsed\n");
        } else {
            WriteFmt("[DEBUG] Special characters test FAILED - some strings empty\n");
            success = false;
        }
    // Test 8: Escape sequences reading
    bool test_escape_sequences_reading(void) {
        WriteFmt("Testing escape sequences reading\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
        // Basic validation that strings were parsed
        if (StrLen(&obj.escaped) > 0 && StrLen(&obj.backslash) > 0 && StrLen(&obj.newline) > 0 && StrLen(&obj.tab) > 0) {
            WriteFmt("[DEBUG] Escape sequences test passed\n");
        } else {
            WriteFmt("[DEBUG] Escape sequences test FAILED\n");
            WriteFmt("[DEBUG] Escape sequences test passed\n");
        } else {
            WriteFmt("[DEBUG] Escape sequences test FAILED\n");
            success = false;
        }
    // Test 9: Whitespace variations reading
    bool test_whitespace_variations_reading(void) {
        WriteFmt("Testing whitespace variations reading\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        if (StrCmp(&obj.name, "test", 4) == 0 && obj.value == 42 && obj.flag == true) {
            WriteFmt(
                "[DEBUG] Whitespace variations test passed - name: {}, value: {}, flag: {}\n",
                StrBegin(&obj.name),
            );
        } else {
            WriteFmt(
                "[DEBUG] Whitespace variations test FAILED - name: {}, value: {}, flag: {}\n",
                StrBegin(&obj.name),
        // found_inner should be true (empty inner object still triggers JR_OBJ_KV)
        if (!obj.found_outer && !obj.found_list && obj.found_deep && !obj.found_inner) {
            WriteFmt("[DEBUG] Nested empty containers test passed\n");
        } else {
            WriteFmt(
            WriteFmt("[DEBUG] Nested empty containers test passed\n");
        } else {
            WriteFmt(
                "[DEBUG] Nested empty containers test results - outer: {}, list: {}, deep: {}, inner: {}\n",
                obj.found_outer ? "true" : "false",
    // Test 11: Mixed empty and filled containers
    bool test_mixed_empty_and_filled(void) {
        WriteFmt("Testing mixed empty and filled containers\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
        if (obj.x_value == 1 && VecLen(&obj.filled_items) == 2 && VecAt(&obj.filled_items, 0) == 1 &&
            VecAt(&obj.filled_items, 1) == 2) {
            WriteFmt(
                "[DEBUG] Mixed empty and filled test passed - x: {}, items: {}\n",
                obj.x_value,
            );
        } else {
            WriteFmt(
                "[DEBUG] Mixed empty and filled test FAILED - x: {}, items: {}\n",
                obj.x_value,
            );
            if (VecLen(&obj.filled_items) > 0) {
                WriteFmt("[DEBUG] First item: {}\n", VecAt(&obj.filled_items, 0));
            }
            success = false;
    // Test 12: Boundary integers
    bool test_boundary_integers(void) {
        WriteFmt("Testing boundary integers\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        if (obj.max_int == 2147483647LL && obj.min_int == -2147483648LL && obj.one == 1 && obj.minus_one == -1) {
            WriteFmt(
                "[DEBUG] Boundary integers test passed - max: {}, min: {}, one: {}, minus_one: {}\n",
                obj.max_int,
            );
        } else {
            WriteFmt(
                "[DEBUG] Boundary integers test FAILED - max: {}, min: {}, one: {}, minus_one: {}\n",
                obj.max_int,
    // Test 13: Boundary floats
    bool test_boundary_floats(void) {
        WriteFmt("Testing boundary floats\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
        if (obj.tiny > 0.0000001 && obj.tiny < 0.00001 && obj.huge > 999999.0 && obj.huge < 1000000.0 && obj.zero == 0.0 &&
            obj.negative_tiny < -0.0000001 && obj.negative_tiny > -0.00001) {
            WriteFmt(
                "[DEBUG] Boundary floats test passed - tiny: {}, huge: {}, zero: {}, neg_tiny: {}\n",
                obj.tiny,
            );
        } else {
            WriteFmt(
                "[DEBUG] Boundary floats test FAILED - tiny: {}, huge: {}, zero: {}, neg_tiny: {}\n",
                obj.tiny,
    
        if (!result) {
            WriteFmt("[DEBUG] JSON comparison failed\n");
            WriteFmt("[DEBUG] Expected: '");
            for (u64 i = 0; i < StrLen(&expected_clean); i++) {
        if (!result) {
            WriteFmt("[DEBUG] JSON comparison failed\n");
            WriteFmt("[DEBUG] Expected: '");
            for (u64 i = 0; i < StrLen(&expected_clean); i++) {
                WriteFmt("{c}", StrBegin(&expected_clean)[i]);
            WriteFmt("[DEBUG] Expected: '");
            for (u64 i = 0; i < StrLen(&expected_clean); i++) {
                WriteFmt("{c}", StrBegin(&expected_clean)[i]);
            }
            WriteFmt("'\n");
                WriteFmt("{c}", StrBegin(&expected_clean)[i]);
            }
            WriteFmt("'\n");
            WriteFmt("[DEBUG] Got: '");
            for (u64 i = 0; i < StrLen(&output_clean); i++) {
            }
            WriteFmt("'\n");
            WriteFmt("[DEBUG] Got: '");
            for (u64 i = 0; i < StrLen(&output_clean); i++) {
                WriteFmt("%c", StrBegin(&output_clean)[i]);
            WriteFmt("[DEBUG] Got: '");
            for (u64 i = 0; i < StrLen(&output_clean); i++) {
                WriteFmt("%c", StrBegin(&output_clean)[i]);
            }
            WriteFmt("'\n");
                WriteFmt("%c", StrBegin(&output_clean)[i]);
            }
            WriteFmt("'\n");
        }
    // Test 1: Two-level nesting writing
    bool test_two_level_nesting_writing(void) {
        WriteFmt("Testing two-level nesting writing\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test 2: Three-level nesting writing
    bool test_three_level_nesting_writing(void) {
        WriteFmt("Testing three-level nesting writing\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test 3: Complex API response writing
    bool test_complex_api_response_writing(void) {
        WriteFmt("Testing complex API response writing\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test 4: Function info array writing
    bool test_function_info_array_writing(void) {
        WriteFmt("Testing function info array writing\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test 5: Search results with tags writing
    bool test_search_results_with_tags_writing(void) {
        WriteFmt("Testing search results with tags writing\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test 6: Dynamic object keys writing
    bool test_dynamic_object_keys_writing(void) {
        WriteFmt("Testing dynamic object keys writing\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test 7: Deeply nested structure writing
    bool test_deeply_nested_structure_writing(void) {
        WriteFmt("Testing deeply nested structure writing\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test 8: Mixed array types writing
    bool test_mixed_array_types_writing(void) {
        WriteFmt("Testing mixed array types writing\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        if (!result) {
            WriteFmt("[DEBUG] JSON comparison failed\n");
            WriteFmt("[DEBUG] Expected: '");
            for (size i = 0; i < StrLen(&expected_clean); i++) {
        if (!result) {
            WriteFmt("[DEBUG] JSON comparison failed\n");
            WriteFmt("[DEBUG] Expected: '");
            for (size i = 0; i < StrLen(&expected_clean); i++) {
                WriteFmt("{c}", StrBegin(&expected_clean)[i]);
            WriteFmt("[DEBUG] Expected: '");
            for (size i = 0; i < StrLen(&expected_clean); i++) {
                WriteFmt("{c}", StrBegin(&expected_clean)[i]);
            }
            WriteFmt("'\n");
                WriteFmt("{c}", StrBegin(&expected_clean)[i]);
            }
            WriteFmt("'\n");
            WriteFmt("[DEBUG] Got: '");
            for (size i = 0; i < StrLen(&output_clean); i++) {
            }
            WriteFmt("'\n");
            WriteFmt("[DEBUG] Got: '");
            for (size i = 0; i < StrLen(&output_clean); i++) {
                WriteFmt("{c}", StrBegin(&output_clean)[i]);
            WriteFmt("[DEBUG] Got: '");
            for (size i = 0; i < StrLen(&output_clean); i++) {
                WriteFmt("{c}", StrBegin(&output_clean)[i]);
            }
            WriteFmt("'\n");
                WriteFmt("{c}", StrBegin(&output_clean)[i]);
            }
            WriteFmt("'\n");
        }
    // Test 1: Simple string writing
    bool test_simple_string_writing(void) {
        WriteFmt("Testing simple string writing\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test 2: Simple number writing
    bool test_simple_numbers_writing(void) {
        WriteFmt("Testing simple number writing\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test 3: Simple boolean writing
    bool test_simple_boolean_writing(void) {
        WriteFmt("Testing simple boolean writing\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test 4: Simple person object writing
    bool test_simple_person_object_writing(void) {
        WriteFmt("Testing simple person object writing\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test 5: Simple config object writing
    bool test_simple_config_object_writing(void) {
        WriteFmt("Testing simple config object writing\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test 6: Simple array of strings writing
    bool test_simple_array_of_strings_writing(void) {
        WriteFmt("Testing simple array of strings writing\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test 7: Simple nested object writing
    bool test_simple_nested_object_writing(void) {
        WriteFmt("Testing simple nested object writing\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test 8: Simple product with tags array writing
    bool test_simple_product_with_tags_writing(void) {
        WriteFmt("Testing simple product with tags array writing\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
        if (!result) {
            WriteFmtLn("[DEBUG] JSON comparison failed");
            WriteFmt("[DEBUG] Expected: '");
            for (u64 i = 0; i < StrLen(&expected_clean); i++) {
                WriteFmt("{c}", StrBegin(&expected_clean)[i]);
            WriteFmt("[DEBUG] Expected: '");
            for (u64 i = 0; i < StrLen(&expected_clean); i++) {
                WriteFmt("{c}", StrBegin(&expected_clean)[i]);
            }
            WriteFmtLn("'");
            WriteFmtLn("'");
    
            WriteFmt("[DEBUG] Got: '");
            for (u64 i = 0; i < StrLen(&output_clean); i++) {
                WriteFmt("{c}", StrBegin(&output_clean)[i]);
            WriteFmt("[DEBUG] Got: '");
            for (u64 i = 0; i < StrLen(&output_clean); i++) {
                WriteFmt("{c}", StrBegin(&output_clean)[i]);
            }
            WriteFmtLn("'");
    // Test basic iterator functionality
    bool test_basic_iterator_functionality(void) {
        WriteFmt("Testing basic iterator functionality\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        if (!StrIterRemainingLength(&si)) {
            WriteFmt("[DEBUG] Remaining length check failed: expected > 0, got {}\n", StrIterRemainingLength(&si));
            success = false;
        }
        char c = '\0';
        if (!StrIterPeek(&si, &c) || c != '{') {
            WriteFmt("[DEBUG] Peek check failed: expected '{', got '{c}'\n", c);
            success = false;
        }
    // Test simple JSON object (1 level)
    bool test_simple_json_object(void) {
        WriteFmt("Testing simple JSON object (1 level)\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        if (data.id != 12345) {
            WriteFmt("[DEBUG] ID check failed: expected 12345, got {}\n", data.id);
            success = false;
        }
    
        if (StrCmp(&data.name, "test", 4) != 0) {
            WriteFmt("[DEBUG] Name check failed: expected 'test', got '");
            for (size i = 0; i < StrLen(&data.name); i++) {
                WriteFmt("{c}", StrBegin(&data.name)[i]);
            WriteFmt("[DEBUG] Name check failed: expected 'test', got '");
            for (size i = 0; i < StrLen(&data.name); i++) {
                WriteFmt("{c}", StrBegin(&data.name)[i]);
            }
            WriteFmt("'\n");
                WriteFmt("{c}", StrBegin(&data.name)[i]);
            }
            WriteFmt("'\n");
            success = false;
        }
    
        if (data.active != true) {
            WriteFmt("[DEBUG] Active check failed: expected true, got {}\n", data.active ? "true" : "false");
            success = false;
        }
    
        if (!(data.score > 98.4 && data.score < 98.6)) {
            WriteFmt("[DEBUG] Score check failed: expected 98.4-98.6, got {}\n", data.score);
            success = false;
        }
    // Test two-level nesting
    bool test_two_level_nesting(void) {
        WriteFmt("Testing two-level nesting\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        if (data.user.id != 123) {
            WriteFmt("[DEBUG] User ID check failed: expected 123, got {}\n", data.user.id);
            success = false;
        }
    
        if (StrCmp(&data.user.profile.name, "Alice", 5) != 0) {
            WriteFmt("[DEBUG] Profile name check failed: expected 'Alice', got '");
            for (u64 i = 0; i < StrLen(&data.user.profile.name); i++) {
                WriteFmt("{}", StrBegin(&data.user.profile.name)[i]);
            WriteFmt("[DEBUG] Profile name check failed: expected 'Alice', got '");
            for (u64 i = 0; i < StrLen(&data.user.profile.name); i++) {
                WriteFmt("{}", StrBegin(&data.user.profile.name)[i]);
            }
            WriteFmt("'\n");
                WriteFmt("{}", StrBegin(&data.user.profile.name)[i]);
            }
            WriteFmt("'\n");
            success = false;
        }
    
        if (data.user.profile.age != 30) {
            WriteFmt("[DEBUG] Profile age check failed: expected 30, got {}\n", data.user.profile.age);
            success = false;
        }
    
        if (StrCmp(&data.status, "active", 6) != 0) {
            WriteFmt("[DEBUG] Status check failed: expected 'active', got '");
            for (size i = 0; i < StrLen(&data.status); i++) {
                WriteFmt("{}", StrBegin(&data.status)[i]);
            WriteFmt("[DEBUG] Status check failed: expected 'active', got '");
            for (size i = 0; i < StrLen(&data.status); i++) {
                WriteFmt("{}", StrBegin(&data.status)[i]);
            }
            WriteFmt("'\n");
                WriteFmt("{}", StrBegin(&data.status)[i]);
            }
            WriteFmt("'\n");
            success = false;
        }
    // Test three-level nesting
    bool test_three_level_nesting(void) {
        WriteFmt("Testing three-level nesting\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        if (StrCmp(&data.company.departments.engineering.head, "John", 4) != 0) {
            WriteFmt("[DEBUG] Engineering head check failed: expected 'John', got '");
            for (size i = 0; i < StrLen(&data.company.departments.engineering.head); i++) {
                WriteFmt("{c}", StrBegin(&data.company.departments.engineering.head)[i]);
            WriteFmt("[DEBUG] Engineering head check failed: expected 'John', got '");
            for (size i = 0; i < StrLen(&data.company.departments.engineering.head); i++) {
                WriteFmt("{c}", StrBegin(&data.company.departments.engineering.head)[i]);
            }
            WriteFmt("'\n");
                WriteFmt("{c}", StrBegin(&data.company.departments.engineering.head)[i]);
            }
            WriteFmt("'\n");
            success = false;
        }
    
        if (data.company.departments.engineering.count != 25) {
            WriteFmt(
                "[DEBUG] Engineering count check failed: expected 25, got {}\n",
                data.company.departments.engineering.count
    
        if (data.company.departments.engineering.budget < 149999.0) {
            WriteFmt(
                "[DEBUG] Engineering budget check failed: expected > 149999.0, got {}\n",
                data.company.departments.engineering.budget
    
        if (StrCmp(&data.company.name, "TechCorp", 8) != 0) {
            WriteFmt("[DEBUG] Company name check failed: expected 'TechCorp', got '");
            for (size i = 0; i < StrLen(&data.company.name); i++) {
                WriteFmt("{c}", StrBegin(&data.company.name)[i]);
            WriteFmt("[DEBUG] Company name check failed: expected 'TechCorp', got '");
            for (size i = 0; i < StrLen(&data.company.name); i++) {
                WriteFmt("{c}", StrBegin(&data.company.name)[i]);
            }
            WriteFmt("'\n");
                WriteFmt("{c}", StrBegin(&data.company.name)[i]);
            }
            WriteFmt("'\n");
            success = false;
        }
    // Test dynamic key parsing (like your example) - Fixed initialization
    bool test_dynamic_key_parsing(void) {
        WriteFmt("Testing dynamic key parsing\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        if (VecLen(&symbols) != 2) {
            WriteFmt("[DEBUG] Symbols length check failed: expected 2, got {}\n", VecLen(&symbols));
            success = false;
        }
    
            if (!(sym1->source_function_id == 12345 || sym1->source_function_id == 54321)) {
                WriteFmt(
                    "[DEBUG] Sym1 source function ID check failed: expected 12345 or 54321, got {}\n",
                    sym1->source_function_id
    
            if (!(sym1->target_function_id == 67890 || sym1->target_function_id == 98765)) {
                WriteFmt(
                    "[DEBUG] Sym1 target function ID check failed: expected 67890 or 98765, got {}\n",
                    sym1->target_function_id
    
            if (!(sym1->distance > 0.8 && sym1->distance < 1.0)) {
                WriteFmt("[DEBUG] Sym1 distance check failed: expected 0.8-1.0, got {}\n", sym1->distance);
                success = false;
            }
    
            if (!(sym2->source_function_id == 12345 || sym2->source_function_id == 54321)) {
                WriteFmt(
                    "[DEBUG] Sym2 source function ID check failed: expected 12345 or 54321, got {}\n",
                    sym2->source_function_id
    
            if (!(sym2->target_function_id == 67890 || sym2->target_function_id == 98765)) {
                WriteFmt(
                    "[DEBUG] Sym2 target function ID check failed: expected 67890 or 98765, got {}\n",
                    sym2->target_function_id
    
            if (!(sym2->distance > 0.8 && sym2->distance < 1.0)) {
                WriteFmt("[DEBUG] Sym2 distance check failed: expected 0.8-1.0, got {}\n", sym2->distance);
                success = false;
            }
    // Test complex API response similar to your example - Fixed initialization
    bool test_complex_api_response(void) {
        WriteFmt("Testing complex API response structure\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
        // Debug status check
        if (response.status != true) {
            WriteFmt("[DEBUG] Status check failed: expected true, got {}\n", response.status ? "true" : "false");
            success = false;
        }
        // Debug message check
        if (StrCmp(&response.message, "Success", 7) != 0) {
            WriteFmt("[DEBUG] Message check failed: expected 'Success', got '");
            for (size i = 0; i < StrLen(&response.message); i++) {
                WriteFmt("{c}", StrBegin(&response.message)[i]);
            WriteFmt("[DEBUG] Message check failed: expected 'Success', got '");
            for (size i = 0; i < StrLen(&response.message); i++) {
                WriteFmt("{c}", StrBegin(&response.message)[i]);
            }
            WriteFmt("'\n");
                WriteFmt("{c}", StrBegin(&response.message)[i]);
            }
            WriteFmt("'\n");
            success = false;
        }
        // Debug data length check
        if (VecLen(&response.data) != 1) {
            WriteFmt("[DEBUG] Data length check failed: expected 1, got {}\n", VecLen(&response.data));
            success = false;
        }
            // Debug individual symbol checks
            if (sym->source_function_id != 12345) {
                WriteFmt("[DEBUG] Source function ID check failed: expected 12345, got {}\n", sym->source_function_id);
                success = false;
            }
    
            if (sym->target_function_id != 67890) {
                WriteFmt("[DEBUG] Target function ID check failed: expected 67890, got {}\n", sym->target_function_id);
                success = false;
            }
    
            if (!(sym->distance > 0.84 && sym->distance < 0.86)) {
                WriteFmt("[DEBUG] Distance check failed: expected 0.84-0.86, got {}\n", sym->distance);
                success = false;
            }
    
            if (sym->analysis_id != 999) {
                WriteFmt("[DEBUG] Analysis ID check failed: expected 999, got {}\n", sym->analysis_id);
                success = false;
            }
    
            if (sym->binary_id != 888) {
                WriteFmt("[DEBUG] Binary ID check failed: expected 888, got {}\n", sym->binary_id);
                success = false;
            }
    
            if (StrCmp(&sym->analysis_name, "test_analysis", 13) != 0) {
                WriteFmt("[DEBUG] Analysis name check failed: expected 'test_analysis', got '");
                for (size i = 0; i < StrLen(&sym->analysis_name); i++) {
                    WriteFmt("{c}", StrBegin(&sym->analysis_name)[i]);
                WriteFmt("[DEBUG] Analysis name check failed: expected 'test_analysis', got '");
                for (size i = 0; i < StrLen(&sym->analysis_name); i++) {
                    WriteFmt("{c}", StrBegin(&sym->analysis_name)[i]);
                }
                WriteFmt("'\n");
                    WriteFmt("{c}", StrBegin(&sym->analysis_name)[i]);
                }
                WriteFmt("'\n");
                success = false;
            }
    
            if (StrCmp(&sym->function_name, "main_func", 9) != 0) {
                WriteFmt(
                    "[DEBUG] Function name check failed: expected 'main_func', got string of length {}\n",
                    StrLen(&sym->function_name)
    
            if (StrCmp(&sym->sha256, "abc123", 6) != 0) {
                WriteFmt("[DEBUG] SHA256 check failed: expected 'abc123', got '");
                for (size i = 0; i < StrLen(&sym->sha256); i++) {
                    WriteFmt("{c}", StrBegin(&sym->sha256)[i]);
                WriteFmt("[DEBUG] SHA256 check failed: expected 'abc123', got '");
                for (size i = 0; i < StrLen(&sym->sha256); i++) {
                    WriteFmt("{c}", StrBegin(&sym->sha256)[i]);
                }
                WriteFmt("'\n");
                    WriteFmt("{c}", StrBegin(&sym->sha256)[i]);
                }
                WriteFmt("'\n");
                success = false;
            }
    
            if (sym->debug != true) {
                WriteFmt("[DEBUG] Debug flag check failed: expected true, got {}\n", sym->debug ? "true" : "false");
                success = false;
            }
    
            if (StrCmp(&sym->function_mangled_name, "_Z4main", 7) != 0) {
                WriteFmt("[DEBUG] Mangled name check failed: expected '_Z4main', got '");
                for (size i = 0; i < StrLen(&sym->function_mangled_name); i++) {
                    WriteFmt("{c}", StrBegin(&sym->function_mangled_name)[i]);
                WriteFmt("[DEBUG] Mangled name check failed: expected '_Z4main', got '");
                for (size i = 0; i < StrLen(&sym->function_mangled_name); i++) {
                    WriteFmt("{c}", StrBegin(&sym->function_mangled_name)[i]);
                }
                WriteFmt("'\n");
                    WriteFmt("{c}", StrBegin(&sym->function_mangled_name)[i]);
                }
                WriteFmt("'\n");
                success = false;
            }
    // Test function info parsing
    bool test_function_info_parsing(void) {
        WriteFmt("Testing function info parsing\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        if (info.id != 12345) {
            WriteFmt("[DEBUG] Function ID check failed: expected 12345, got {}\n", info.id);
            success = false;
        }
    
        if (StrCmp(&info.name, "test_func", 9) != 0) {
            WriteFmt("[DEBUG] Function name check failed: expected 'test_func', got '");
            for (size i = 0; i < StrLen(&info.name); i++) {
                WriteFmt("{}", StrBegin(&info.name)[i]);
            WriteFmt("[DEBUG] Function name check failed: expected 'test_func', got '");
            for (size i = 0; i < StrLen(&info.name); i++) {
                WriteFmt("{}", StrBegin(&info.name)[i]);
            }
            WriteFmt("'\n");
                WriteFmt("{}", StrBegin(&info.name)[i]);
            }
            WriteFmt("'\n");
            success = false;
        }
    
        if (info.size != 1024) {
            WriteFmt("[DEBUG] Function size check failed: expected 1024, got {}\n", info.size);
            success = false;
        }
    
        if (info.vaddr != 4096) {
            WriteFmt("[DEBUG] Function vaddr check failed: expected 4096, got {}\n", info.vaddr);
            success = false;
        }
    // Test model info parsing
    bool test_model_info_parsing(void) {
        WriteFmt("Testing model info parsing\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        if (info.id != 54321) {
            WriteFmt("[DEBUG] Model ID check failed: expected 54321, got {}\n", info.id);
            success = false;
        }
    
        if (StrCmp(&info.name, "test_model", 10) != 0) {
            WriteFmt("[DEBUG] Model name check failed: expected 'test_model', got '");
            for (size i = 0; i < StrLen(&info.name); i++) {
                WriteFmt("{}", StrBegin(&info.name)[i]);
            WriteFmt("[DEBUG] Model name check failed: expected 'test_model', got '");
            for (size i = 0; i < StrLen(&info.name); i++) {
                WriteFmt("{}", StrBegin(&info.name)[i]);
            }
            WriteFmt("'\n");
                WriteFmt("{}", StrBegin(&info.name)[i]);
            }
            WriteFmt("'\n");
            success = false;
        }
    // Test search results with tags - Fixed implementation
    bool test_search_results_with_tags(void) {
        WriteFmt("Testing search results with tags\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        if (result.binary_id != 888) {
            WriteFmt("[DEBUG] Binary ID check failed: expected 888, got {}\n", result.binary_id);
            success = false;
        }
    
        if (StrCmp(&result.binary_name, "test_binary", 11) != 0) {
            WriteFmt("[DEBUG] Binary name check failed: expected 'test_binary', got '");
            for (size i = 0; i < StrLen(&result.binary_name); i++) {
                WriteFmt("{c}", StrBegin(&result.binary_name)[i]);
            WriteFmt("[DEBUG] Binary name check failed: expected 'test_binary', got '");
            for (size i = 0; i < StrLen(&result.binary_name); i++) {
                WriteFmt("{c}", StrBegin(&result.binary_name)[i]);
            }
            WriteFmt("'\n");
                WriteFmt("{c}", StrBegin(&result.binary_name)[i]);
            }
            WriteFmt("'\n");
            success = false;
        }
    
        if (result.analysis_id != 999) {
            WriteFmt("[DEBUG] Analysis ID check failed: expected 999, got {}\n", result.analysis_id);
            success = false;
        }
    
        if (StrCmp(&result.sha256, "abc123", 6) != 0) {
            WriteFmt("[DEBUG] SHA256 check failed: expected 'abc123', got '");
            for (size i = 0; i < StrLen(&result.sha256); i++) {
                WriteFmt("{c}", StrBegin(&result.sha256)[i]);
            WriteFmt("[DEBUG] SHA256 check failed: expected 'abc123', got '");
            for (size i = 0; i < StrLen(&result.sha256); i++) {
                WriteFmt("{c}", StrBegin(&result.sha256)[i]);
            }
            WriteFmt("'\n");
                WriteFmt("{c}", StrBegin(&result.sha256)[i]);
            }
            WriteFmt("'\n");
            success = false;
        }
    
        if (result.model_id != 12345) {
            WriteFmt("[DEBUG] Model ID check failed: expected 12345, got {}\n", result.model_id);
            success = false;
        }
    
        if (StrCmp(&result.model_name, "test_model", 10) != 0) {
            WriteFmt("[DEBUG] Model name check failed: expected 'test_model', got '");
            for (size i = 0; i < StrLen(&result.model_name); i++) {
                WriteFmt("{c}", StrBegin(&result.model_name)[i]);
            WriteFmt("[DEBUG] Model name check failed: expected 'test_model', got '");
            for (size i = 0; i < StrLen(&result.model_name); i++) {
                WriteFmt("{c}", StrBegin(&result.model_name)[i]);
            }
            WriteFmt("'\n");
                WriteFmt("{c}", StrBegin(&result.model_name)[i]);
            }
            WriteFmt("'\n");
            success = false;
        }
    
        if (StrCmp(&result.owned_by, "user1", 5) != 0) {
            WriteFmt("[DEBUG] Owned by check failed: expected 'user1', got '");
            for (size i = 0; i < StrLen(&result.owned_by); i++) {
                WriteFmt("{c}", StrBegin(&result.owned_by)[i]);
            WriteFmt("[DEBUG] Owned by check failed: expected 'user1', got '");
            for (size i = 0; i < StrLen(&result.owned_by); i++) {
                WriteFmt("{c}", StrBegin(&result.owned_by)[i]);
            }
            WriteFmt("'\n");
                WriteFmt("{c}", StrBegin(&result.owned_by)[i]);
            }
            WriteFmt("'\n");
            success = false;
        }
    // Test conditional parsing
    bool test_conditional_parsing(void) {
        WriteFmt("Testing conditional parsing\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
        ApiResponse response = {false, StrInit(&alloc), VecInitWithDeepCopy(NULL, AnnSymbolDeinit, &alloc)};
    
        WriteFmt("[DEBUG] About to parse JSON...\n");
    
        JR_OBJ(si, {
            JR_STR_KV(si, "message", response.message);
    
            WriteFmt("[DEBUG] Parsed status: {}, message: '", response.status ? "true" : "false");
            for (size i = 0; i < StrLen(&response.message); i++) {
                WriteFmt("{c}", StrBegin(&response.message)[i]);
            WriteFmt("[DEBUG] Parsed status: {}, message: '", response.status ? "true" : "false");
            for (size i = 0; i < StrLen(&response.message); i++) {
                WriteFmt("{c}", StrBegin(&response.message)[i]);
            }
            WriteFmt("'\n");
                WriteFmt("{c}", StrBegin(&response.message)[i]);
            }
            WriteFmt("'\n");
    
            if (response.status) {
    
            if (response.status) {
                WriteFmt("[DEBUG] Status is true, parsing data...\n");
                JR_OBJ_KV(si, "data", {
                    u64 source_function_id = (u64)ZstrToI64(StrBegin(&key), NULL);
                JR_OBJ_KV(si, "data", {
                    u64 source_function_id = (u64)ZstrToI64(StrBegin(&key), NULL);
                    WriteFmt("[DEBUG] Source function ID from key: {}\n", source_function_id);
                    JR_OBJ(si, {
                        // Properly initialize all Str fields
                        sym.target_function_id    = (u64)ZstrToI64(StrBegin(&key), NULL);
    
                        WriteFmt("[DEBUG] Target function ID from key: {}\n", sym.target_function_id);
    
                        JR_OBJ(si, {
                        });
    
                        WriteFmt(
                            "[DEBUG] Parsed symbol - distance: {}, analysis_id: {}, binary_id: {}\n",
                            sym.distance,
    
                        VecPushBack(&response.data, sym);
                        WriteFmt("[DEBUG] Added symbol to vector, length now: {}\n", VecLen(&response.data));
                    });
                });
                });
            } else {
                WriteFmt("[DEBUG] Status is false, skipping data parsing\n");
            }
        });
        });
    
        WriteFmt("[DEBUG] Finished parsing, response.data length = {}\n", VecLen(&response.data));
    
        // Debug checks
        // Debug checks
        if (response.status != true) {
            WriteFmt("[DEBUG] Status check failed: expected true, got {}\n", response.status ? "true" : "false");
            success = false;
        }
    
        if (StrCmp(&response.message, "Success", 7) != 0) {
            WriteFmt("[DEBUG] Message check failed: expected 'Success', got '");
            for (size i = 0; i < StrLen(&response.message); i++) {
                WriteFmt("{c}", StrBegin(&response.message)[i]);
            WriteFmt("[DEBUG] Message check failed: expected 'Success', got '");
            for (size i = 0; i < StrLen(&response.message); i++) {
                WriteFmt("{c}", StrBegin(&response.message)[i]);
            }
            WriteFmt("'\n");
                WriteFmt("{c}", StrBegin(&response.message)[i]);
            }
            WriteFmt("'\n");
            success = false;
        }
    
        if (VecLen(&response.data) != 1) {
            WriteFmt("[DEBUG] Data length check failed: expected 1, got {}\n", VecLen(&response.data));
            success = false;
        }
    
            if (sym->source_function_id != 12345) {
                WriteFmt("[DEBUG] Source function ID check failed: expected 12345, got {}\n", sym->source_function_id);
                success = false;
            }
    
            if (sym->target_function_id != 67890) {
                WriteFmt("[DEBUG] Target function ID check failed: expected 67890, got {}\n", sym->target_function_id);
                success = false;
            }
    
            if (!(sym->distance > 0.84 && sym->distance < 0.86)) {
                WriteFmt("[DEBUG] Distance check failed: expected 0.84-0.86, got {}\n", sym->distance);
                success = false;
            }
    
            if (sym->analysis_id != 999) {
                WriteFmt("[DEBUG] Analysis ID check failed: expected 999, got {}\n", sym->analysis_id);
                success = false;
            }
    
            if (sym->binary_id != 888) {
                WriteFmt("[DEBUG] Binary ID check failed: expected 888, got {}\n", sym->binary_id);
                success = false;
            }
    
            if (StrCmp(&sym->analysis_name, "test_analysis", 13) != 0) {
                WriteFmt("[DEBUG] Analysis name check failed: expected 'test_analysis', got '");
                for (size i = 0; i < StrLen(&sym->analysis_name); i++) {
                    WriteFmt("{c}", StrBegin(&sym->analysis_name)[i]);
                WriteFmt("[DEBUG] Analysis name check failed: expected 'test_analysis', got '");
                for (size i = 0; i < StrLen(&sym->analysis_name); i++) {
                    WriteFmt("{c}", StrBegin(&sym->analysis_name)[i]);
                }
                WriteFmt("'\n");
                    WriteFmt("{c}", StrBegin(&sym->analysis_name)[i]);
                }
                WriteFmt("'\n");
                success = false;
            }
    
            if (StrCmp(&sym->function_name, "main_func", 9) != 0) {
                WriteFmt(
                    "[DEBUG] Function name check failed: expected 'main_func', got string of length {}\n",
                    StrLen(&sym->function_name)
    
            if (StrCmp(&sym->sha256, "abc123", 6) != 0) {
                WriteFmt("[DEBUG] SHA256 check failed: expected 'abc123', got '");
                for (size i = 0; i < StrLen(&sym->sha256); i++) {
                    WriteFmt("{c}", StrBegin(&sym->sha256)[i]);
                WriteFmt("[DEBUG] SHA256 check failed: expected 'abc123', got '");
                for (size i = 0; i < StrLen(&sym->sha256); i++) {
                    WriteFmt("{c}", StrBegin(&sym->sha256)[i]);
                }
                WriteFmt("'\n");
                    WriteFmt("{c}", StrBegin(&sym->sha256)[i]);
                }
                WriteFmt("'\n");
                success = false;
            }
    
            if (sym->debug != true) {
                WriteFmt("[DEBUG] Debug flag check failed: expected true, got {}\n", sym->debug ? "true" : "false");
                success = false;
            }
    
            if (StrCmp(&sym->function_mangled_name, "_Z4main", 7) != 0) {
                WriteFmt("[DEBUG] Mangled name check failed: expected '_Z4main', got '");
                for (size i = 0; i < StrLen(&sym->function_mangled_name); i++) {
                    WriteFmt("{c}", StrBegin(&sym->function_mangled_name)[i]);
                WriteFmt("[DEBUG] Mangled name check failed: expected '_Z4main', got '");
                for (size i = 0; i < StrLen(&sym->function_mangled_name); i++) {
                    WriteFmt("{c}", StrBegin(&sym->function_mangled_name)[i]);
                }
                WriteFmt("'\n");
                    WriteFmt("{c}", StrBegin(&sym->function_mangled_name)[i]);
                }
                WriteFmt("'\n");
                success = false;
            }
    // Test status response pattern
    bool test_status_response_pattern(void) {
        WriteFmt("Testing status response pattern\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
        ApiResponse response = {false, StrInit(&alloc), VecInitWithDeepCopy(NULL, AnnSymbolDeinit, &alloc)};
    
        WriteFmt("[DEBUG] About to parse JSON...\n");
    
        JR_OBJ(si, {
            JR_STR_KV(si, "message", response.message);
    
            WriteFmt("[DEBUG] Parsed status: {}, message: '", response.status ? "true" : "false");
            for (size i = 0; i < StrLen(&response.message); i++) {
                WriteFmt("{c}", StrBegin(&response.message)[i]);
            WriteFmt("[DEBUG] Parsed status: {}, message: '", response.status ? "true" : "false");
            for (size i = 0; i < StrLen(&response.message); i++) {
                WriteFmt("{c}", StrBegin(&response.message)[i]);
            }
            WriteFmt("'\n");
                WriteFmt("{c}", StrBegin(&response.message)[i]);
            }
            WriteFmt("'\n");
    
            if (response.status) {
    
            if (response.status) {
                WriteFmt("[DEBUG] Status is true, parsing data...\n");
                JR_OBJ_KV(si, "data", {
                    u64 source_function_id = (u64)ZstrToI64(StrBegin(&key), NULL);
                JR_OBJ_KV(si, "data", {
                    u64 source_function_id = (u64)ZstrToI64(StrBegin(&key), NULL);
                    WriteFmt("[DEBUG] Source function ID from key: {}\n", source_function_id);
                    JR_OBJ(si, {
                        // Properly initialize all Str fields
                        sym.target_function_id    = (u64)ZstrToI64(StrBegin(&key), NULL);
    
                        WriteFmt("[DEBUG] Target function ID from key: {}\n", sym.target_function_id);
    
                        JR_OBJ(si, {
                        });
    
                        WriteFmt(
                            "[DEBUG] Parsed symbol - distance: {}, analysis_id: {}, binary_id: {}\n",
                            sym.distance,
    
                        VecPushBack(&response.data, sym);
                        WriteFmt("[DEBUG] Added symbol to vector, length now: {}\n", VecLen(&response.data));
                    });
                });
                });
            } else {
                WriteFmt("[DEBUG] Status is false, skipping data parsing\n");
            }
        });
        });
    
        WriteFmt("[DEBUG] Finished parsing, response.data length = {}\n", VecLen(&response.data));
    
        // Debug checks
        // Debug checks
        if (response.status != true) {
            WriteFmt("[DEBUG] Status check failed: expected true, got {}\n", response.status ? "true" : "false");
            success = false;
        }
    
        if (StrCmp(&response.message, "Success", 7) != 0) {
            WriteFmt("[DEBUG] Message check failed: expected 'Success', got '");
            for (u64 i = 0; i < StrLen(&response.message); i++) {
                WriteFmt("{c}", StrBegin(&response.message)[i]);
            WriteFmt("[DEBUG] Message check failed: expected 'Success', got '");
            for (u64 i = 0; i < StrLen(&response.message); i++) {
                WriteFmt("{c}", StrBegin(&response.message)[i]);
            }
            WriteFmt("'\n");
                WriteFmt("{c}", StrBegin(&response.message)[i]);
            }
            WriteFmt("'\n");
            success = false;
        }
    
        if (VecLen(&response.data) != 1) {
            WriteFmt("[DEBUG] Data length check failed: expected 1, got {}\n", VecLen(&response.data));
            success = false;
        }
    
            if (sym->source_function_id != 12345) {
                WriteFmt("[DEBUG] Source function ID check failed: expected 12345, got {}\n", sym->source_function_id);
                success = false;
            }
    
            if (sym->target_function_id != 67890) {
                WriteFmt("[DEBUG] Target function ID check failed: expected 67890, got {}\n", sym->target_function_id);
                success = false;
            }
    
            if (!(sym->distance > 0.84 && sym->distance < 0.86)) {
                WriteFmt("[DEBUG] Distance check failed: expected 0.84-0.86, got {}\n", sym->distance);
                success = false;
            }
    
            if (sym->analysis_id != 999) {
                WriteFmt("[DEBUG] Analysis ID check failed: expected 999, got {}\n", sym->analysis_id);
                success = false;
            }
    
            if (sym->binary_id != 888) {
                WriteFmt("[DEBUG] Binary ID check failed: expected 888, got {}\n", sym->binary_id);
                success = false;
            }
    
            if (StrCmp(&sym->analysis_name, "test_analysis", 13) != 0) {
                WriteFmt("[DEBUG] Analysis name check failed: expected 'test_analysis', got '");
                for (size i = 0; i < StrLen(&sym->analysis_name); i++) {
                    WriteFmt("{}", StrBegin(&sym->analysis_name)[i]);
                WriteFmt("[DEBUG] Analysis name check failed: expected 'test_analysis', got '");
                for (size i = 0; i < StrLen(&sym->analysis_name); i++) {
                    WriteFmt("{}", StrBegin(&sym->analysis_name)[i]);
                }
                WriteFmt("'\n");
                    WriteFmt("{}", StrBegin(&sym->analysis_name)[i]);
                }
                WriteFmt("'\n");
                success = false;
            }
    
            if (StrCmp(&sym->function_name, "main_func", 9) != 0) {
                WriteFmt("[DEBUG] Function name check failed: expected 'main_func', got '");
                for (size i = 0; i < StrLen(&sym->function_name); i++) {
                    WriteFmt("{c}", StrBegin(&sym->function_name)[i]);
                WriteFmt("[DEBUG] Function name check failed: expected 'main_func', got '");
                for (size i = 0; i < StrLen(&sym->function_name); i++) {
                    WriteFmt("{c}", StrBegin(&sym->function_name)[i]);
                }
                WriteFmt("'\n");
                    WriteFmt("{c}", StrBegin(&sym->function_name)[i]);
                }
                WriteFmt("'\n");
                success = false;
            }
    
            if (StrCmp(&sym->sha256, "abc123", 6) != 0) {
                WriteFmt("[DEBUG] SHA256 check failed: expected 'abc123', got '");
                for (size i = 0; i < StrLen(&sym->sha256); i++) {
                    WriteFmt("{}", StrBegin(&sym->sha256)[i]);
                WriteFmt("[DEBUG] SHA256 check failed: expected 'abc123', got '");
                for (size i = 0; i < StrLen(&sym->sha256); i++) {
                    WriteFmt("{}", StrBegin(&sym->sha256)[i]);
                }
                WriteFmt("'\n");
                    WriteFmt("{}", StrBegin(&sym->sha256)[i]);
                }
                WriteFmt("'\n");
                success = false;
            }
    
            if (sym->debug != true) {
                WriteFmt("[DEBUG] Debug flag check failed: expected true, got {}\n", sym->debug ? "true" : "false");
                success = false;
            }
    
            if (StrCmp(&sym->function_mangled_name, "_Z4main", 7) != 0) {
                WriteFmt("[DEBUG] Mangled name check failed: expected '_Z4main', got '");
                for (size i = 0; i < StrLen(&sym->function_mangled_name); i++) {
                    WriteFmt("{c}", StrBegin(&sym->function_mangled_name)[i]);
                WriteFmt("[DEBUG] Mangled name check failed: expected '_Z4main', got '");
                for (size i = 0; i < StrLen(&sym->function_mangled_name); i++) {
                    WriteFmt("{c}", StrBegin(&sym->function_mangled_name)[i]);
                }
                WriteFmt("'\n");
                    WriteFmt("{c}", StrBegin(&sym->function_mangled_name)[i]);
                }
                WriteFmt("'\n");
                success = false;
            }
    // Test 1: Simple string parsing
    bool test_simple_string_parsing(void) {
        WriteFmt("Testing simple string parsing\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        if (StrCmp(&name, "Alice", 5) != 0) {
            WriteFmt("[DEBUG] Name check failed: expected 'Alice', got '");
            for (size i = 0; i < StrLen(&name); i++) {
                WriteFmt("{c}", StrBegin(&name)[i]);
            WriteFmt("[DEBUG] Name check failed: expected 'Alice', got '");
            for (size i = 0; i < StrLen(&name); i++) {
                WriteFmt("{c}", StrBegin(&name)[i]);
            }
            WriteFmt("'\n");
                WriteFmt("{c}", StrBegin(&name)[i]);
            }
            WriteFmt("'\n");
            success = false;
        }
    
        if (StrCmp(&city, "New York", 8) != 0) {
            WriteFmt("[DEBUG] City check failed: expected 'New York', got '");
            for (size i = 0; i < StrLen(&city); i++) {
                WriteFmt("{c}", StrBegin(&city)[i]);
            WriteFmt("[DEBUG] City check failed: expected 'New York', got '");
            for (size i = 0; i < StrLen(&city); i++) {
                WriteFmt("{c}", StrBegin(&city)[i]);
            }
            WriteFmt("'\n");
                WriteFmt("{c}", StrBegin(&city)[i]);
            }
            WriteFmt("'\n");
            success = false;
        }
    // Test 2: Simple number parsing
    bool test_simple_numbers(void) {
        WriteFmt("Testing simple number parsing\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        if (count != 42) {
            WriteFmt("[DEBUG] Count check failed: expected 42, got {}\n", count);
            success = false;
        }
    
        if (!(score > 95.4 && score < 95.6)) {
            WriteFmt("[DEBUG] Score check failed: expected ~95.5, got {}\n", score);
            success = false;
        }
    
        if (year != 2024) {
            WriteFmt("[DEBUG] Year check failed: expected 2024, got {}\n", year);
            success = false;
        }
    // Test 3: Simple boolean parsing
    bool test_simple_boolean(void) {
        WriteFmt("Testing simple boolean parsing\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        if (enabled != true) {
            WriteFmt("[DEBUG] Enabled check failed: expected true, got {}\n", enabled ? "true" : "false");
            success = false;
        }
    
        if (visible != false) {
            WriteFmt("[DEBUG] Visible check failed: expected false, got {}\n", visible ? "true" : "false");
            success = false;
        }
    // Test 4: Simple person object
    bool test_simple_person_object(void) {
        WriteFmt("Testing simple person object\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        if (person.id != 1001) {
            WriteFmt("[DEBUG] Person ID check failed: expected 1001, got {}\n", person.id);
            success = false;
        }
    
        if (StrCmp(&person.name, "Bob", 3) != 0) {
            WriteFmt("[DEBUG] Person name check failed: expected 'Bob', got '");
            for (size i = 0; i < StrLen(&person.name); i++) {
                WriteFmt("{c}", StrBegin(&person.name)[i]);
            WriteFmt("[DEBUG] Person name check failed: expected 'Bob', got '");
            for (size i = 0; i < StrLen(&person.name); i++) {
                WriteFmt("{c}", StrBegin(&person.name)[i]);
            }
            WriteFmt("'\n");
                WriteFmt("{c}", StrBegin(&person.name)[i]);
            }
            WriteFmt("'\n");
            success = false;
        }
    
        if (person.age != 25) {
            WriteFmt("[DEBUG] Person age check failed: expected 25, got {}\n", person.age);
            success = false;
        }
    
        if (person.is_active != true) {
            WriteFmt("[DEBUG] Person is_active check failed: expected true, got {}\n", person.is_active ? "true" : "false");
            success = false;
        }
    
        if (!(person.salary > 49999.0 && person.salary < 50001.0)) {
            WriteFmt("[DEBUG] Person salary check failed: expected ~50000.0, got {}\n", person.salary);
            success = false;
        }
    // Test 5: Simple config object
    bool test_simple_config_object(void) {
        WriteFmt("Testing simple config object\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        if (config.debug_mode != false) {
            WriteFmt("[DEBUG] Debug mode check failed: expected false, got {}\n", config.debug_mode ? "true" : "false");
            success = false;
        }
    
        if (config.timeout != 30) {
            WriteFmt("[DEBUG] Timeout check failed: expected 30, got {}\n", config.timeout);
            success = false;
        }
    
        if (StrCmp(&config.log_level, "INFO", 4) != 0) {
            WriteFmt("[DEBUG] Log level check failed: expected 'INFO', got '");
            for (size i = 0; i < StrLen(&config.log_level); i++) {
                WriteFmt("{c}", StrBegin(&config.log_level)[i]);
            WriteFmt("[DEBUG] Log level check failed: expected 'INFO', got '");
            for (size i = 0; i < StrLen(&config.log_level); i++) {
                WriteFmt("{c}", StrBegin(&config.log_level)[i]);
            }
            WriteFmt("'\n");
                WriteFmt("{c}", StrBegin(&config.log_level)[i]);
            }
            WriteFmt("'\n");
            success = false;
        }
    // Test 6: Simple array of strings
    bool test_simple_array_of_strings(void) {
        WriteFmt("Testing simple array of strings\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        if (VecLen(&languages) != 3) {
            WriteFmt("[DEBUG] Languages length check failed: expected 3, got {}\n", VecLen(&languages));
            success = false;
        }
    
            if (StrCmp(lang1, "C", 1) != 0) {
                WriteFmt("[DEBUG] Language 1 check failed: expected 'C', got '");
                for (size i = 0; i < StrLen(lang1); i++) {
                    WriteFmt("{c}", StrBegin(lang1)[i]);
                WriteFmt("[DEBUG] Language 1 check failed: expected 'C', got '");
                for (size i = 0; i < StrLen(lang1); i++) {
                    WriteFmt("{c}", StrBegin(lang1)[i]);
                }
                WriteFmt("'\n");
                    WriteFmt("{c}", StrBegin(lang1)[i]);
                }
                WriteFmt("'\n");
                success = false;
            }
    
            if (StrCmp(lang2, "Python", 6) != 0) {
                WriteFmt("[DEBUG] Language 2 check failed: expected 'Python', got '");
                for (size i = 0; i < StrLen(lang2); i++) {
                    WriteFmt("{c}", StrBegin(lang2)[i]);
                WriteFmt("[DEBUG] Language 2 check failed: expected 'Python', got '");
                for (size i = 0; i < StrLen(lang2); i++) {
                    WriteFmt("{c}", StrBegin(lang2)[i]);
                }
                WriteFmt("'\n");
                    WriteFmt("{c}", StrBegin(lang2)[i]);
                }
                WriteFmt("'\n");
                success = false;
            }
    
            if (StrCmp(lang3, "Rust", 4) != 0) {
                WriteFmt("[DEBUG] Language 3 check failed: expected 'Rust', got '");
                for (size i = 0; i < StrLen(lang3); i++) {
                    WriteFmt("{c}", StrBegin(lang3)[i]);
                WriteFmt("[DEBUG] Language 3 check failed: expected 'Rust', got '");
                for (size i = 0; i < StrLen(lang3); i++) {
                    WriteFmt("{c}", StrBegin(lang3)[i]);
                }
                WriteFmt("'\n");
                    WriteFmt("{c}", StrBegin(lang3)[i]);
                }
                WriteFmt("'\n");
                success = false;
            }
    // Test 7: Simple nested object (1 level)
    bool test_simple_nested_object(void) {
        WriteFmt("Testing simple nested object\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        if (StrCmp(&data.user.name, "Charlie", 7) != 0) {
            WriteFmt("[DEBUG] User name check failed: expected 'Charlie', got '");
            for (size i = 0; i < StrLen(&data.user.name); i++) {
                WriteFmt("{c}", StrBegin(&data.user.name)[i]);
            WriteFmt("[DEBUG] User name check failed: expected 'Charlie', got '");
            for (size i = 0; i < StrLen(&data.user.name); i++) {
                WriteFmt("{c}", StrBegin(&data.user.name)[i]);
            }
            WriteFmt("'\n");
                WriteFmt("{c}", StrBegin(&data.user.name)[i]);
            }
            WriteFmt("'\n");
            success = false;
        }
    
        if (StrCmp(&data.user.email, "charlie@example.com", 19) != 0) {
            WriteFmt("[DEBUG] User email check failed: expected 'charlie@example.com', got '");
            for (size i = 0; i < StrLen(&data.user.email); i++) {
                WriteFmt("{c}", StrBegin(&data.user.email)[i]);
            WriteFmt("[DEBUG] User email check failed: expected 'charlie@example.com', got '");
            for (size i = 0; i < StrLen(&data.user.email); i++) {
                WriteFmt("{c}", StrBegin(&data.user.email)[i]);
            }
            WriteFmt("'\n");
                WriteFmt("{c}", StrBegin(&data.user.email)[i]);
            }
            WriteFmt("'\n");
            success = false;
        }
    
        if (data.active != true) {
            WriteFmt("[DEBUG] Active check failed: expected true, got {}\n", data.active ? "true" : "false");
            success = false;
        }
    // Test 8: Simple product with tags array
    bool test_simple_product_with_tags(void) {
        WriteFmt("Testing simple product with tags array\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        if (product.id != 12345) {
            WriteFmt("[DEBUG] Product ID check failed: expected 12345, got {}\n", product.id);
            success = false;
        }
    
        if (StrCmp(&product.name, "Laptop", 6) != 0) {
            WriteFmt("[DEBUG] Product name check failed: expected 'Laptop', got '");
            for (size i = 0; i < StrLen(&product.name); i++) {
                WriteFmt("{c}", StrBegin(&product.name)[i]);
            WriteFmt("[DEBUG] Product name check failed: expected 'Laptop', got '");
            for (size i = 0; i < StrLen(&product.name); i++) {
                WriteFmt("{c}", StrBegin(&product.name)[i]);
            }
            WriteFmt("'\n");
                WriteFmt("{c}", StrBegin(&product.name)[i]);
            }
            WriteFmt("'\n");
            success = false;
        }
    
        if (!(product.price > 999.98 && product.price < 1000.0)) {
            WriteFmt("[DEBUG] Product price check failed: expected ~999.99, got {}\n", product.price);
            success = false;
        }
    
        if (VecLen(&product.tags) != 3) {
            WriteFmt("[DEBUG] Product tags length check failed: expected 3, got {}\n", VecLen(&product.tags));
            success = false;
        }
    
            if (StrCmp(tag1, "electronics", 11) != 0) {
                WriteFmt("[DEBUG] Tag 1 check failed: expected 'electronics', got '");
                for (size i = 0; i < StrLen(tag1); i++) {
                    WriteFmt("{c}", StrBegin(tag1)[i]);
                WriteFmt("[DEBUG] Tag 1 check failed: expected 'electronics', got '");
                for (size i = 0; i < StrLen(tag1); i++) {
                    WriteFmt("{c}", StrBegin(tag1)[i]);
                }
                WriteFmt("'\n");
                    WriteFmt("{c}", StrBegin(tag1)[i]);
                }
                WriteFmt("'\n");
                success = false;
            }
    
            if (StrCmp(tag2, "computers", 9) != 0) {
                WriteFmt("[DEBUG] Tag 2 check failed: expected 'computers', got '");
                for (size i = 0; i < StrLen(tag2); i++) {
                    WriteFmt("{c}", StrBegin(tag2)[i]);
                WriteFmt("[DEBUG] Tag 2 check failed: expected 'computers', got '");
                for (size i = 0; i < StrLen(tag2); i++) {
                    WriteFmt("{c}", StrBegin(tag2)[i]);
                }
                WriteFmt("'\n");
                    WriteFmt("{c}", StrBegin(tag2)[i]);
                }
                WriteFmt("'\n");
                success = false;
            }
    
            if (StrCmp(tag3, "portable", 8) != 0) {
                WriteFmt("[DEBUG] Tag 3 check failed: expected 'portable', got '");
                for (size i = 0; i < StrLen(tag3); i++) {
                    WriteFmt("{c}", StrBegin(tag3)[i]);
                WriteFmt("[DEBUG] Tag 3 check failed: expected 'portable', got '");
                for (size i = 0; i < StrLen(tag3); i++) {
                    WriteFmt("{c}", StrBegin(tag3)[i]);
                }
                WriteFmt("'\n");
                    WriteFmt("{c}", StrBegin(tag3)[i]);
                }
                WriteFmt("'\n");
                success = false;
            }
        };
    
        WriteFmt("[INFO] Starting KvConfig.Parse tests\n\n");
        return run_test_suite(tests, (int)(sizeof(tests) / sizeof(tests[0])), NULL, 0, "KvConfig.Parse");
    }
    // Test StrPopBack function
    bool test_str_pop_back(void) {
        WriteFmt("Testing StrPopBack\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrPopFront function
    bool test_str_pop_front(void) {
        WriteFmt("Testing StrPopFront\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrRemove function
    bool test_str_remove(void) {
        WriteFmt("Testing StrRemove\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrRemoveRange function
    bool test_str_remove_range(void) {
        WriteFmt("Testing StrRemoveRange\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrDeleteLastChar function
    bool test_str_delete_last_char(void) {
        WriteFmt("Testing StrDeleteLastChar\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrDelete function
    bool test_str_delete(void) {
        WriteFmt("Testing StrDelete\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrDeleteRange function
    bool test_str_delete_range(void) {
        WriteFmt("Testing StrDeleteRange\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Main function that runs all tests
    int main(void) {
        WriteFmt("[INFO] Starting Str.Remove tests\n\n");
    
        // Array of test functions
    
    int main(void) {
        WriteFmt("[INFO] Starting Http tests\n\n");
    
        TestFunction tests[] = {
        };
    
        WriteFmt("[INFO] Starting Map.Insert tests\n\n");
        return run_test_suite(tests, (int)(sizeof(tests) / sizeof(tests[0])), NULL, 0, "Map.Insert");
    }
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecShrinkToFit\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecReserve\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecSwap\n");
    
        BitVec bv1 = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecClone\n");
    
        BitVec original = BitVecInit(ALLOCATOR_OF(&alloc));
    
    bool test_bitvec_clone_inherits_allocator_config(void) {
        WriteFmt("Testing BitVecClone allocator inheritance\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecShrinkToFit edge cases\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecReserve edge cases\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecSwap edge cases\n");
    
        BitVec bv1    = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecClone edge cases\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec memory stress test\n");
    
        bool result = true;
    // Deadend tests
    bool test_bitvec_memory_null_failures(void) {
        WriteFmt("Testing BitVec memory NULL pointer handling\n");
    
        // Test NULL bitvec pointer - should abort
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec swap NULL handling\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
    
    bool test_bitvec_clone_null_failures(void) {
        WriteFmt("Testing BitVec clone NULL handling\n");
    
        // Test NULL pointer - should abort
    // Main function that runs all tests
    int main(void) {
        WriteFmt("[INFO] Starting BitVec.Memory tests\n\n");
    
        // Array of normal test functions
    
    bool test_int_bit_length(void) {
        WriteFmt("Testing IntBitLength\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_byte_length(void) {
        WriteFmt("Testing IntByteLength\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_is_zero(void) {
        WriteFmt("Testing IntIsZero\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_is_one(void) {
        WriteFmt("Testing IntIsOne\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_parity(void) {
        WriteFmt("Testing Int parity helpers\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_fits_u64(void) {
        WriteFmt("Testing IntFitsU64\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_log2(void) {
        WriteFmt("Testing IntLog2\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_trailing_zero_count(void) {
        WriteFmt("Testing IntTrailingZeroCount\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_is_power_of_two(void) {
        WriteFmt("Testing IntIsPowerOfTwo\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_log2_zero(void) {
        WriteFmt("Testing IntLog2 zero handling\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    int main(void) {
        WriteFmt("[INFO] Starting Int.Access tests\n\n");
    
        TestFunction tests[] = {
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecAnd\n");
    
        BitVec bv1    = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecOr\n");
    
        BitVec bv1    = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecXor\n");
    
        BitVec bv1    = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecNot\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecShiftLeft\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecShiftRight\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecRotateLeft\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecRotateRight\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecReverse\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec shift edge cases\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec rotate edge cases\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec bitwise operations edge cases\n");
    
        BitVec bv1    = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecReverse edge cases\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec comprehensive bitwise operations\n");
    
        BitVec bv1         = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec comprehensive shift operations\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec comprehensive rotate operations\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec bitwise identity operations\n");
    
        BitVec bv1         = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec bitwise commutative properties\n");
    
        BitVec bv1         = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec bitwise operations with large patterns\n");
    
        BitVec bv1         = BitVecInit(ALLOCATOR_OF(&alloc));
    // Main function that runs all tests
    int main(void) {
        WriteFmt("[INFO] Starting BitVec.BitWise tests\n\n");
    
        // Array of normal test functions
    // Test StrTryReduceSpace function
    bool test_str_try_reduce_space(void) {
        WriteFmt("Testing StrTryReduceSpace\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrSwapCharAt function
    bool test_str_swap_char_at(void) {
        WriteFmt("Testing StrSwapCharAt\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrResize function
    bool test_str_resize(void) {
        WriteFmt("Testing StrResize\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrReserve function
    bool test_str_reserve(void) {
        WriteFmt("Testing StrReserve\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrClear function
    bool test_str_clear(void) {
        WriteFmt("Testing StrClear\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrReverse function
    bool test_str_reverse(void) {
        WriteFmt("Testing StrReverse\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Main function that runs all tests
    int main(void) {
        WriteFmt("[INFO] Starting Str.Memory tests\n\n");
    
        // Array of test functions
    
    static bool test_graph_access_helpers(void) {
        WriteFmt("Testing Graph access helpers\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_graph_has_edge_query(void) {
        WriteFmt("Testing GraphHasEdge\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_graph_cross_graph_node_handle_deadend(void) {
        WriteFmt("Testing GraphNodeData rejects foreign graph node handles (should abort)\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_graph_predecessor_access_oob_deadend(void) {
        WriteFmt("Testing GraphPredecessorAt out-of-bounds access (should abort)\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_graph_neighbor_access_oob_deadend(void) {
        WriteFmt("Testing GraphNeighborAt out-of-bounds access (should abort)\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
        };
    
        WriteFmt("[INFO] Starting Graph.Access tests\n\n");
        return run_test_suite(
            tests,
    
    static bool test_graph_type_defaults(void) {
        WriteFmt("Testing Graph defaults\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_graph_aligned_init_and_id_layout(void) {
        WriteFmt("Testing Graph aligned init and node id layout\n");
    
        HeapAllocator alloc = HeapAllocatorInitAligned(32);
        };
    
        WriteFmt("[INFO] Starting Graph.Type tests\n\n");
        return run_test_suite(tests, (int)(sizeof(tests) / sizeof(tests[0])), NULL, 0, "Graph.Type");
    }
    // Test string comparison functions
    bool test_str_cmp(void) {
        WriteFmt("Testing StrCmp variants\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test string find functions
    bool test_str_find(void) {
        WriteFmt("Testing StrFind variants\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test string contains/index functions
    bool test_str_contains_index(void) {
        WriteFmt("Testing StrContains and StrIndexOf variants\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test string starts/ends with functions
    bool test_str_starts_ends_with(void) {
        WriteFmt("Testing StrStartsWith and StrEndsWith variants\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test string replace functions
    bool test_str_replace(void) {
        WriteFmt("Testing StrReplace variants\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test string split functions
    bool test_str_split(void) {
        WriteFmt("Testing StrSplit and StrSplitToIters\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test string strip functions
    bool test_str_strip(void) {
        WriteFmt("Testing StrStrip variants\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Main function that runs all tests
    int main(void) {
        WriteFmt("[INFO] Starting Str.Ops tests\n\n");
    
        // Array of test functions
    
    bool test_int_from_unsigned_integer(void) {
        WriteFmt("Testing IntFrom with unsigned integer\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_bytes_le_round_trip(void) {
        WriteFmt("Testing Int little-endian byte conversion\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_bytes_be_round_trip(void) {
        WriteFmt("Testing Int big-endian byte conversion\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_binary_round_trip(void) {
        WriteFmt("Testing Int binary round trip\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_decimal_round_trip(void) {
        WriteFmt("Testing Int decimal round trip\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_radix_round_trip(void) {
        WriteFmt("Testing Int radix conversion round trip\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_upper_hex_radix(void) {
        WriteFmt("Testing Int uppercase radix conversion\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_try_to_str_allocator_inheritance(void) {
        WriteFmt("Testing IntTryToStr allocator behavior\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_compare_ignores_leading_zeros(void) {
        WriteFmt("Testing IntCompare leading-zero normalization\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_zero_binary(void) {
        WriteFmt("Testing Int zero binary conversion\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_binary_prefix_and_separators(void) {
        WriteFmt("Testing Int binary prefix and separators\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_octal_round_trip(void) {
        WriteFmt("Testing Int octal round trip\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_hex_round_trip(void) {
        WriteFmt("Testing Int hex round trip\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_from_binary_invalid_digit(void) {
        WriteFmt("Testing IntFromBinary invalid digit handling\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_from_decimal_invalid_digit(void) {
        WriteFmt("Testing IntFromStr invalid digit handling\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_from_hex_invalid_digit(void) {
        WriteFmt("Testing IntFromHexStr invalid digit handling\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_from_radix_invalid_digit(void) {
        WriteFmt("Testing IntFromStrRadix invalid digit handling\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_from_radix_invalid_radix(void) {
        WriteFmt("Testing IntFromStrRadix invalid radix handling\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_to_u64_overflow(void) {
        WriteFmt("Testing IntToU64 overflow handling\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_to_str_radix_invalid_radix(void) {
        WriteFmt("Testing IntToStrRadix invalid radix handling\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_from_binary_null(void) {
        WriteFmt("Testing IntFromBinary NULL handling\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_from_decimal_null(void) {
        WriteFmt("Testing IntFromStr NULL handling\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_from_radix_null(void) {
        WriteFmt("Testing IntFromStrRadix NULL handling\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_from_octal_null(void) {
        WriteFmt("Testing IntFromOctStr NULL handling\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_from_hex_null(void) {
        WriteFmt("Testing IntFromHexStr NULL handling\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_from_bytes_le_null(void) {
        WriteFmt("Testing IntFromBytesLE NULL handling\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_to_bytes_le_null(void) {
        WriteFmt("Testing IntToBytesLE NULL handling\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_to_bytes_be_zero_max_len(void) {
        WriteFmt("Testing IntToBytesBE zero max_len handling\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    int main(void) {
        WriteFmt("[INFO] Starting Int.Convert tests\n\n");
    
        TestFunction tests[] = {
    
    bool test_bitvec_run_lengths_null_bv(void) {
        WriteFmt("Testing BitVecRunLengths with NULL bitvector\n");
    
        u64  runs[5];
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecRunLengths with NULL runs array\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecRunLengths with NULL values array\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecRunLengths with zero max_runs\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec foreach with invalid bitvec\n");
    
        // Test foreach with invalid bitvec (length > 0 but data is NULL)
    // Main function that runs all deadend tests
    int main(void) {
        WriteFmt("[INFO] Starting BitVec.Foreach.Deadend tests\n\n");
    
        // Array of deadend test functions
    
    static bool test_list_init_variants(void) {
        WriteFmt("Testing List init variants\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_list_init_optional_allocator(void) {
        WriteFmt("Testing List init optional allocator\n");
    
        typedef List(int) IntList;
    
    static bool test_list_deinit_with_deep_copy(void) {
        WriteFmt("Testing ListDeinit with deep copy\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
        };
    
        WriteFmt("[INFO] Starting List.Init tests\n\n");
        return run_test_suite(tests, (int)(sizeof(tests) / sizeof(tests[0])), NULL, 0, "List.Init");
    }
    
    int main(void) {
        WriteFmt("[INFO] Starting PdbCache tests\n\n");
    
        TestFunction tests[] = {
    
    static bool test_list_insert_and_push_aliases(void) {
        WriteFmt("Testing List insert and push aliases\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_list_push_arr_l_zeroes_all_items(void) {
        WriteFmt("Testing ListPushArrL zeroes all transferred items\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_list_push_arr_zero_count_is_noop(void) {
        WriteFmt("Testing ListPushArrL zero-count contract\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_list_insert_with_deep_copy(void) {
        WriteFmt("Testing List insert with deep copy\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_list_merge_l_preserves_source_hooks_for_reuse(void) {
        WriteFmt("Testing ListMergeL preserves source hooks for reuse\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_list_merge_variants(void) {
        WriteFmt("Testing List merge variants\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_list_merge_edge_cases(void) {
        WriteFmt("Testing List merge edge cases\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
        };
    
        WriteFmt("[INFO] Starting List.Insert tests\n\n");
        return run_test_suite(tests, (int)(sizeof(tests) / sizeof(tests[0])), NULL, 0, "List.Insert");
    }
    
    int main(void) {
        WriteFmt("[INFO] Starting Backtrace tests\n\n");
    
        TestFunction tests[] = {
    
    bool test_int_init(void) {
        WriteFmt("Testing IntInit\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_clear(void) {
        WriteFmt("Testing IntClear\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_clone(void) {
        WriteFmt("Testing IntClone\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_clone_inherits_allocator_config(void) {
        WriteFmt("Testing IntClone allocator inheritance\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    int main(void) {
        WriteFmt("[INFO] Starting Int.Type tests\n\n");
    
        TestFunction tests[] = {
    
    int main(void) {
        WriteFmt("[INFO] Starting SymbolResolver tests\n\n");
    
        TestFunction tests[] = {
        bool ok = (ps >= 4096) && ((ps & (ps - 1)) == 0);
        if (!ok) {
            WriteFmt("page size invalid: {}\n", ps);
        }
        return ok;
    
        if (PageAllocatorEntryCount(&alloc) != 0) {
            WriteFmt("init EntryCount != 0\n");
            ok = false;
        }
        }
        if (AllocatorFootprintBytes(&alloc) != 0) {
            WriteFmt("init Footprint != 0\n");
            ok = false;
        }
        void *p2 = AllocatorAlloc(alloc_base, page * 2, true);
        if (!p1 || !p2) {
            WriteFmt("alloc failed\n");
            ok = false;
        }
        }
        if (PageAllocatorEntryCount(&alloc) != 2) {
            WriteFmt("after 2 allocs EntryCount={} want 2\n", (u64)PageAllocatorEntryCount(&alloc));
            ok = false;
        }
        size foot_with_two = AllocatorFootprintBytes(&alloc);
        if (foot_with_two < page + page * 2) {
            WriteFmt("foot_with_two={} want >= {}\n", (u64)foot_with_two, (u64)(page + page * 2));
            ok = false;
        }
        // EntryCount drops to 1 (p1 moved to free_entries[]).
        if (PageAllocatorEntryCount(&alloc) != 1) {
            WriteFmt("after free p1 EntryCount={} want 1\n", (u64)PageAllocatorEntryCount(&alloc));
            ok = false;
        }
        size foot_after_free_p1 = AllocatorFootprintBytes(&alloc);
        if (foot_after_free_p1 < foot_with_two) {
            WriteFmt("foot shrank after retention: {} < {}\n", (u64)foot_after_free_p1, (u64)foot_with_two);
            ok = false;
        }
        }
        if (PageAllocatorEntryCount(&alloc) != 0) {
            WriteFmt("after free p2 EntryCount={} want 0\n", (u64)PageAllocatorEntryCount(&alloc));
            ok = false;
        }
        }
        if (AllocatorFootprintBytes(&alloc) < foot_with_two) {
            WriteFmt("foot shrank after all-free\n");
            ok = false;
        }
        // Post-deinit the struct is zeroed: both accessors return 0.
        if (PageAllocatorEntryCount(&alloc) != 0) {
            WriteFmt("post-deinit EntryCount != 0\n");
            ok = false;
        }
        }
        if (AllocatorFootprintBytes(&alloc) != 0) {
            WriteFmt("post-deinit Footprint != 0\n");
            ok = false;
        }
    
    static bool test_list_foreach_basic(void) {
        WriteFmt("Testing basic List foreach macros\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_list_foreach_ranges(void) {
        WriteFmt("Testing ranged List foreach macros\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_list_foreach_range_edge_cases(void) {
        WriteFmt("Testing List ranged foreach edge cases\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_list_foreach_index_variants(void) {
        WriteFmt("Testing indexed List foreach macros\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_list_foreach_index_jump_contract(void) {
        WriteFmt("Testing indexed List foreach jump contract\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_list_foreach_empty_lists(void) {
        WriteFmt("Testing List foreach macros on empty list\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
        };
    
        WriteFmt("[INFO] Starting List.Foreach tests\n\n");
        return run_test_suite(tests, (int)(sizeof(tests) / sizeof(tests[0])), NULL, 0, "List.Foreach");
    }
    
    static bool test_list_clear_and_reuse(void) {
        WriteFmt("Testing ListClear and reuse\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_list_sort_and_reverse(void) {
        WriteFmt("Testing ListSort and ListReverse\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_list_sort_and_reverse_edge_cases(void) {
        WriteFmt("Testing ListSort and ListReverse edge cases\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_list_clear_with_deep_copy(void) {
        WriteFmt("Testing ListClear with deep copy\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
        };
    
        WriteFmt("[INFO] Starting List.Ops tests\n\n");
        return run_test_suite(tests, (int)(sizeof(tests) / sizeof(tests[0])), NULL, 0, "List.Ops");
    }
    // Test StrFromU64 function
    bool test_str_from_u64(void) {
        WriteFmt("Testing StrFromU64\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
        bool result = (ZstrCompare(StrBegin(&s), "12345") == 0);
        if (!result) {
            WriteFmt("    FAIL: Expected '12345', got '{}'\n", s);
        }
        result = result && (ZstrCompare(StrBegin(&s), "0xabcd") == 0);
        if (!result) {
            WriteFmt("    FAIL: Expected '0xabcd', got '{}'\n", s);
        }
        result = result && (ZstrCompare(StrBegin(&s), "0xABCD") == 0);
        if (!result) {
            WriteFmt("    FAIL: Expected '0xABCD', got '{}'\n", s);
        }
        result = result && (ZstrCompare(StrBegin(&s), "0b101010") == 0);
        if (!result) {
            WriteFmt("    FAIL: Expected '0b101010', got '{}'\n", s);
        }
        result = result && (ZstrCompare(StrBegin(&s), "0o52") == 0);
        if (!result) {
            WriteFmt("    FAIL: Expected '0o52', got '{}'\n", s);
        }
        result = result && (ZstrCompare(StrBegin(&s), "0") == 0);
        if (!result) {
            WriteFmt("    FAIL: Expected '0', got '{}'\n", s);
        }
    // Test StrFromI64 function
    bool test_str_from_i64(void) {
        WriteFmt("Testing StrFromI64\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
        bool result = (ZstrCompare(StrBegin(&s), "12345") == 0);
        if (!result) {
            WriteFmt("    FAIL: Expected '12345', got '{}'\n", StrBegin(&s));
        }
        result = result && (ZstrCompare(StrBegin(&s), "-12345") == 0);
        if (!result) {
            WriteFmt("    FAIL: Expected '-12345', got '{}'\n", StrBegin(&s));
        }
        result = result && (ZstrCompareN(StrBegin(&s), "0x", 2) == 0);
        if (!result) {
            WriteFmt("    FAIL: Expected hex prefix '0x', got '{}'\n", StrBegin(&s));
        }
        result = result && (ZstrCompare(StrBegin(&s), "0") == 0);
        if (!result) {
            WriteFmt("    FAIL: Expected '0', got '{}'\n", StrBegin(&s));
        }
        result = result && (ZstrCompare(StrBegin(&s), "0b101010") == 0);
        if (!result) {
            WriteFmt("    FAIL: Expected '0b101010', got '{}'\n", StrBegin(&s));
        }
    // Test StrFromF64 function
    bool test_str_from_f64(void) {
        WriteFmt("Testing StrFromF64\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
        bool result = (ZstrCompare(StrBegin(&s), "123.00") == 0);
        if (!result) {
            WriteFmt("    FAIL: Expected '123.00', got '{}'\n", StrBegin(&s));
        }
        result = result && (ZstrCompare(StrBegin(&s), "123.456") == 0);
        if (!result) {
            WriteFmt("    FAIL: Expected '123.456', got '{}'\n", StrBegin(&s));
        }
    // Test StrToU64 function
    bool test_str_to_u64(void) {
        WriteFmt("Testing StrToU64\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrToI64 function
    bool test_str_to_i64(void) {
        WriteFmt("Testing StrToI64\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrToF64 function
    bool test_str_to_f64(void) {
        WriteFmt("Testing StrToF64\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Round-trip conversion tests
    bool test_str_round_trip_conversions(void) {
        WriteFmt("Testing Str round-trip conversions\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Edge case conversion tests
    bool test_str_edge_case_conversions(void) {
        WriteFmt("Testing Str edge case conversions\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Precision limits testing
    bool test_str_precision_limits(void) {
        WriteFmt("Testing Str precision limits\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Large-scale conversion tests
    bool test_str_all_base_support(void) {
        WriteFmt("Testing Str all bases 2-36 support\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_str_large_scale_conversions(void) {
        WriteFmt("Testing Str large-scale conversions\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Deadend tests for NULL pointer handling
    bool test_str_conversion_null_failures(void) {
        WriteFmt("Testing Str conversion NULL pointer handling\n");
    
        // Test NULL string pointer - should abort
    
    bool test_str_conversion_bounds_failures(void) {
        WriteFmt("Testing Str conversion bounds failures\n");
    
        // Test StrFromI64 with NULL pointer - should abort
    
    bool test_str_conversion_invalid_input_failures(void) {
        WriteFmt("Testing Str conversion invalid input failures\n");
    
        // Test StrFromF64 with NULL pointer - should abort
    // Main function that runs all tests
    int main(void) {
        WriteFmt("[INFO] Starting Str.Convert tests\n\n");
    
        // Array of normal test functions
    
    static bool test_graph_node_visit_scratch_state(void) {
        WriteFmt("Testing Graph node scratch visit state\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_graph_mark_delete_commit_and_reuse(void) {
        WriteFmt("Testing GraphMarkNodeForDeletion and GraphCommitChanges\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_graph_query_and_unmark_node_deletion(void) {
        WriteFmt("Testing Graph node mark query and unmark\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_graph_mark_edge_for_removal(void) {
        WriteFmt("Testing GraphMarkEdgeForRemoval and deferred edge commit\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_graph_query_and_unmark_edge_removal(void) {
        WriteFmt("Testing Graph edge mark query and unmark\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_graph_partial_unmark_of_multiple_edge_removals(void) {
        WriteFmt("Testing partial unmark of multiple pending edge removals\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_graph_self_loop_edge_removal(void) {
        WriteFmt("Testing deferred removal of self-loop edge\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_graph_edge_removal_and_node_deletion_overlap(void) {
        WriteFmt("Testing overlap between pending edge removal and node deletion\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_graph_external_indexed_state_requires_reset_on_reuse(void) {
        WriteFmt("Testing external slot-indexed state across delete and reuse\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_graph_stale_node_handle_after_commit_deadend(void) {
        WriteFmt("Testing stale GraphNode handle after commit (should abort)\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
        };
    
        WriteFmt("[INFO] Starting Graph.Ops tests\n\n");
        return run_test_suite(
            tests,
    
    bool test_float_compare_small_small(void) {
        WriteFmt("Testing FloatCompare with small floats\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_float_compare_very_large_large(void) {
        WriteFmt("Testing FloatCompare with very large floats\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_float_compare_very_large_small(void) {
        WriteFmt("Testing FloatCompare with very large and small floats\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_float_compare_wrappers(void) {
        WriteFmt("Testing Float compare macros\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_float_compare_generic(void) {
        WriteFmt("Testing FloatCompare generic dispatch\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Two construction paths for the same value must hash to the same bucket.
    bool test_float_hash_determinism(void) {
        WriteFmt("Testing float_hash determinism\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // +1.5e3 / -1.5e3 / 1.5e2 all land in distinct buckets.
    bool test_float_hash_distinguishes(void) {
        WriteFmt("Testing float_hash sensitivity to sign / exponent / magnitude\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // the GenericHash / GenericCompare-shaped helpers wire in directly.
    bool test_float_hash_as_map_key(void) {
        WriteFmt("Testing float_hash as Map<Float, u64> key\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    int main(void) {
        WriteFmt("[INFO] Starting Float.Compare tests\n\n");
    
        TestFunction tests[] = {
    // Test StrLen and StrEmpty functions
    bool test_str_len_empty(void) {
        WriteFmt("Testing StrLen and StrEmpty\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrFirst function
    bool test_str_first(void) {
        WriteFmt("Testing StrFirst\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrLast function
    bool test_str_last(void) {
        WriteFmt("Testing StrLast\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrBegin function
    bool test_str_begin(void) {
        WriteFmt("Testing StrBegin\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrEnd function
    bool test_str_end(void) {
        WriteFmt("Testing StrEnd\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrCharAt function
    bool test_str_char_at(void) {
        WriteFmt("Testing StrCharAt\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrCharPtrAt function
    bool test_str_char_ptr_at(void) {
        WriteFmt("Testing StrCharPtrAt\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Main function that runs all tests
    int main(void) {
        WriteFmt("[INFO] Starting Str.Access tests\n\n");
    
        // Array of test functions
    
    int main(void) {
        WriteFmt("[INFO] Starting Socket tests\n\n");
    
        TestFunction tests[] = {
    
    bool test_vec_swap_items(void) {
        WriteFmt("Testing VecSwapItems\n");
    
        // Create a vector of integers
    // Test VecReverse function
    bool test_vec_reverse(void) {
        WriteFmt("Testing VecReverse\n");
    
        // Create a vector of integers
    // Test VecSort function
    bool test_vec_sort(void) {
        WriteFmt("Testing VecSort\n");
    
        // Create a vector of integers
    int main(void) {
        alloc = DefaultAllocatorInit();
        WriteFmt("[INFO] Starting Vec.Ops tests\n\n");
    
        // Array of test functions
    
    int main(void) {
        WriteFmt("[INFO] Starting MachO tests\n\n");
    
        TestFunction tests[] = {
    
    int main(void) {
        WriteFmt("[INFO] Starting Elf tests\n\n");
    
        TestFunction tests[] = {
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecPush\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecInsert (single bit)\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecInsertRange\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecInsertMultiple\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecInsertPattern\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecInsertRange edge cases\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecInsertMultiple edge cases\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecInsertPattern edge cases\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
    // Deadend tests
    bool test_bitvec_insert_null_failures(void) {
        WriteFmt("Testing BitVec insert NULL pointer handling\n");
    
        // Test NULL bitvec pointer - should abort
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec insert invalid range handling\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
    
    bool test_bitvec_insert_pattern_null_failures(void) {
        WriteFmt("Testing BitVec insert pattern NULL handling\n");
    
        // Test NULL bitvec - should abort
    // Main function that runs all tests
    int main(void) {
        WriteFmt("[INFO] Starting BitVec.Insert tests\n\n");
    
        // Array of normal test functions
    
    bool test_user_type_write_basic(void) {
        WriteFmt("Testing user-type write through IOFMT_USER_CASE_\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_user_type_write_mixed_args(void) {
        WriteFmt("Testing user-type mixed with in-tree types\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_user_type_read_basic(void) {
        WriteFmt("Testing user-type read through IOFMT_USER_CASE_\n");
    
        Zstr    in = "(42, -9)";
    
    bool test_user_type_round_trip(void) {
        WriteFmt("Testing user-type write/read round-trip\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_nested_user_type_write(void) {
        WriteFmt("Testing user-type-in-user-type writer (Bounds embeds Point2D)\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_nested_user_type_round_trip(void) {
        WriteFmt("Testing nested user-type round-trip (Bounds)\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_deep_nested_user_type_write(void) {
        WriteFmt("Testing 3-level nested user-type writer (Region -> Bounds -> Point2D)\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_deep_nested_user_type_round_trip(void) {
        WriteFmt("Testing 3-level nested user-type round-trip (Region)\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_nested_user_type_mixed_with_builtins(void) {
        WriteFmt("Testing nested user types mixed with built-ins in one call\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    int main(void) {
        WriteFmt("[INFO] Starting Io.UserTypes tests\n\n");
    
        TestFunction tests[] = {
    
    int main(void) {
        WriteFmt("[INFO] Starting SysDns tests\n\n");
    
        TestFunction tests[] = {
    
    int main(void) {
        WriteFmt("[INFO] Starting AllocDebug tests\n\n");
    
        TestFunction normal[] = {
    
    bool test_vec_foreach(void) {
        WriteFmt("Testing VecForeach\n");
    
        // Create a vector of integers
    // Test VecForeachIdx macro
    bool test_vec_foreach_idx(void) {
        WriteFmt("Testing VecForeachIdx\n");
    
        // Create a vector of integers
    // Test VecForeachPtr macro
    bool test_vec_foreach_ptr(void) {
        WriteFmt("Testing VecForeachPtr\n");
    
        // Create a vector of integers
    // Test VecForeachPtrIdx macro
    bool test_vec_foreach_ptr_idx(void) {
        WriteFmt("Testing VecForeachPtrIdx\n");
    
        // Create a vector of integers
    // Test VecForeachReverse macro
    bool test_vec_foreach_reverse(void) {
        WriteFmt("Testing VecForeachReverse\n");
    
        // Create a vector of integers
    // Test VecForeachReverseIdx macro
    bool test_vec_foreach_reverse_idx(void) {
        WriteFmt("Testing VecForeachReverseIdx\n");
    
        // Create a vector of integers
    // Test VecForeachPtrReverse macro
    bool test_vec_foreach_ptr_reverse(void) {
        WriteFmt("Testing VecForeachPtrReverse\n");
    
        // Create a vector of integers
    // Test VecForeachPtrReverseIdx macro
    bool test_vec_foreach_ptr_reverse_idx(void) {
        WriteFmt("Testing VecForeachPtrReverseIdx\n");
    
        // Create a vector of integers
    // Make idx go out of bounds during VecForeach by modifying vector during iteration
    bool test_vec_foreach_out_of_bounds_access(void) {
        WriteFmt("Testing VecForeach where modification causes out of bounds access (should crash)\n");
    
        typedef Vec(int) IntVec;
        int iteration_count = 0;
        VecForeach(&vec, val) {
            WriteFmt("Iteration {} (vec.length={}): {}\n", iteration_count, VecLen(&vec), val);
    
            // After 2nd iteration, shrink the vector dramatically
            if (iteration_count == 2) {
                VecResize(&vec, 2); // Shrink to only 2 elements
                WriteFmt("Vector resized to length {} during foreach iteration...\n", VecLen(&vec));
            }
    // Make idx go out of bounds in VecForeachIdx by modifying vector during iteration
    bool test_vec_foreach_idx_out_of_bounds_access(void) {
        WriteFmt("Testing VecForeachIdx where idx goes out of bounds (should crash)\n");
    
        typedef Vec(int) IntVec;
        // VecForeachIdx has explicit bounds checking: if ((idx) >= (v)->length) LOG_FATAL(...)
        VecForeachIdx(&vec, val, idx) {
            WriteFmt("Accessing idx {} (vec.length={}): {}\n", idx, VecLen(&vec), val);
    
            // When we reach idx=2, drastically shrink the vector to make the current idx invalid
            if (idx == 2) {
                VecResize(&vec, 2); // Shrink so that idx=2 becomes out of bounds (valid indices: 0,1)
                WriteFmt("Vector resized to length {}, current idx={} is now out of bounds...\n", VecLen(&vec), idx);
            }
    // Make idx go out of bounds in VecForeachReverseIdx by modifying vector during iteration
    bool test_vec_foreach_reverse_idx_out_of_bounds_access(void) {
        WriteFmt("Testing VecForeachReverseIdx where idx goes out of bounds (should crash)\n");
    
        typedef Vec(int) IntVec;
        // VecForeachReverseIdx has explicit bounds checking: if ((idx) >= (v)->length) LOG_FATAL(...)
        VecForeachReverseIdx(&vec, val, idx) {
            WriteFmt("Accessing idx {} (vec.length={}): {}\n", idx, VecLen(&vec), val);
    
            // When we reach idx=4, drastically shrink the vector
            if (idx == 4) {
                VecResize(&vec, 2); // Shrink to only 2 elements
                WriteFmt("Vector resized to length {} during reverse iteration...\n", VecLen(&vec));
            }
    // Make idx go out of bounds in VecForeachPtrIdx by modifying vector during iteration
    bool test_vec_foreach_ptr_idx_out_of_bounds_access(void) {
        WriteFmt("Testing VecForeachPtrIdx where idx goes out of bounds (should crash)\n");
    
        typedef Vec(int) IntVec;
        // VecForeachPtrIdx has explicit bounds checking: if ((idx) >= (v)->length) LOG_FATAL(...)
        VecForeachPtrIdx(&vec, val_ptr, idx) {
            WriteFmt("Accessing idx {} (vec.length={}): {}\n", idx, VecLen(&vec), *val_ptr);
    
            // When we reach idx=3, shrink the vector to make the CURRENT idx invalid
            if (idx == 3) {
                VecResize(&vec, 3); // Shrink so that idx=3 becomes out of bounds (valid indices: 0,1,2)
                WriteFmt("Vector resized to length {}, current idx={} is now out of bounds...\n", VecLen(&vec), idx);
            }
    // Make idx go out of bounds in VecForeachPtrReverseIdx by modifying vector during iteration
    bool test_vec_foreach_ptr_reverse_idx_out_of_bounds_access(void) {
        WriteFmt("Testing VecForeachPtrReverseIdx where idx goes out of bounds (should crash)\n");
    
        typedef Vec(int) IntVec;
        // VecForeachPtrReverseIdx has explicit bounds checking: if ((idx) >= (v)->length) LOG_FATAL(...)
        VecForeachPtrReverseIdx(&vec, val_ptr, idx) {
            WriteFmt("Accessing idx {} (vec.length={}): {}\n", idx, VecLen(&vec), *val_ptr);
    
            // When we reach idx=5, shrink the vector significantly
            if (idx == 5) {
                VecResize(&vec, 3); // Shrink to only 3 elements
                WriteFmt("Vector resized to length {} during reverse ptr iteration...\n", VecLen(&vec));
            }
    // Make idx go out of bounds in VecForeachPtrInRangeIdx by modifying vector during iteration
    bool test_vec_foreach_ptr_in_range_idx_out_of_bounds_access(void) {
        WriteFmt("Testing VecForeachPtrInRangeIdx where idx goes out of bounds (should crash)\n");
    
        typedef Vec(int) IntVec;
        size original_length = VecLen(&vec); // Capture this as 9
        VecForeachPtrInRangeIdx(&vec, val_ptr, idx, 0, original_length) {
            WriteFmt("Accessing idx {} (vec.length={}): {}\n", idx, VecLen(&vec), *val_ptr);
    
            // When we reach idx=3, delete several elements
            if (idx == 3) {
                VecDeleteRange(&vec, 0, 6); // Remove first 6 elements
                WriteFmt("Deleted first 6 elements, new length={}, idx = {}\n", VecLen(&vec), original_length, idx);
            }
    // Make idx go out of bounds in basic VecForeachIdx by modifying vector during iteration
    bool test_vec_foreach_idx_basic_out_of_bounds_access(void) {
        WriteFmt("Testing basic VecForeachIdx where idx goes out of bounds (should crash)\n");
    
        typedef Vec(int) IntVec;
        // Basic VecForeachIdx now has explicit bounds checking: if ((idx) >= (v)->length) LOG_FATAL(...)
        VecForeachIdx(&vec, val, idx) {
            WriteFmt("Accessing idx {} (vec.length={}): {}\n", idx, VecLen(&vec), val);
    
            // When we reach idx=2, drastically shrink the vector
            if (idx == 2) {
                VecResize(&vec, 1); // Shrink to only 1 element
                WriteFmt("Vector resized to length {}, current index={}\n", VecLen(&vec), idx);
            }
    int main(void) {
        alloc = DefaultAllocatorInit();
        WriteFmt("[INFO] Starting Vec.Foreach.Simple tests\n\n");
    
        // Array of normal test functions
        };
    
        WriteFmt("[INFO] Starting Map.Foreach tests\n\n");
        return run_test_suite(tests, (int)(sizeof(tests) / sizeof(tests[0])), NULL, 0, "Map.Foreach");
    }
    
    int main(void) {
        WriteFmt("[INFO] Starting Buf tests\n\n");
        TestFunction tests[] = {
            test_buf_init_clear,
    // Test basic BitVec type functionality
    bool test_bitvec_type_basic(void) {
        WriteFmt("Testing basic BitVec type functionality\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test ValidateBitVec macro
    bool test_bitvec_validate(void) {
        WriteFmt("Testing ValidateBitVec macro\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Main function that runs all tests
    int main(void) {
        WriteFmt("[INFO] Starting BitVec.Type tests\n\n");
    
        // Array of test functions
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing basic BitVec pattern functions\n");
    
        BitVec source  = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecFindPattern function\n");
    
        BitVec source  = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecFindLastPattern function\n");
    
        BitVec source  = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecFindAllPattern function\n");
    
        BitVec source  = BitVecInit(ALLOCATOR_OF(&alloc));
        Allocator       *base  = ALLOCATOR_OF(&alloc);
    
        WriteFmt("Testing BitVecFindAllPattern Vec form\n");
    
        BitVec source  = BitVecInit(base);
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec pattern edge cases\n");
    
        BitVec source  = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec pattern stress tests\n");
    
        BitVec source  = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecStartsWith basic functionality\n");
    
        BitVec source = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecStartsWith edge cases\n");
    
        BitVec source = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecEndsWith basic functionality\n");
    
        BitVec source = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecEndsWith edge cases\n");
    
        BitVec source = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecFindPattern basic functionality\n");
    
        BitVec source  = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecContainsAt basic functionality\n");
    
        BitVec source  = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecContainsAt edge cases\n");
    
        BitVec source  = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecCountPattern basic functionality\n");
    
        BitVec source  = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecRFindPattern basic functionality\n");
    
        BitVec source  = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecReplace basic functionality\n");
    
        BitVec source      = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecReplaceAll basic functionality\n");
    
        BitVec source      = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecMatches basic functionality\n");
    
        BitVec source   = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecFuzzyMatch basic functionality\n");
    
        BitVec source  = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecRegexMatch basic functionality\n");
    
        BitVec source = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecPrefixMatch basic functionality\n");
    
        BitVec  source   = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecSuffixMatch basic functionality\n");
    
        BitVec  source   = BitVecInit(ALLOCATOR_OF(&alloc));
    // Main function that runs all tests
    int main(void) {
        WriteFmt("[INFO] Starting BitVec.Pattern.Simple tests\n\n");
    
        // Array of test functions
    
    bool test_integer_decimal_reading(void) {
        WriteFmt("Testing integer decimal reading\n");
    
        Zstr z = NULL;
    
    bool test_integer_hex_reading(void) {
        WriteFmt("Testing integer hexadecimal reading\n");
    
        Zstr z = NULL;
    
    bool test_integer_binary_reading(void) {
        WriteFmt("Testing integer binary reading\n");
    
        Zstr z = NULL;
    
    bool test_integer_octal_reading(void) {
        WriteFmt("Testing integer octal reading\n");
    
        Zstr z = NULL;
    
    bool test_float_basic_reading(void) {
        WriteFmt("Testing basic float reading\n");
    
        Zstr z = NULL;
    
    bool test_float_scientific_reading(void) {
        WriteFmt("Testing scientific notation reading\n");
    
        Zstr z = NULL;
    
    bool test_string_reading(void) {
        WriteFmt("Testing string reading\n");
    
        DefaultAllocator alloc      = DefaultAllocatorInit();
    
    bool test_multiple_arguments_reading(void) {
        WriteFmt("Testing multiple arguments reading\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // destination variable is left at its pre-read value on parse failure.
    bool test_error_handling_reading(void) {
        WriteFmt("Testing error handling for reading\n");
    
        Zstr z = NULL;
    
    bool test_character_ordinal_reading(void) {
        WriteFmt("Testing character ordinal reading with :c format specifier\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
        z         = "A";
        StrReadFmt(z, "{c}", u8_val);
        WriteFmt("u8_val = {}, expected = {}, pass = {}\n", u8_val, 'A', (u8_val == 'A') ? "true" : "false");
        success = success && (u8_val == 'A');
        z      = "z";
        StrReadFmt(z, "{c}", u8_val);
        WriteFmt("u8_val = {}, expected = {}, pass = {}\n", u8_val, 'z', (u8_val == 'z') ? "true" : "false");
        success = success && (u8_val == 'z');
        z         = "B";
        StrReadFmt(z, "{c}", i8_val);
        WriteFmt("i8_val = {}, expected = {}, pass = {}\n", i8_val, 'B', (i8_val == 'B') ? "true" : "false");
        success = success && (i8_val == 'B');
        z           = "C";
        StrReadFmt(z, "{c}", i16_val);
        WriteFmt("i16_val = {}, expected = {}, pass = {}\n", i16_val, 'C', (i16_val == 'C') ? "true" : "false");
        success = success && (i16_val == 'C');
        z           = "D";
        StrReadFmt(z, "{c}", i32_val);
        WriteFmt("i32_val = {}, expected = {}, pass = {}\n", i32_val, 'D', (i32_val == 'D') ? "true" : "false");
        success = success && (i32_val == 'D');
        z           = "E";
        StrReadFmt(z, "{c}", i64_val);
        WriteFmt("i64_val = {}, expected = {}, pass = {}\n", i64_val, 'E', (i64_val == 'E') ? "true" : "false");
        success = success && (i64_val == 'E');
        z           = "F";
        StrReadFmt(z, "{c}", u16_val);
        WriteFmt("u16_val = {}, expected = {}, pass = {}\n", u16_val, 'F', (u16_val == 'F') ? "true" : "false");
        success = success && (u16_val == 'F');
        z           = "G";
        StrReadFmt(z, "{c}", u32_val);
        WriteFmt("u32_val = {}, expected = {}, pass = {}\n", u32_val, 'G', (u32_val == 'G') ? "true" : "false");
        success = success && (u32_val == 'G');
        z           = "H";
        StrReadFmt(z, "{c}", u64_val);
        WriteFmt("u64_val = {}, expected = {}, pass = {}\n", u64_val, 'H', (u64_val == 'H') ? "true" : "false");
        success = success && (u64_val == 'H');
        StrReadFmt(z, "{c}", u16_val);
        bool u16_multi_pass = (ZstrCompareN((Zstr)&u16_val, "AB", 2) == 0);
        WriteFmt("u16_val multi-char test: comparing memory with 'AB', pass = {}\n", u16_multi_pass ? "true" : "false");
        WriteFmt(
            "DEBUG: u16_val bytes: [{}, {}], expected 'AB' bytes: [{}, {}]\n",
        bool u16_multi_pass = (ZstrCompareN((Zstr)&u16_val, "AB", 2) == 0);
        WriteFmt("u16_val multi-char test: comparing memory with 'AB', pass = {}\n", u16_multi_pass ? "true" : "false");
        WriteFmt(
            "DEBUG: u16_val bytes: [{}, {}], expected 'AB' bytes: [{}, {}]\n",
            (int)((u8 *)&u16_val)[0],
        StrReadFmt(z, "{c}", i16_val);
        bool i16_multi_pass = (ZstrCompareN((Zstr)&i16_val, "CD", 2) == 0);
        WriteFmt("i16_val multi-char test: comparing memory with 'CD', pass = {}\n", i16_multi_pass ? "true" : "false");
        success = success && i16_multi_pass;
        StrReadFmt(z, "{c}", u32_val);
        bool u32_multi_pass = (ZstrCompareN((Zstr)&u32_val, "EFGH", 4) == 0);
        WriteFmt("u32_val multi-char test: comparing memory with 'EFGH', pass = {}\n", u32_multi_pass ? "true" : "false");
        success = success && u32_multi_pass;
        StrReadFmt(z, "{c}", i32_val);
        bool i32_multi_pass = (ZstrCompareN((Zstr)&i32_val, "IJKL", 4) == 0);
        WriteFmt("i32_val multi-char test: comparing memory with 'IJKL', pass = {}\n", i32_multi_pass ? "true" : "false");
        success = success && i32_multi_pass;
        StrReadFmt(z, "{c}", u64_val);
        bool u64_multi_pass = (ZstrCompareN((Zstr)&u64_val, "MNOPQRST", 8) == 0);
        WriteFmt(
            "u64_val multi-char test: comparing memory with 'MNOPQRST', pass = {}\n",
            u64_multi_pass ? "true" : "false"
        StrReadFmt(z, "{c}", i64_val);
        bool i64_multi_pass = (ZstrCompareN((Zstr)&i64_val, "UVWXYZab", 8) == 0);
        WriteFmt(
            "i64_val multi-char test: comparing memory with 'UVWXYZab', pass = {}\n",
            i64_multi_pass ? "true" : "false"
        StrReadFmt(z, "{c}", f32_val);
        bool f32_pass = (f32_val == (f32)'A');
        WriteFmt("f32_val = {}, expected = {}, pass = {}\n", f32_val, (f32)'A', f32_pass ? "true" : "false");
        success = success && f32_pass;
        StrReadFmt(z, "{c}", f64_val);
        bool f64_pass = (f64_val == (f64)'B');
        WriteFmt("f64_val = {}, expected = {}, pass = {}\n", f64_val, (f64)'B', f64_pass ? "true" : "false");
        success = success && f64_pass;
        StrReadFmt(z, "{c}", u8_val);
        bool tilde_pass = (u8_val == '~');
        WriteFmt("u8_val = {}, expected = {} (~), pass = {}\n", u8_val, '~', tilde_pass ? "true" : "false");
        success = success && tilde_pass;
        StrReadFmt(z, "{c}", u32_val);
        bool xy_pass = (ZstrCompareN((Zstr)&u32_val, "XY", 2) == 0);
        WriteFmt("u32_val partial test: comparing memory with 'XY', pass = {}\n", xy_pass ? "true" : "false");
        success = success && xy_pass;
        StrReadFmt(z, "{c}", u64_val);
        bool abc_pass = (ZstrCompareN((Zstr)&u64_val, "abc", 3) == 0);
        WriteFmt("u64_val partial test: comparing memory with 'abc', pass = {}\n", abc_pass ? "true" : "false");
        success = success && abc_pass;
        Str  expected = StrInitFromZstr("Hello", &alloc);
        bool str_pass = (StrCmp(&str_val, &expected) == 0);
        WriteFmt("str_val test: comparing with 'Hello', pass = {}\n", str_pass ? "true" : "false");
        success = success && str_pass;
        StrDeinit(&expected);
        expected             = StrInitFromZstr("World", &alloc);
        bool quoted_str_pass = (StrCmp(&str_val, &expected) == 0);
        WriteFmt("quoted str_val test: comparing with 'World', pass = {}\n", quoted_str_pass ? "true" : "false");
        success = success && quoted_str_pass;
        StrDeinit(&expected);
        StrDeinit(&str_val);
    
        WriteFmt("Overall success: {}\n", success ? "true" : "false");
        DefaultAllocatorDeinit(&alloc);
        return success;
    
    bool test_string_case_conversion_reading(void) {
        WriteFmt("Testing string case conversion with :a and :A format specifiers\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
            StrReadFmt(z, "{a}", result);
    
            WriteFmt("Test 1 - :a (lowercase)\n");
            WriteFmt("Input: '{}', Output: '", in);
            for (size i = 0; i < StrLen(&result); i++) {
    
            WriteFmt("Test 1 - :a (lowercase)\n");
            WriteFmt("Input: '{}', Output: '", in);
            for (size i = 0; i < StrLen(&result); i++) {
                WriteFmt("{c}", StrBegin(&result)[i]);
            WriteFmt("Input: '{}', Output: '", in);
            for (size i = 0; i < StrLen(&result); i++) {
                WriteFmt("{c}", StrBegin(&result)[i]);
            }
            WriteFmt("'\n");
                WriteFmt("{c}", StrBegin(&result)[i]);
            }
            WriteFmt("'\n");
    
            // Should read "hello" (stops at first space)
            Str  expected   = StrInitFromZstr("hello world", &alloc);
            bool test1_pass = (StrCmp(&result, &expected) == 0);
            WriteFmt("Expected: 'hello', Pass: {}\n\n", test1_pass ? "true" : "false");
            success = success && test1_pass;
            StrReadFmt(z, "{as}", result);
    
            WriteFmt("Test 1.1 - :as (lowercase string single word)\n");
            WriteFmt("Input: '{}', Output: '", in);
            for (size i = 0; i < StrLen(&result); i++) {
    
            WriteFmt("Test 1.1 - :as (lowercase string single word)\n");
            WriteFmt("Input: '{}', Output: '", in);
            for (size i = 0; i < StrLen(&result); i++) {
                WriteFmt("{c}", StrBegin(&result)[i]);
            WriteFmt("Input: '{}', Output: '", in);
            for (size i = 0; i < StrLen(&result); i++) {
                WriteFmt("{c}", StrBegin(&result)[i]);
            }
            WriteFmt("'\n");
                WriteFmt("{c}", StrBegin(&result)[i]);
            }
            WriteFmt("'\n");
    
            // Should read "hello" (stops at first space)
            Str  expected   = StrInitFromZstr("hello", &alloc);
            bool test1_pass = (StrCmp(&result, &expected) == 0);
            WriteFmt("Expected: 'hello', Pass: {}\n\n", test1_pass ? "true" : "false");
            success = success && test1_pass;
            StrReadFmt(z, "{A}", result);
    
            WriteFmt("Test 2 - :A (uppercase)\n");
            WriteFmt("Input: '{}', Output: '", in);
            for (size i = 0; i < StrLen(&result); i++) {
    
            WriteFmt("Test 2 - :A (uppercase)\n");
            WriteFmt("Input: '{}', Output: '", in);
            for (size i = 0; i < StrLen(&result); i++) {
                WriteFmt("{c}", StrBegin(&result)[i]);
            WriteFmt("Input: '{}', Output: '", in);
            for (size i = 0; i < StrLen(&result); i++) {
                WriteFmt("{c}", StrBegin(&result)[i]);
            }
            WriteFmt("'\n");
                WriteFmt("{c}", StrBegin(&result)[i]);
            }
            WriteFmt("'\n");
    
            // Should read "HELLO" (stops at first space)
            Str  expected   = StrInitFromZstr("HELLO WORLD", &alloc);
            bool test2_pass = (StrCmp(&result, &expected) == 0);
            WriteFmt("Expected: 'HELLO', Pass: {}\n\n", test2_pass ? "true" : "false");
            success = success && test2_pass;
            StrReadFmt(z, "{A} {A}", result1, result2);
    
            WriteFmt("Test 2 - :A (uppercase with split format)\n");
            WriteFmt("Input: '{}', Output: '{} {}'", in, result1, result2);
    
            WriteFmt("Test 2 - :A (uppercase with split format)\n");
            WriteFmt("Input: '{}', Output: '{} {}'", in, result1, result2);
    
            bool test2_pass  = (StrCmp(&result1, "HELLO") == 0);
            bool test2_pass  = (StrCmp(&result1, "HELLO") == 0);
            test2_pass      &= (StrCmp(&result2, "WORLD") == 0);
            WriteFmt("Expected: 'HELLO WORLD', Pass: {}\n\n", test2_pass ? "true" : "false");
            success = success && test2_pass;
            // result2 must consume the space after hello and then everything after it
    
            WriteFmt("Test 2 - :A (uppercase with split format)\n");
            WriteFmt("Input: '{}', Output: '{}{}'", in, result1, result2);
    
            WriteFmt("Test 2 - :A (uppercase with split format)\n");
            WriteFmt("Input: '{}', Output: '{}{}'", in, result1, result2);
    
            bool test2_pass  = (StrCmp(&result1, "HELLO") == 0);
            bool test2_pass  = (StrCmp(&result1, "HELLO") == 0);
            test2_pass      &= (StrCmp(&result2, " WORLD MIGHTY MISRA") == 0); // notice the extra space
            WriteFmt("Expected: 'HELLO WORLD MIGHTY MISRA', Pass: {}\n\n", test2_pass ? "true" : "false");
            success = success && test2_pass;
            StrReadFmt(z, "{as}", result);
    
            WriteFmt("Test 3 - :a with quoted string\n");
            WriteFmt("Input: '{}', Output: '", in);
            for (size i = 0; i < StrLen(&result); i++) {
    
            WriteFmt("Test 3 - :a with quoted string\n");
            WriteFmt("Input: '{}', Output: '", in);
            for (size i = 0; i < StrLen(&result); i++) {
                WriteFmt("{c}", StrBegin(&result)[i]);
            WriteFmt("Input: '{}', Output: '", in);
            for (size i = 0; i < StrLen(&result); i++) {
                WriteFmt("{c}", StrBegin(&result)[i]);
            }
            WriteFmt("'\n");
                WriteFmt("{c}", StrBegin(&result)[i]);
            }
            WriteFmt("'\n");
    
            // Should read "mixed case" (converts the entire quoted string)
            Str  expected   = StrInitFromZstr("mixed case", &alloc);
            bool test3_pass = (StrCmp(&result, &expected) == 0);
            WriteFmt("Expected: 'mixed case', Pass: {}\n\n", test3_pass ? "true" : "false");
            success = success && test3_pass;
            StrReadFmt(z, "{As}", result);
    
            WriteFmt("Test 4 - :A with mixed alphanumeric\n");
            WriteFmt("Input: '{}', Output: '", in);
            for (size i = 0; i < StrLen(&result); i++) {
    
            WriteFmt("Test 4 - :A with mixed alphanumeric\n");
            WriteFmt("Input: '{}', Output: '", in);
            for (size i = 0; i < StrLen(&result); i++) {
                WriteFmt("{c}", StrBegin(&result)[i]);
            WriteFmt("Input: '{}', Output: '", in);
            for (size i = 0; i < StrLen(&result); i++) {
                WriteFmt("{c}", StrBegin(&result)[i]);
            }
            WriteFmt("'\n");
                WriteFmt("{c}", StrBegin(&result)[i]);
            }
            WriteFmt("'\n");
    
            // Should read "ABC123XYZ" (only letters are converted, numbers unchanged)
            Str  expected   = StrInitFromZstr("ABC123XYZ", &alloc);
            bool test4_pass = (StrCmp(&result, &expected) == 0);
            WriteFmt("Expected: 'ABC123XYZ', Pass: {}\n\n", test4_pass ? "true" : "false");
            success = success && test4_pass;
            StrReadFmt(z, "{c}", result);
    
            WriteFmt("Test 5 - :c (no case conversion)\n");
            WriteFmt("Input: '{}', Output: '", in);
            for (size i = 0; i < StrLen(&result); i++) {
    
            WriteFmt("Test 5 - :c (no case conversion)\n");
            WriteFmt("Input: '{}', Output: '", in);
            for (size i = 0; i < StrLen(&result); i++) {
                WriteFmt("{c}", StrBegin(&result)[i]);
            WriteFmt("Input: '{}', Output: '", in);
            for (size i = 0; i < StrLen(&result); i++) {
                WriteFmt("{c}", StrBegin(&result)[i]);
            }
            WriteFmt("'\n");
                WriteFmt("{c}", StrBegin(&result)[i]);
            }
            WriteFmt("'\n");
    
            // Should read "Hello" (stops at first space, no case conversion)
            Str  expected   = StrInitFromZstr("Hello World", &alloc);
            bool test5_pass = (StrCmp(&result, &expected) == 0);
            WriteFmt("Expected: 'Hello World', Pass: {}\n\n", test5_pass ? "true" : "false");
            success = success && test5_pass;
        }
    
        WriteFmt("Overall case conversion success: {}\n", success ? "true" : "false");
        DefaultAllocatorDeinit(&alloc);
        return success;
    
    bool test_bitvec_reading(void) {
        WriteFmt("Testing BitVec reading\n");
    
        DefaultAllocator alloc      = DefaultAllocatorInit();
        Str result1 = BitVecToStr(&bv1);
        success     = success && (ZstrCompare(StrBegin(&result1), "10110") == 0);
        WriteFmt(
            "Test 1 - Binary: {}, Success: {}\n",
            result1,
        u64 value2 = BitVecToInteger(&bv2);
        success    = success && (value2 == 0xDEAD);
        WriteFmt("Test 2 - Hex: {}, Success: {}\n", value2, (value2 == 0xDEAD) ? "true" : "false");
        BitVecDeinit(&bv2);
        u64 value3 = BitVecToInteger(&bv3);
        success    = success && (value3 == 0755);
        WriteFmt("Test 3 - Octal: {}, Success: {}\n", value3, (value3 == 0755) ? "true" : "false");
        BitVecDeinit(&bv3);
        Str result4 = BitVecToStr(&bv4);
        success     = success && (ZstrCompare(StrBegin(&result4), "1101") == 0);
        WriteFmt(
            "Test 4 - Whitespace: {}, Success: {}\n",
            result4,
        Str result5 = BitVecToStr(&bv5);
        success     = success && (ZstrCompare(StrBegin(&result5), "0") == 0);
        WriteFmt(
            "Test 5 - Zero: {}, Success: {}\n",
            result5,
        BitVecDeinit(&bv5);
    
        WriteFmt("Overall BitVec reading success: {}\n", success ? "true" : "false");
        DefaultAllocatorDeinit(&alloc);
        return success;
    
    bool test_int_reading(void) {
        WriteFmt("Testing Int reading\n");
    
        DefaultAllocator alloc      = DefaultAllocatorInit();
    
    bool test_float_reading(void) {
        WriteFmt("Testing Float reading\n");
    
        DefaultAllocator alloc      = DefaultAllocatorInit();
    
    int main(void) {
        WriteFmt("[INFO] Starting format reader tests\n\n");
    
        TestFunction tests[] = {
    
    int main(void) {
        WriteFmt("[INFO] Starting Dwarf tests\n\n");
    
        TestFunction tests[] = {
    
    int main(void) {
        WriteFmt("[INFO] Starting ProcMaps tests\n\n");
    
        TestFunction tests[] = {
    
    static bool test_validate_uninitialized_map_fails(void) {
        WriteFmt("Testing ValidateMap on uninitialized map\n");
    
        Map(int, int) map = {0};
    
    static bool test_map_contains_pair_without_value_compare_fails(void) {
        WriteFmt("Testing MapContainsPair without value comparator\n");
    
        typedef Map(int, int) IntIntMap;
    
    static bool test_map_remove_pair_without_value_compare_fails(void) {
        WriteFmt("Testing MapRemovePair without value comparator\n");
    
        typedef Map(int, int) IntIntMap;
    
    static bool test_map_remove_if_without_predicate_fails(void) {
        WriteFmt("Testing MapRemoveIf without predicate\n");
    
        typedef Map(int, int) IntIntMap;
    
    static bool test_map_retain_if_without_predicate_fails(void) {
        WriteFmt("Testing MapRetainIf without predicate\n");
    
        typedef Map(int, int) IntIntMap;
    
    static bool test_validate_map_policy_without_name_fails(void) {
        WriteFmt("Testing ValidateMapPolicy without name\n");
    
        MapPolicy policy = {
    
    static bool test_validate_map_policy_without_probe_limit_fails(void) {
        WriteFmt("Testing ValidateMapPolicy without probe limit\n");
    
        MapPolicy policy = {
        };
    
        WriteFmt("[INFO] Starting Map.Deadend tests\n\n");
        return run_test_suite(
            NULL,
    
    static bool test_graph_reserve_clear(void) {
        WriteFmt("Testing GraphReserve and GraphClear\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_graph_node_deep_copy(void) {
        WriteFmt("Testing Graph node deep-copy\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_graph_node_owned_str_rvalue(void) {
        WriteFmt("Testing Graph node owned Str r-value insertion\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_graph_init_optional_allocator(void) {
        WriteFmt("Testing Graph init optional allocator\n");
    
        typedef Graph(Str) StrGraph;
        };
    
        WriteFmt("[INFO] Starting Graph.Init tests\n\n");
        return run_test_suite(tests, (int)(sizeof(tests) / sizeof(tests[0])), NULL, 0, "Graph.Init");
    }
    
    bool test_float_init(void) {
        WriteFmt("Testing FloatInit\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_float_clear(void) {
        WriteFmt("Testing FloatClear\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_float_clone(void) {
        WriteFmt("Testing FloatClone\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_float_clone_inherits_allocator_config(void) {
        WriteFmt("Testing FloatClone allocator inheritance\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    int main(void) {
        WriteFmt("[INFO] Starting Float.Type tests\n\n");
    
        TestFunction tests[] = {
    
    bool test_float_from_unsigned_integer(void) {
        WriteFmt("Testing FloatFrom with unsigned integer\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_float_from_signed_integer(void) {
        WriteFmt("Testing FloatFrom with signed integer\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_float_from_int_container(void) {
        WriteFmt("Testing FloatFrom with Int container\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_float_to_int_exact(void) {
        WriteFmt("Testing FloatToInt exact conversion\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_float_to_int_fractional_failure(void) {
        WriteFmt("Testing FloatToInt fractional failure handling\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_float_to_int_negative_failure(void) {
        WriteFmt("Testing FloatToInt negative failure handling\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_float_string_round_trip(void) {
        WriteFmt("Testing Float string round trip\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_float_try_to_str_allocator_inheritance(void) {
        WriteFmt("Testing FloatTryToStr allocator behavior\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_float_very_large_string_round_trip(void) {
        WriteFmt("Testing Float very large string round trip\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_float_scientific_parse(void) {
        WriteFmt("Testing Float scientific parsing\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_float_from_str_invalid(void) {
        WriteFmt("Testing FloatFromStr invalid format handling\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_float_from_str_null(void) {
        WriteFmt("Testing FloatFromStr NULL handling\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    int main(void) {
        WriteFmt("[INFO] Starting Float.Convert tests\n\n");
    
        TestFunction tests[] = {
    
    bool test_basic_formatting(void) {
        WriteFmt("Testing basic formatting\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_string_formatting(void) {
        WriteFmt("Testing string formatting\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_integer_decimal_formatting(void) {
        WriteFmt("Testing integer decimal formatting\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_integer_hex_formatting(void) {
        WriteFmt("Testing integer hexadecimal formatting\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_integer_binary_formatting(void) {
        WriteFmt("Testing integer binary formatting\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_integer_octal_formatting(void) {
        WriteFmt("Testing integer octal formatting\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_float_basic_formatting(void) {
        WriteFmt("Testing basic floating point formatting\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_float_precision_formatting(void) {
        WriteFmt("Testing floating point precision formatting\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_float_special_values(void) {
        WriteFmt("Testing special floating point values\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_width_alignment_formatting(void) {
        WriteFmt("Testing width and alignment formatting\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_multiple_arguments(void) {
        WriteFmt("Testing multiple arguments\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_char_formatting(void) {
        WriteFmt("Testing character formatting specifiers\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_bitvec_formatting(void) {
        WriteFmt("Testing BitVec formatting\n");
    
        DefaultAllocator alloc      = DefaultAllocatorInit();
    
    bool test_int_formatting(void) {
        WriteFmt("Testing Int formatting\n");
    
        DefaultAllocator alloc      = DefaultAllocatorInit();
    
    bool test_float_formatting(void) {
        WriteFmt("Testing Float formatting\n");
    
        DefaultAllocator alloc      = DefaultAllocatorInit();
    
    int main(void) {
        WriteFmt("[INFO] Starting format writer tests\n\n");
    
        TestFunction tests[] = {
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecHammingDistance basic functionality\n");
    
        BitVec bv1    = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecHammingDistance edge cases\n");
    
        BitVec bv1    = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecJaccardSimilarity basic functionality\n");
    
        BitVec bv1    = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecJaccardSimilarity edge cases\n");
    
        BitVec bv1    = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecCosineSimilarity basic functionality\n");
    
        BitVec bv1    = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecCosineSimilarity edge cases\n");
    
        BitVec bv1    = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecDotProduct basic functionality\n");
    
        BitVec bv1    = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecDotProduct edge cases\n");
    
        BitVec bv1    = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecEditDistance basic functionality\n");
    
        BitVec bv1    = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecEditDistance edge cases\n");
    
        BitVec bv1    = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecCorrelation basic functionality\n");
    
        BitVec bv1    = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecCorrelation edge cases\n");
    
        BitVec bv1    = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecEntropy basic functionality\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecEntropy edge cases\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecAlignmentScore basic functionality\n");
    
        BitVec bv1    = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecAlignmentScore edge cases\n");
    
        BitVec bv1    = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecBestAlignment basic functionality\n");
    
        BitVec bv1    = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecBestAlignment edge cases\n");
    
        BitVec bv1    = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec Math stress tests\n");
    
        BitVec bv1    = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecHammingDistance(NULL, bv2) - should fatal\n");
        BitVec bv2 = BitVecInit(ALLOCATOR_OF(&alloc));
        BitVecPush(&bv2, true);
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecHammingDistance(bv1, NULL) - should fatal\n");
        BitVec bv1 = BitVecInit(ALLOCATOR_OF(&alloc));
        BitVecPush(&bv1, true);
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecJaccardSimilarity(NULL, bv2) - should fatal\n");
        BitVec bv2 = BitVecInit(ALLOCATOR_OF(&alloc));
        BitVecPush(&bv2, true);
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecJaccardSimilarity(bv1, NULL) - should fatal\n");
        BitVec bv1 = BitVecInit(ALLOCATOR_OF(&alloc));
        BitVecPush(&bv1, true);
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecCosineSimilarity(NULL, bv2) - should fatal\n");
        BitVec bv2 = BitVecInit(ALLOCATOR_OF(&alloc));
        BitVecPush(&bv2, true);
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecCosineSimilarity(bv1, NULL) - should fatal\n");
        BitVec bv1 = BitVecInit(ALLOCATOR_OF(&alloc));
        BitVecPush(&bv1, true);
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecDotProduct(NULL, bv2) - should fatal\n");
        BitVec bv2 = BitVecInit(ALLOCATOR_OF(&alloc));
        BitVecPush(&bv2, true);
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecDotProduct(bv1, NULL) - should fatal\n");
        BitVec bv1 = BitVecInit(ALLOCATOR_OF(&alloc));
        BitVecPush(&bv1, true);
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecEditDistance(NULL, bv2) - should fatal\n");
        BitVec bv2 = BitVecInit(ALLOCATOR_OF(&alloc));
        BitVecPush(&bv2, true);
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecEditDistance(bv1, NULL) - should fatal\n");
        BitVec bv1 = BitVecInit(ALLOCATOR_OF(&alloc));
        BitVecPush(&bv1, true);
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecCorrelation(NULL, bv2) - should fatal\n");
        BitVec bv2 = BitVecInit(ALLOCATOR_OF(&alloc));
        BitVecPush(&bv2, true);
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecCorrelation(bv1, NULL) - should fatal\n");
        BitVec bv1 = BitVecInit(ALLOCATOR_OF(&alloc));
        BitVecPush(&bv1, true);
    
    bool test_bitvec_entropy_null(void) {
        WriteFmt("Testing BitVecEntropy(NULL) - should fatal\n");
        BitVecEntropy(NULL);
        return true;
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecAlignmentScore(NULL, bv2, 1, -1) - should fatal\n");
        BitVec bv2 = BitVecInit(ALLOCATOR_OF(&alloc));
        BitVecPush(&bv2, true);
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecAlignmentScore(bv1, NULL, 1, -1) - should fatal\n");
        BitVec bv1 = BitVecInit(ALLOCATOR_OF(&alloc));
        BitVecPush(&bv1, true);
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecBestAlignment(NULL, bv2) - should fatal\n");
        BitVec bv2 = BitVecInit(ALLOCATOR_OF(&alloc));
        BitVecPush(&bv2, true);
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecBestAlignment(bv1, NULL) - should fatal\n");
        BitVec bv1 = BitVecInit(ALLOCATOR_OF(&alloc));
        BitVecPush(&bv1, true);
    // Main function that runs all tests
    int main(void) {
        WriteFmt("[INFO] Starting BitVec.Math tests\n\n");
    
        // Array of normal test functions
            // The static marker shouldn't be in .dynsym; if we got a name,
            // either the toolchain exported it or the strip didn't take.
            WriteFmt("[INFO] unexpected ELF symbol hit for static helper: {}\n", sym->name);
        }
    int main(int argc, char **argv) {
        if (argc < 2) {
            WriteFmt("usage: {} <path-to-stripped-binary>\n", argv[0]);
            return 1;
        }
        stripped_path_arg = argv[1];
    
        WriteFmt("[INFO] Stripped-binary resolve test against: {}\n\n", stripped_path_arg);
    
        TestFunction tests[] = {
    
    static bool test_list_len_empty(void) {
        WriteFmt("Testing ListLen and ListEmpty\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_list_value_access_and_swap(void) {
        WriteFmt("Testing List accessors and swap\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_list_node_access_and_navigation(void) {
        WriteFmt("Testing List node access and navigation\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_list_find_contains(void) {
        WriteFmt("Testing ListFind and ListContains\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
        };
    
        WriteFmt("[INFO] Starting List.Access tests\n\n");
        return run_test_suite(tests, (int)(sizeof(tests) / sizeof(tests[0])), NULL, 0, "List.Access");
    }
    // Deadend tests - testing NULL pointers and invalid conditions that should cause fatal errors
    bool test_bitvec_find_deadend_tests(void) {
        WriteFmt("Testing BitVecFind deadend scenarios\n");
    
        // This should cause LOG_FATAL and terminate the program
    
    bool test_bitvec_predicate_deadend_tests(void) {
        WriteFmt("Testing BitVec predicate deadend scenarios\n");
    
        // This should cause LOG_FATAL and terminate the program
    
    bool test_bitvec_longest_run_deadend_tests(void) {
        WriteFmt("Testing BitVecLongestRun deadend scenarios\n");
    
        // This should cause LOG_FATAL and terminate the program
    // Deadend tests
    bool test_bitvec_access_null_failures(void) {
        WriteFmt("Testing BitVec access NULL pointer handling\n");
    
        // Test NULL bitvec pointer - should abort
    
    bool test_bitvec_set_null_failures(void) {
        WriteFmt("Testing BitVec set NULL pointer handling\n");
    
        // Test NULL bitvec pointer - should abort
    
    bool test_bitvec_flip_null_failures(void) {
        WriteFmt("Testing BitVec flip NULL pointer handling\n");
    
        // Test NULL bitvec pointer - should abort
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec get bounds checking\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec set bounds checking\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec flip bounds checking\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec get with large out-of-bounds index\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec set with large out-of-bounds index\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec flip with edge case out-of-bounds index\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
    
    bool test_bitvec_count_null_failures(void) {
        WriteFmt("Testing BitVec count operations with NULL pointer\n");
    
        // Test NULL bitvec pointer - should abort
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec get with maximum index value\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
    // Main function that runs all deadend tests
    int main(void) {
        WriteFmt("[INFO] Starting BitVec.Access.Deadend tests\n\n");
    
        // Deadend tests that would cause program termination
    // Test StrInsertR function
    bool test_str_insert_char_at(void) {
        WriteFmt("Testing StrInsertR\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrInsertMany 4-arg (Cstr) form
    bool test_str_insert_cstr(void) {
        WriteFmt("Testing StrInsertMany (Cstr form)\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrInsertMany 3-arg Zstr form
    bool test_str_insert_zstr(void) {
        WriteFmt("Testing StrInsertMany (Zstr form)\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrInsertMany function
    bool test_str_push_cstr(void) {
        WriteFmt("Testing StrInsertMany\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrInsertMany function
    bool test_str_push_zstr(void) {
        WriteFmt("Testing StrInsertMany\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrPushBackMany function
    bool test_str_push_back_cstr(void) {
        WriteFmt("Testing StrPushBackMany\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrPushBackMany function
    bool test_str_push_back_zstr(void) {
        WriteFmt("Testing StrPushBackMany\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrPushFrontMany function
    bool test_str_push_front_cstr(void) {
        WriteFmt("Testing StrPushFrontMany\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrPushFrontMany function
    bool test_str_push_front_zstr(void) {
        WriteFmt("Testing StrPushFrontMany\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrPushBack function
    bool test_str_push_back(void) {
        WriteFmt("Testing StrPushBack\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrPushFront function
    bool test_str_push_front(void) {
        WriteFmt("Testing StrPushFront\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrMergeL function
    bool test_str_merge_l(void) {
        WriteFmt("Testing StrMergeL\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrMergeR function
    bool test_str_merge_r(void) {
        WriteFmt("Testing StrMergeR\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrMerge function (unsuffixed = L-form per convention; src zeroed).
    bool test_str_merge(void) {
        WriteFmt("Testing StrMerge\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // StrAppendf formatter.
    bool test_str_write_fmt_append(void) {
        WriteFmt("Testing StrAppendFmt append\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Main function that runs all tests
    int main(void) {
        WriteFmt("[INFO] Starting Str.Insert tests\n\n");
    
        // Array of test functions
    
    bool test_float_negate_abs(void) {
        WriteFmt("Testing FloatNegate and FloatAbs\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_float_add_small_small(void) {
        WriteFmt("Testing FloatAdd with small floats\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_float_add_very_large_large(void) {
        WriteFmt("Testing FloatAdd with very large floats\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_float_add_generic(void) {
        WriteFmt("Testing FloatAdd generic dispatch\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_float_sub_small_small(void) {
        WriteFmt("Testing FloatSub with small floats\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_float_sub_very_large_large(void) {
        WriteFmt("Testing FloatSub with very large floats\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_float_sub_generic(void) {
        WriteFmt("Testing FloatSub generic dispatch\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_float_mul_small_small(void) {
        WriteFmt("Testing FloatMul with small floats\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_float_mul_very_large_small(void) {
        WriteFmt("Testing FloatMul with very large and small floats\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_float_mul_generic(void) {
        WriteFmt("Testing FloatMul generic dispatch\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_float_div_small_small(void) {
        WriteFmt("Testing FloatDiv with small floats\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_float_div_very_large_small(void) {
        WriteFmt("Testing FloatDiv with very large and small floats\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_float_div_generic(void) {
        WriteFmt("Testing FloatDiv generic dispatch\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_float_div_by_zero(void) {
        WriteFmt("Testing FloatDiv divide-by-zero handling\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    int main(void) {
        WriteFmt("[INFO] Starting Float.Math tests\n\n");
    
        TestFunction tests[] = {
    // Test basic vector initialization
    bool test_vec_init_basic(void) {
        WriteFmt("Testing VecInit\n");
    
        // Test with int type
    // Test aligned vector initialization
    bool test_vec_init_aligned(void) {
        WriteFmt("Testing VecInit with aligned allocator\n");
    
        HeapAllocator aligned4  = HeapAllocatorInitAligned(4);
    // Test vector initialization with deep copy functions
    bool test_vec_init_with_deep_copy(void) {
        WriteFmt("Testing VecInitWithDeepCopy\n");
    
        // Test with struct type and custom copy/deinit functions
    // Test vector initialization with alignment and deep copy functions
    bool test_vec_init_aligned_with_deep_copy(void) {
        WriteFmt("Testing VecInit with aligned allocator and deep copy\n");
    
        HeapAllocator aligned8 = HeapAllocatorInitAligned(8);
    // Test vector initialization variants with an explicit optional allocator
    bool test_vec_init_optional_allocator(void) {
        WriteFmt("Testing VecInit optional allocator\n");
    
        typedef Vec(TestItem) TestVec;
    // Test vector stack initialization
    bool test_vec_init_stack(void) {
        WriteFmt("Testing VecInitStack\n");
    
        bool result = true;
    // Test vector clone initialization
    bool test_vec_init_clone(void) {
        WriteFmt("Testing vector cloning\n");
    
        // Create a source vector
    // Main function that runs all tests
    int main(void) {
        WriteFmt("[INFO] Starting Vec.Init tests\n\n");
    
        alloc = DefaultAllocatorInit();
    // Test VecTryReduceSpace function
    bool test_vec_try_reduce_space(void) {
        WriteFmt("Testing VecTryReduceSpace\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test VecResize function
    bool test_vec_resize(void) {
        WriteFmt("Testing VecResize\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test VecReserve function
    bool test_vec_reserve(void) {
        WriteFmt("Testing VecReserve\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test VecClear function
    bool test_vec_clear(void) {
        WriteFmt("Testing VecClear\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Main function that runs all tests
    int main(void) {
        WriteFmt("[INFO] Starting Vec.Memory tests\n\n");
    
        // Array of test functions
    // Deadend tests
    bool test_bitvec_bitwise_null_failures(void) {
        WriteFmt("Testing BitVec bitwise NULL pointer handling\n");
    
        // Test NULL bitvec pointer - should abort
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec bitwise operations NULL handling\n");
    
        BitVec bv  = BitVecInit(ALLOCATOR_OF(&alloc));
    
    bool test_bitvec_reverse_null_failures(void) {
        WriteFmt("Testing BitVec reverse NULL handling\n");
    
        // Test NULL pointer - should abort
    // NEW: Additional deadend tests
    bool test_bitvec_shift_ops_null_failures(void) {
        WriteFmt("Testing BitVec shift operations NULL handling\n");
    
        // Test NULL pointer for shift right - should abort
    
    bool test_bitvec_rotate_ops_null_failures(void) {
        WriteFmt("Testing BitVec rotate operations NULL handling\n");
    
        // Test NULL pointer for rotate - should abort
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec AND with NULL result handling\n");
    
        BitVec bv1 = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec OR with NULL operand handling\n");
    
        BitVec result = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec XOR with NULL second operand handling\n");
    
        BitVec result = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec NOT with NULL handling\n");
    
        BitVec result = BitVecInit(ALLOCATOR_OF(&alloc));
    // Main function that runs all deadend tests
    int main(void) {
        WriteFmt("[INFO] Starting BitVec.BitWise.Deadend tests\n\n");
    
        // Array of deadend test functions
        };
    
        WriteFmt("[INFO] Starting Map.Remove tests\n\n");
        return run_test_suite(tests, (int)(sizeof(tests) / sizeof(tests[0])), NULL, 0, "Map.Remove");
    }
    
    bool test_int_compare(void) {
        WriteFmt("Testing IntCompare\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_compare_wrappers(void) {
        WriteFmt("Testing Int compare wrappers\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_compare_generic(void) {
        WriteFmt("Testing IntCompare generic dispatch\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Same magnitude built two ways must hash to the same bucket.
    bool test_int_hash_determinism(void) {
        WriteFmt("Testing int_hash determinism\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // over a handful of small distinct inputs should not clash here.
    bool test_int_hash_distinguishes(void) {
        WriteFmt("Testing int_hash distinguishes distinct values\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // GenericHash / GenericCompare-shaped helpers wire in directly.
    bool test_int_hash_as_map_key(void) {
        WriteFmt("Testing int_hash as Map<Int,u64> key\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    int main(void) {
        WriteFmt("[INFO] Starting Int.Compare tests\n\n");
    
        TestFunction tests[] = {
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecGet\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecSet\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecFlip\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecLength and BitVecCapacity\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecCount operations\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecGet edge cases\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecSet edge cases\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecFlip edge cases\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecCount edge cases\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec multiple access operations\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec access with large patterns\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec macro functions\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec access stress test\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec comprehensive bit patterns\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecFind functions\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec predicate functions\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecLongestRun\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecFind edge cases\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec predicate edge cases\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecLongestRun edge cases\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
    // Main function that runs all tests
    int main(void) {
        WriteFmt("[INFO] Starting BitVec.Access.Simple tests\n\n");
    
        // Array of test functions
    
        // Print before state
        WriteFmt("Before fast range delete: ");
        for (u64 i = 0; i < VecLen(&vec); i++) {
            WriteFmt("{} ", VecAt(&vec, i));
        WriteFmt("Before fast range delete: ");
        for (u64 i = 0; i < VecLen(&vec); i++) {
            WriteFmt("{} ", VecAt(&vec, i));
        }
        WriteFmt("\n");
            WriteFmt("{} ", VecAt(&vec, i));
        }
        WriteFmt("\n");
    
        // Test VecDeleteRangeFast - delete 3 elements starting at index 2
    
        // Print after state
        WriteFmt("After fast range delete: ");
        for (u64 i = 0; i < VecLen(&vec); i++) {
            WriteFmt("{} ", VecAt(&vec, i));
        WriteFmt("After fast range delete: ");
        for (u64 i = 0; i < VecLen(&vec); i++) {
            WriteFmt("{} ", VecAt(&vec, i));
        }
        WriteFmt("\n");
            WriteFmt("{} ", VecAt(&vec, i));
        }
        WriteFmt("\n");
    
        // Check length after deletion
    
        // Print before state
        WriteFmt("Before L-value fast delete: ");
        for (u64 i = 0; i < VecLen(&vec); i++) {
            WriteFmt("{} ", VecAt(&vec, i));
        WriteFmt("Before L-value fast delete: ");
        for (u64 i = 0; i < VecLen(&vec); i++) {
            WriteFmt("{} ", VecAt(&vec, i));
        }
        WriteFmt("\n");
            WriteFmt("{} ", VecAt(&vec, i));
        }
        WriteFmt("\n");
    
        // Test L-value fast delete operation
    
        // Print after state
        WriteFmt("After L-value fast delete: ");
        for (u64 i = 0; i < VecLen(&vec); i++) {
            WriteFmt("{} ", VecAt(&vec, i));
        WriteFmt("After L-value fast delete: ");
        for (u64 i = 0; i < VecLen(&vec); i++) {
            WriteFmt("{} ", VecAt(&vec, i));
        }
        WriteFmt("\n");
            WriteFmt("{} ", VecAt(&vec, i));
        }
        WriteFmt("\n");
    
        // Check vector after L-value fast deletion
    
        // Print before state
        WriteFmt("Before R-value fast delete: ");
        for (u64 i = 0; i < VecLen(&vec); i++) {
            WriteFmt("{} ", VecAt(&vec, i));
        WriteFmt("Before R-value fast delete: ");
        for (u64 i = 0; i < VecLen(&vec); i++) {
            WriteFmt("{} ", VecAt(&vec, i));
        }
        WriteFmt("\n");
            WriteFmt("{} ", VecAt(&vec, i));
        }
        WriteFmt("\n");
    
        // Remember the value to be deleted and the last value
    
        // Print after state
        WriteFmt("After R-value fast delete: ");
        for (u64 i = 0; i < VecLen(&vec); i++) {
            WriteFmt("{} ", VecAt(&vec, i));
        WriteFmt("After R-value fast delete: ");
        for (u64 i = 0; i < VecLen(&vec); i++) {
            WriteFmt("{} ", VecAt(&vec, i));
        }
        WriteFmt("\n");
            WriteFmt("{} ", VecAt(&vec, i));
        }
        WriteFmt("\n");
    
        // Check length
    
        // Print before state
        WriteFmt("Before L-value fast range delete: ");
        for (u64 i = 0; i < VecLen(&vec); i++) {
            WriteFmt("{} ", VecAt(&vec, i));
        WriteFmt("Before L-value fast range delete: ");
        for (u64 i = 0; i < VecLen(&vec); i++) {
            WriteFmt("{} ", VecAt(&vec, i));
        }
        WriteFmt("\n");
            WriteFmt("{} ", VecAt(&vec, i));
        }
        WriteFmt("\n");
    
        // Values that should be deleted (30, 40, 50)
    
        // Print after state
        WriteFmt("After L-value fast range delete: ");
        for (u64 i = 0; i < VecLen(&vec); i++) {
            WriteFmt("{} ", VecAt(&vec, i));
        WriteFmt("After L-value fast range delete: ");
        for (u64 i = 0; i < VecLen(&vec); i++) {
            WriteFmt("{} ", VecAt(&vec, i));
        }
        WriteFmt("\n");
            WriteFmt("{} ", VecAt(&vec, i));
        }
        WriteFmt("\n");
    
        // Check vector after L-value fast range deletion
    
        // Print before state
        WriteFmt("Before R-value fast range delete: ");
        for (u64 i = 0; i < VecLen(&vec); i++) {
            WriteFmt("{} ", VecAt(&vec, i));
        WriteFmt("Before R-value fast range delete: ");
        for (u64 i = 0; i < VecLen(&vec); i++) {
            WriteFmt("{} ", VecAt(&vec, i));
        }
        WriteFmt("\n");
            WriteFmt("{} ", VecAt(&vec, i));
        }
        WriteFmt("\n");
    
        // Values that should be deleted (30, 40, 50)
    
        // Print after state
        WriteFmt("After R-value fast range delete: ");
        for (u64 i = 0; i < VecLen(&vec); i++) {
            WriteFmt("{} ", VecAt(&vec, i));
        WriteFmt("After R-value fast range delete: ");
        for (u64 i = 0; i < VecLen(&vec); i++) {
            WriteFmt("{} ", VecAt(&vec, i));
        }
        WriteFmt("\n");
            WriteFmt("{} ", VecAt(&vec, i));
        }
        WriteFmt("\n");
    
        // Check vector after R-value fast range deletion
    
    static bool test_list_remove_and_pop(void) {
        WriteFmt("Testing ListRemove and pop helpers\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_list_remove_range_and_delete_aliases(void) {
        WriteFmt("Testing ListRemoveRange and delete aliases\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_list_remove_range_prefix_suffix_edges(void) {
        WriteFmt("Testing ListRemoveRange prefix/suffix edges\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_list_remove_range_whole_list_to_buffer(void) {
        WriteFmt("Testing ListRemoveRange whole-list buffered removal\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_list_remove_zero_count_and_deep_copy_delete(void) {
        WriteFmt("Testing ListRemoveRange zero-count and deep-copy delete\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_list_remove_range_with_deep_copy_buffer(void) {
        WriteFmt("Testing ListRemoveRange buffer semantics with deep copy\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
        };
    
        WriteFmt("[INFO] Starting List.Remove tests\n\n");
        return run_test_suite(tests, (int)(sizeof(tests) / sizeof(tests[0])), NULL, 0, "List.Remove");
    }
    
    bool test_float_is_zero(void) {
        WriteFmt("Testing FloatIsZero\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_float_is_negative(void) {
        WriteFmt("Testing FloatIsNegative\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_float_exponent(void) {
        WriteFmt("Testing FloatExponent\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    int main(void) {
        WriteFmt("[INFO] Starting Float.Access tests\n\n");
    
        TestFunction tests[] = {
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecInit\n");
    
        // Test basic initialization
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecDeinit\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecReserve\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecClear\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecResize\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecInit edge cases\n");
    
        // Test multiple initializations
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecReserve edge cases\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecReu64 edge cases\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecClear edge cases\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec multiple init/deinit cycles\n");
    
        bool result = true;
    // Deadend tests - verify expected failures occur gracefully
    bool test_bitvec_null_pointer_failures(void) {
        WriteFmt("Testing BitVec NULL pointer handling\n");
    
        // Test NULL pointer passed to functions that should validate
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec invalid operations\n");
    
        // BitVecReserve is now a fallible API that returns bool on allocation
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec set operations on invalid indices\n");
    
        // BitVecResize is now a fallible API that returns bool on allocation
    // Main function that runs all tests
    int main(void) {
        WriteFmt("[INFO] Starting BitVec.Init tests\n\n");
    
        // Array of normal test functions
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecForeachIdx macro\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecForeach macro\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecForeachReverseIdx macro\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecForeachReverse macro\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecForeachInRangeIdx macro\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecForeachInRange macro\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec foreach edge cases\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec foreach idx edge cases\n");
    
        BitVec bv       = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec foreach reverse edge cases\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec foreach range edge cases\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec foreach stress test\n");
    
        bool result = true;
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecRunLengths basic functionality\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        Allocator       *base  = ALLOCATOR_OF(&alloc);
    
        WriteFmt("Testing BitVecRunLengths Vec form\n");
    
        BitVec bv = BitVecInit(base);
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecRunLengths edge cases\n");
    
        bool result = true;
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecRunLengths boundary conditions\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecRunLengths stress test\n");
    
        bool result = true;
    // Main function that runs all simple tests
    int main(void) {
        WriteFmt("[INFO] Starting BitVec.Foreach.Simple tests\n\n");
    
        // Array of normal test functions
    
    bool test_int_shift_left_grows(void) {
        WriteFmt("Testing IntShiftLeft\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_shift_right_shrinks(void) {
        WriteFmt("Testing IntShiftRight\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_add(void) {
        WriteFmt("Testing IntAdd\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_add_generic(void) {
        WriteFmt("Testing IntAdd generic dispatch\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_sub(void) {
        WriteFmt("Testing IntSub\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_sub_generic(void) {
        WriteFmt("Testing IntSub generic dispatch\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_sub_underflow_preserves_result(void) {
        WriteFmt("Testing IntSub underflow handling\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_mul(void) {
        WriteFmt("Testing IntMul\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_mul_scalar(void) {
        WriteFmt("Testing IntMul generic dispatch\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_mul_zero(void) {
        WriteFmt("Testing IntMul with zero\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_square(void) {
        WriteFmt("Testing IntSquare\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_pow_generic(void) {
        WriteFmt("Testing IntPow generic dispatch\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_div_mod(void) {
        WriteFmt("Testing IntDivMod generic dispatch\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_div(void) {
        WriteFmt("Testing IntDiv generic dispatch\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_div_exact(void) {
        WriteFmt("Testing IntDivExact generic dispatch\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_div_exact_failure_preserves_result(void) {
        WriteFmt("Testing IntDivExact failure handling\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_div_mod_scalar(void) {
        WriteFmt("Testing IntDivMod scalar-divisor dispatch\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_mod(void) {
        WriteFmt("Testing IntMod generic dispatch\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_mod_scalar(void) {
        WriteFmt("Testing IntMod scalar-divisor dispatch\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_gcd(void) {
        WriteFmt("Testing IntGCD\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_lcm(void) {
        WriteFmt("Testing IntLCM\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_root(void) {
        WriteFmt("Testing IntRoot\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_root_rem(void) {
        WriteFmt("Testing IntRootRem\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_sqrt(void) {
        WriteFmt("Testing IntSqrt\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_sqrt_rem(void) {
        WriteFmt("Testing IntSqrtRem\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_is_perfect_square(void) {
        WriteFmt("Testing IntIsPerfectSquare\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_is_perfect_power(void) {
        WriteFmt("Testing IntIsPerfectPower\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_jacobi(void) {
        WriteFmt("Testing IntJacobi\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_square_mod(void) {
        WriteFmt("Testing IntSquareMod\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_mod_add(void) {
        WriteFmt("Testing IntModAdd\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_mod_sub(void) {
        WriteFmt("Testing IntModSub\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_mod_mul(void) {
        WriteFmt("Testing IntModMul\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_mod_div(void) {
        WriteFmt("Testing IntModDiv\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_pow_mod_scalar(void) {
        WriteFmt("Testing IntPowMod scalar-exponent dispatch\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_pow_mod_integer_exponent(void) {
        WriteFmt("Testing IntPowMod Int-exponent dispatch\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_mod_inv(void) {
        WriteFmt("Testing IntModInv\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_mod_sqrt(void) {
        WriteFmt("Testing IntModSqrt\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_mod_sqrt_no_solution(void) {
        WriteFmt("Testing IntModSqrt no-solution case\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_is_probable_prime(void) {
        WriteFmt("Testing IntIsProbablePrime\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_next_prime(void) {
        WriteFmt("Testing IntNextPrime\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_mod_inv_no_solution(void) {
        WriteFmt("Testing IntModInv no-solution case\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_mod_div_no_solution(void) {
        WriteFmt("Testing IntModDiv no-solution case\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_add_null_result(void) {
        WriteFmt("Testing IntAdd NULL result handling\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_shift_left_null(void) {
        WriteFmt("Testing IntShiftLeft NULL handling\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_div_by_zero(void) {
        WriteFmt("Testing Int division by zero handling\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_root_zero_degree(void) {
        WriteFmt("Testing IntRoot zero-degree handling\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_div_scalar_zero_divisor(void) {
        WriteFmt("Testing IntDiv scalar zero-divisor handling\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_mod_scalar_zero_modulus(void) {
        WriteFmt("Testing IntMod scalar zero-modulus handling\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_mod_div_zero_modulus(void) {
        WriteFmt("Testing IntModDiv zero modulus handling\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_jacobi_even_denominator(void) {
        WriteFmt("Testing IntJacobi even denominator handling\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_pow_mod_scalar_zero_modulus(void) {
        WriteFmt("Testing IntPowMod scalar-exponent zero modulus handling\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    bool test_int_pow_mod_integer_zero_modulus(void) {
        WriteFmt("Testing IntPowMod Int-exponent zero modulus handling\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    int main(void) {
        WriteFmt("[INFO] Starting Int.Math tests\n\n");
    
        TestFunction tests[] = {
        };
    
        WriteFmt("[INFO] Starting Map.Access tests\n\n");
        return run_test_suite(tests, (int)(sizeof(tests) / sizeof(tests[0])), NULL, 0, "Map.Access");
    }
    
    bool test_file_read_into_str(void) {
        WriteFmt("Testing FileRead into Str (whole-file load)\n");
    
        DefaultAllocator alloc      = DefaultAllocatorInit();
    
    bool test_file_read_grows_str(void) {
        WriteFmt("Testing FileRead grows the Str backing buffer\n");
    
        DefaultAllocator alloc      = DefaultAllocatorInit();
    
    int main(void) {
        WriteFmt("[INFO] Starting File tests\n\n");
    
        TestFunction tests[] = {
    // Test Str type definition
    bool test_str_type(void) {
        WriteFmt("Testing Str type definition\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test Strs type definition
    bool test_strs_type(void) {
        WriteFmt("Testing Strs type definition\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test ValidateStr macro
    bool test_validate_str(void) {
        WriteFmt("Testing ValidateStr macro\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test ValidateStrs macro
    bool test_validate_strs(void) {
        WriteFmt("Testing ValidateStrs macro\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Deadend test: Test ValidateStr with invalid string (should crash/abort)
    bool test_validate_invalid_str(void) {
        WriteFmt("Testing ValidateStr with invalid string (should abort)\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Deadend test: Test ValidateStrs with invalid Strs (should crash/abort)
    bool test_validate_invalid_strs(void) {
        WriteFmt("Testing ValidateStrs with invalid Strs (should abort)\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Main function that runs all tests
    int main(void) {
        WriteFmt("[INFO] Starting Str.Type tests\n\n");
    
        // Array of normal test functions
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecPop\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecRemove (single bit)\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecRemoveRange\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecRemoveFirst\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecRemoveLast\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecRemoveAll\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecPop edge cases\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecRemove edge cases\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecRemoveRange edge cases\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecRemoveFirst/Last edge cases\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecRemoveAll edge cases\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
    // Deadend tests
    bool test_bitvec_remove_null_failures(void) {
        WriteFmt("Testing BitVec remove NULL pointer handling\n");
    
        // Test NULL bitvec pointer - should abort
    
    bool test_bitvec_remove_range_null_failures(void) {
        WriteFmt("Testing BitVec remove range NULL handling\n");
    
        // Test NULL bitvec pointer - should abort
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec remove invalid range handling\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec pop bounds checking\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec remove bounds checking\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec remove range bounds checking\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
    // Main function that runs all tests
    int main(void) {
        WriteFmt("[INFO] Starting BitVec.Remove tests\n\n");
    
        // Array of normal test functions
    
    static bool test_graph_add_node_semantics(void) {
        WriteFmt("Testing GraphAddNode semantics\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_graph_add_edge_dedup(void) {
        WriteFmt("Testing GraphAddEdge deduplication\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_graph_self_loop_and_predecessor_order(void) {
        WriteFmt("Testing Graph self-loop handling and predecessor order\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
        };
    
        WriteFmt("[INFO] Starting Graph.Insert tests\n\n");
        return run_test_suite(tests, (int)(sizeof(tests) / sizeof(tests[0])), NULL, 0, "Graph.Insert");
    }
    
    int main(void) {
        WriteFmt("[INFO] Starting Iter.Deadend tests\n\n");
        TestFunction tests[] = {
            deadend_must_read_eof,
    
    bool test_complex_vec_init(void) {
        WriteFmt("Testing vector initialization with complex structure\n");
    
        // Create a vector of ComplexItem with deep copy functions
    // Test push operations with complex structure
    bool test_complex_vec_push(void) {
        WriteFmt("Testing push operations with complex structure\n");
    
        // Create a vector of ComplexItem with deep copy functions
    // Test insert operations with complex structure
    bool test_complex_vec_insert(void) {
        WriteFmt("Testing insert operations with complex structure\n");
    
        // Create a vector of ComplexItem with deep copy functions
    // Test merge operations with complex structure
    bool test_complex_vec_merge(void) {
        WriteFmt("Testing merge operations with complex structure\n");
    
        // Create two vectors of ComplexItem with deep copy functions
    // Test L-value operations
    bool test_lvalue_operations(void) {
        WriteFmt("Testing L-value operations\n");
    
        // Create a vector of integers
    // Test fast operations
    bool test_fast_operations(void) {
        WriteFmt("Testing fast operations\n");
    
        // Create a vector of integers
    // Test delete operations
    bool test_delete_operations(void) {
        WriteFmt("Testing delete operations\n");
    
        // Create a vector of integers
    // Test edge cases
    bool test_edge_cases(void) {
        WriteFmt("Testing edge cases\n");
    
        // Create a vector of integers
    // Test VecPushBackL zero-on-take behavior with complex structures
    bool test_lvalue_zero_on_take_pushback(void) {
        WriteFmt("Testing VecPushBackL zero-on-take with complex structures\n");
    
        // Create a test item
    // Test VecInsertL zero-on-take behavior with complex structures
    bool test_lvalue_zero_on_take_insert(void) {
        WriteFmt("Testing VecInsertL zero-on-take with complex structures\n");
    
        // Create a test item
    // Test VecInsertFastL zero-on-take behavior with complex structures
    bool test_lvalue_zero_on_take_fast_insert(void) {
        WriteFmt("Testing VecInsertFastL zero-on-take with complex structures\n");
        bool result = true;
    // Test VecPushFrontL zero-on-take behavior with complex structures
    bool test_lvalue_zero_on_take_pushfront(void) {
        WriteFmt("Testing VecPushFrontL zero-on-take with complex structures\n");
    
        // Create a test item
    // Test VecMergeL zero-on-take behavior with complex structures
    bool test_lvalue_zero_on_take_merge(void) {
        WriteFmt("Testing VecMergeL zero-on-take with complex structures\n");
    
        // Create a vector with no copy_init but with copy_deinit for proper cleanup
    // Test array operations with L-value semantics
    bool test_lvalue_zero_on_take_array_ops(void) {
        WriteFmt("Testing array operations with L-value semantics\n");
    
        // Create a vector with no copy_init but with copy_deinit for proper cleanup
    int main(void) {
        alloc = DefaultAllocatorInit();
        WriteFmt("[INFO] Starting Vec.Complex tests\n\n");
    
        // Array of test functions
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecToStr\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecFromStr\n");
    
        // Convert from string
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecToBytes\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecFromBytes\n");
    
        // Create byte array
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecToInteger\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecFromInteger\n");
    
        // Convert from integer
    
    bool test_bitvec_try_conversion_allocators(void) {
        WriteFmt("Testing BitVec try conversion allocator behavior\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec convert edge cases\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecFromStr edge cases\n");
    
        bool result = true;
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec bytes conversion edge cases\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec integer conversion edge cases\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec round-trip conversions\n");
    
        bool result = true;
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec conversion bounds checking\n");
    
        bool result = true;
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec comprehensive conversion validation\n");
    
        bool result = true;
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec large-scale conversions\n");
    
        bool result = true;
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec bytes bounds failures\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
    
    bool test_bitvec_integer_bounds_failures(void) {
        WriteFmt("Testing BitVec integer bounds failures\n");
    
        // Test BitVecToInteger with NULL pointer - should abort
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec convert NULL pointer handling\n");
    
        // Use the explicit-allocator form so the NULL bitvec reaches the
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec from string NULL handling\n");
    
        // Test NULL string - should abort
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec bytes NULL handling\n");
    
        // Test NULL bytes - should abort
    // Main function that runs all tests
    int main(void) {
        WriteFmt("[INFO] Starting BitVec.Convert tests\n\n");
    
        // Array of normal test functions
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecForeachIdx macro\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecForeach macro\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecForeachReverseIdx macro\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecForeachReverse macro\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecForeachInRangeIdx macro\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecForeachInRange macro\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec foreach edge cases\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec foreach idx edge cases\n");
    
        BitVec bv       = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec foreach reverse edge cases\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec foreach range edge cases\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec foreach stress test\n");
    
        bool result = true;
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecRunLengths basic functionality\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecRunLengths edge cases\n");
    
        bool result = true;
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecRunLengths boundary conditions\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecRunLengths stress test\n");
    
        bool result = true;
    
    bool test_bitvec_run_lengths_null_bv(void) {
        WriteFmt("Testing BitVecRunLengths with NULL bitvector\n");
    
        u64  runs[5];
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecRunLengths with NULL runs array\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecRunLengths with NULL values array\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecRunLengths with zero max_runs\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
    
    bool test_bitvec_foreach_invalid_usage(void) {
        WriteFmt("Testing BitVec foreach with invalid bitvec\n");
    
        // Test foreach with invalid bitvec (length > 0 but data is NULL)
    // Main function that runs all tests
    int main(void) {
        WriteFmt("[INFO] Starting BitVec.Foreach tests\n\n");
    
        // Array of normal test functions
        };
    
        WriteFmt("[INFO] Starting Map.Init tests\n\n");
        return run_test_suite(tests, (int)(sizeof(tests) / sizeof(tests[0])), NULL, 0, "Map.Init");
    }
    
    static bool test_graph_city_reachability(void) {
        WriteFmt("Testing GraphForeachNode and GraphNodeForeachNeighbor for reachability\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_graph_foreach_with_external_map_counts(void) {
        WriteFmt("Testing nested foreach with external count tracking map\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_graph_foreach_predecessors(void) {
        WriteFmt("Testing GraphNodeForeachPredecessor\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_graph_node_iteration_rejects_structural_mutation_deadend(void) {
        WriteFmt("Testing GraphForeachNode rejects structural mutation (should abort)\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_graph_neighbor_iteration_rejects_structural_mutation_deadend(void) {
        WriteFmt("Testing GraphNodeForeachNeighbor rejects structural mutation (should abort)\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_graph_predecessor_iteration_rejects_structural_mutation_deadend(void) {
        WriteFmt("Testing GraphNodeForeachPredecessor rejects structural mutation (should abort)\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
        };
    
        WriteFmt("[INFO] Starting Graph.Foreach tests\n\n");
        return run_test_suite(
            tests,
    // Test VecAt function
    bool test_vec_at(void) {
        WriteFmt("Testing VecAt\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test VecPtrAt function
    bool test_vec_ptr_at(void) {
        WriteFmt("Testing VecPtrAt\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test VecFirst and VecLast functions
    bool test_vec_first_last(void) {
        WriteFmt("Testing VecFirst and VecLast\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test VecBegin and VecEnd functions
    bool test_vec_begin_end(void) {
        WriteFmt("Testing VecBegin and VecEnd\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test VecSize and VecLen functions
    bool test_vec_size_len(void) {
        WriteFmt("Testing VecSize and VecLen\n");
    
        DefaultAllocator alloc    = DefaultAllocatorInit();
    // Test VecAlignedOffsetAt function
    bool test_vec_aligned_offset_at(void) {
        WriteFmt("Testing VecAlignedOffsetAt\n");
    
        DefaultAllocator alloc    = DefaultAllocatorInit();
    // Test VecEmpty, VecFind, and VecContains functions
    bool test_vec_empty_find_contains(void) {
        WriteFmt("Testing VecEmpty, VecFind, and VecContains\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Main function that runs all tests
    int main(void) {
        WriteFmt("[INFO] Starting Vec.Access tests\n\n");
    
        // Array of test functions
    
    int main(void) {
        WriteFmt("[INFO] Starting Pdb tests\n\n");
    
        TestFunction tests[] = {
    
    int main(void) {
        WriteFmt("[INFO] Starting Iter tests\n\n");
        TestFunction tests[] = {
            test_iter_remaining_forward,
    
    static bool test_validate_corrupt_empty_list_fails(void) {
        WriteFmt("Testing ValidateList on corrupt empty list\n");
    
        List(int) list = ListInit(get_test_alloc());
    
    static bool test_validate_null_list_fails(void) {
        WriteFmt("Testing ValidateList on NULL list\n");
    
        ValidateList(NULL);
    
    static bool test_validate_invalid_magic_fails(void) {
        WriteFmt("Testing ValidateList on invalid magic\n");
    
        List(int) list = ListInit(get_test_alloc());
    
    static bool test_validate_corrupt_nonempty_list_fails(void) {
        WriteFmt("Testing ValidateList on corrupt non-empty list\n");
    
        GenericListNode node = {0};
    
    static bool test_validate_nonempty_head_null_fails(void) {
        WriteFmt("Testing ValidateList on non-empty NULL head\n");
    
        int             value = 1;
    
    static bool test_validate_head_prev_fails(void) {
        WriteFmt("Testing ValidateList on head prev corruption\n");
    
        int             value = 1;
    
    static bool test_validate_tail_next_fails(void) {
        WriteFmt("Testing ValidateList on tail next corruption\n");
    
        int             value = 1;
    
    static bool test_list_ptr_at_empty_fails(void) {
        WriteFmt("Testing ListPtrAt on empty list\n");
    
        List(int) list = ListInit(get_test_alloc());
    
    static bool test_list_ptr_at_out_of_bounds_fails(void) {
        WriteFmt("Testing ListPtrAt out of bounds\n");
    
        List(int) list = ListInit(get_test_alloc());
    
    static bool test_list_at_out_of_bounds_fails(void) {
        WriteFmt("Testing ListAt out of bounds\n");
    
        List(int) list = ListInit(get_test_alloc());
    
    static bool test_list_node_ptr_at_empty_fails(void) {
        WriteFmt("Testing ListNodePtrAt on empty list\n");
    
        List(int) list = ListInit(get_test_alloc());
    
    static bool test_list_node_ptr_at_out_of_bounds_fails(void) {
        WriteFmt("Testing ListNodePtrAt out of bounds\n");
    
        List(int) list = ListInit(get_test_alloc());
    
    static bool test_list_node_at_out_of_bounds_fails(void) {
        WriteFmt("Testing ListNodeAt out of bounds\n");
    
        List(int) list = ListInit(get_test_alloc());
    
    static bool test_list_first_on_empty_fails(void) {
        WriteFmt("Testing ListFirst on empty list\n");
    
        List(int) list = ListInit(get_test_alloc());
    
    static bool test_list_last_on_empty_fails(void) {
        WriteFmt("Testing ListLast on empty list\n");
    
        List(int) list = ListInit(get_test_alloc());
    
    static bool test_list_node_at_empty_fails(void) {
        WriteFmt("Testing ListNodeAt on empty list\n");
    
        List(int) list = ListInit(get_test_alloc());
    
    static bool test_list_insert_out_of_range_fails(void) {
        WriteFmt("Testing ListInsertR out of range\n");
    
        List(int) list = ListInit(get_test_alloc());
    
    static bool test_list_remove_out_of_range_fails(void) {
        WriteFmt("Testing ListRemove out of range\n");
    
        List(int) list = ListInit(get_test_alloc());
    
    static bool test_list_pop_front_empty_fails(void) {
        WriteFmt("Testing ListPopFront on empty list\n");
    
        List(int) list = ListInit(get_test_alloc());
    
    static bool test_list_pop_back_empty_fails(void) {
        WriteFmt("Testing ListPopBack on empty list\n");
    
        List(int) list = ListInit(get_test_alloc());
    
    static bool test_list_remove_range_out_of_range_fails(void) {
        WriteFmt("Testing ListRemoveRange out of range\n");
    
        List(int) list = ListInit(get_test_alloc());
    
    static bool test_list_swap_items_out_of_range_fails(void) {
        WriteFmt("Testing ListSwapItems out of range\n");
    
        List(int) list = ListInit(get_test_alloc());
    
    static bool test_list_find_without_compare_fails(void) {
        WriteFmt("Testing ListFind without compare function\n");
    
        List(int) list = ListInit(get_test_alloc());
    
    static bool test_list_find_without_key_fails(void) {
        WriteFmt("Testing ListFind without key pointer\n");
    
        List(int) list = ListInit(get_test_alloc());
    
    static bool test_list_node_relative_null_fails(void) {
        WriteFmt("Testing ListNodeRelative with NULL node\n");
    
        ListNodeRelative(NULL, 1);
    
    static bool test_list_sort_without_compare_fails(void) {
        WriteFmt("Testing ListSort without compare function\n");
    
        List(int) list = ListInit(get_test_alloc());
        };
    
        WriteFmt("[INFO] Starting List.Deadend tests\n\n");
        return run_test_suite(
            NULL,
    // Test basic Vec type functionality
    bool test_vec_type_basic(void) {
        WriteFmt("Testing basic Vec type functionality\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test ValidateVec macro
    bool test_vec_validate(void) {
        WriteFmt("Testing ValidateVec macro\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Main function that runs all tests
    int main(void) {
        WriteFmt("[INFO] Starting Vec.Type tests\n\n");
    
        // Array of test functions
    
    bool test_vec_push_back(void) {
        WriteFmt("Testing VecPushBack\n");
    
        // Create a vector of integers
    // Test VecPushFront function
    bool test_vec_push_front(void) {
        WriteFmt("Testing VecPushFront\n");
    
        // Create a vector of integers
    // Test VecInsert function
    bool test_vec_insert(void) {
        WriteFmt("Testing VecInsert\n");
    
        // Create a vector of integers
    // Test VecPushBackArr function
    bool test_vec_push_back_arr(void) {
        WriteFmt("Testing VecPushBackArr\n");
    
        // Create a vector of integers
    // Test VecPushFrontArr function
    bool test_vec_push_front_arr(void) {
        WriteFmt("Testing VecPushFrontArr\n");
    
        // Create a vector of integers
    // Test VecInsertRange function for inserting at a specific index
    bool test_vec_push_arr(void) {
        WriteFmt("Testing VecInsertRange at specific index\n");
    
        // Create a vector of integers
    // Test VecInsertRange function for inserting from another vector
    bool test_vec_insert_range(void) {
        WriteFmt("Testing VecInsertRange from another vector\n");
    
        // Create a vector of integers
    // Test VecMerge function
    bool test_vec_merge(void) {
        WriteFmt("Testing VecMerge\n");
    
        // Create a vector of integers
    // the elements manually.)
    bool test_vec_init_clone_inherits_allocator_config(void) {
        WriteFmt("Testing manual clone allocator inheritance\n");
    
        typedef Vec(int) IntVec;
    // Test L-value and R-value operations
    bool test_lvalue_rvalue_operations(void) {
        WriteFmt("Testing L-value and R-value operations\n");
    
        // Create a vector of integers
    // Test that L-value insertions properly zero out values after insertion
    bool test_lvalue_zero_on_take_after_insertion(void) {
        WriteFmt("Testing L-value zero-on-take after insertion\n");
    
        // Create a vector of integers without copy_init
    // untouched prefix [0, idx) is intact.
    bool test_vec_insert_range_fast_overflowing_tail(void) {
        WriteFmt("Testing VecInsertRangeFast with count > (length - idx)\n");
    
        typedef Vec(int) IntVec;
    int main(void) {
        alloc = DefaultAllocatorInit();
        WriteFmt("[INFO] Starting Vec.Insert tests\n\n");
    
        // Array of test functions
    
    int main(void) {
        WriteFmt("[INFO] Starting MachoCache tests\n\n");
    
        TestFunction tests[] = {
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecEquals\n");
    
        BitVec bv1 = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecCompare\n");
    
        BitVec bv1 = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecLexCompare\n");
    
        BitVec bv1 = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecNumericalCompare\n");
    
        BitVec bv1 = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecWeightCompare\n");
    
        BitVec bv1 = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecIsSubset\n");
    
        BitVec subset   = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecSignedCompare\n");
    
        BitVec bv1 = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecIsSuperset\n");
    
        BitVec superset = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecOverlaps\n");
    
        BitVec bv1 = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecDisjoint and BitVecIntersects\n");
    
        BitVec bv1 = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecEqualsRange\n");
    
        BitVec bv1 = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecCompareRange\n");
    
        BitVec bv1 = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecIsLexicographicallyLess and BitVecIsNumericallyLess\n");
    
        BitVec bv1 = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecIsSorted\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec compare edge cases\n");
    
        BitVec bv1    = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec set operations edge cases\n");
    
        BitVec bv1    = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec comprehensive comparison operations\n");
    
        BitVec bv1    = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec large-scale comparison operations\n");
    
        BitVec large1 = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec compare NULL pointer handling\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
    
    bool test_bitvec_subset_null_failures(void) {
        WriteFmt("Testing BitVec subset NULL handling\n");
    
        // Test NULL pointer - should abort
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec range operations NULL handling\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec range operations bounds checking\n");
    
        BitVec bv1 = BitVecInit(ALLOCATOR_OF(&alloc));
    
    bool test_bitvec_sorted_null_failures(void) {
        WriteFmt("Testing BitVec sorted operations NULL handling\n");
    
        // Test NULL pointer - should abort
    // Two bitvectors built the same way must hash identically.
    bool test_bitvec_hash_determinism(void) {
        WriteFmt("Testing bitvec_hash determinism\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // share a byte prefix but differ in length must still distinguish.
    bool test_bitvec_hash_distinguishes(void) {
        WriteFmt("Testing bitvec_hash sensitivity to bits and length\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // shaped helpers wired in directly -- no per-callsite cast needed.
    bool test_bitvec_hash_as_map_key(void) {
        WriteFmt("Testing bitvec_hash as Map<BitVec, u64> key\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // equality / identity. Mirrors how str_compare is exercised.
    bool test_bitvec_compare_callback(void) {
        WriteFmt("Testing bitvec_compare as GenericCompare callback\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Main function that runs all tests
    int main(void) {
        WriteFmt("[INFO] Starting BitVec.Compare tests\n\n");
    
        // Array of normal test functions
        };
    
        WriteFmt("[INFO] Starting Map.Ops tests\n\n");
        return run_test_suite(tests, (int)(sizeof(tests) / sizeof(tests[0])), NULL, 0, "Map.Ops");
    }
    
    int main(void) {
        WriteFmt("[INFO] Starting PageProtect tests\n\n");
    
        TestFunction tests[] = {
    
    static bool test_list_type_defaults(void) {
        WriteFmt("Testing List type defaults\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    
    static bool test_list_node_type_layout(void) {
        WriteFmt("Testing ListNode type layout\n");
    
        int value          = 42;
        };
    
        WriteFmt("[INFO] Starting List.Type tests\n\n");
        return run_test_suite(tests, (int)(sizeof(tests) / sizeof(tests[0])), NULL, 0, "List.Type");
    }
    
    int main(void) {
        WriteFmt("[INFO] Starting Dns tests\n\n");
    
        TestFunction tests[] = {
    // Test StrInit function
    bool test_str_init(void) {
        WriteFmt("Testing StrInit\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrInitFromCstr function
    bool test_str_init_from_cstr(void) {
        WriteFmt("Testing StrInitFromCstr\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrInitFromZstr function
    bool test_str_init_from_zstr(void) {
        WriteFmt("Testing StrInitFromZstr\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrZ alias
    bool test_str_z_alias(void) {
        WriteFmt("Testing StrZ\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrInitFromStr function
    bool test_str_init_from_str(void) {
        WriteFmt("Testing StrInitFromStr\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrDup function (alias for StrInitFromStr)
    bool test_str_dup(void) {
        WriteFmt("Testing StrDup\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrAppendFmt function
    bool test_str_WriteFmt(void) {
        WriteFmt("Testing StrAppendFmt\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrInitStack macro
    bool test_str_init_stack(void) {
        WriteFmt("Testing StrInitStack\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrInitCopy function
    bool test_str_init_copy(void) {
        WriteFmt("Testing StrInitCopy\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test that Str clones inherit the source allocator pointer
    bool test_str_clone_inherits_allocator_config(void) {
        WriteFmt("Testing Str clone allocator inheritance\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrDeinit function
    bool test_str_deinit(void) {
        WriteFmt("Testing StrDeinit\n");
    
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Main function that runs all tests
    int main(void) {
        WriteFmt("[INFO] Starting Str.Init tests\n\n");
    
        // Array of test functions
        };
    
        WriteFmt("[INFO] Starting Map.Type tests\n\n");
        return run_test_suite(tests, (int)(sizeof(tests) / sizeof(tests[0])), NULL, 0, "Map.Type");
    }
    // Test StrForeachIdx macro
    bool test_str_foreach_idx(void) {
        WriteFmt("Testing StrForeachIdx\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrForeachReverseIdx macro
    bool test_str_foreach_reverse_idx(void) {
        WriteFmt("Testing StrForeachReverseIdx\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        bool success = (ZstrCompare(StrBegin(&result), "o4l3l2e1H0") == 0);
        WriteFmt("  (Index 0 was processed)\n");
    
        StrDeinit(&s);
    // Test StrForeachPtrIdx macro
    bool test_str_foreach_ptr_idx(void) {
        WriteFmt("Testing StrForeachPtrIdx\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrForeachReversePtrIdx macro
    bool test_str_foreach_reverse_ptr_idx(void) {
        WriteFmt("Testing StrForeachReversePtrIdx\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
        success      = (ZstrCompare(StrBegin(&result), "o4l3l2e1H0") == 0);
        success      = success && (ZstrCompare(StrBegin(&s), "HELLO") == 0); // All uppercase
        WriteFmt("  (Index 0 was processed)\n");
    
        StrDeinit(&s);
    // Test StrForeach macro
    bool test_str_foreach(void) {
        WriteFmt("Testing StrForeach\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrForeachReverse macro
    bool test_str_foreach_reverse(void) {
        WriteFmt("Testing StrForeachReverse\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
        if (char_count == StrLen(&s)) {
            success = (ZstrCompare(StrBegin(&result), "olleH") == 0);
            WriteFmt("  (All characters were processed)\n");
        } else {
            success = (ZstrCompare(StrBegin(&result), "olle") == 0);
        } else {
            success = (ZstrCompare(StrBegin(&result), "olle") == 0);
            WriteFmt("  (First character was NOT processed - bug in macro)\n");
        }
    // Test StrForeachPtr macro
    bool test_str_foreach_ptr(void) {
        WriteFmt("Testing StrForeachPtr\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrForeachPtrReverse macro
    bool test_str_foreach_ptr_reverse(void) {
        WriteFmt("Testing StrForeachPtrReverse\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
            success = (ZstrCompare(StrBegin(&result), "olleH") == 0);
            success = success && (ZstrCompare(StrBegin(&s), "HELLO") == 0); // All uppercase
            WriteFmt("  (All characters were processed)\n");
        } else {
            success = (ZstrCompare(StrBegin(&result), "olle") == 0);
            success = (ZstrCompare(StrBegin(&result), "olle") == 0);
            success = success && (ZstrCompare(StrBegin(&s), "HELLo") == 0); // All uppercase except first char
            WriteFmt("  (First character was NOT processed - bug in macro)\n");
        }
    // Test StrForeachInRangeIdx macro
    bool test_str_foreach_in_range_idx(void) {
        WriteFmt("Testing StrForeachInRangeIdx\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrForeachInRange macro
    bool test_str_foreach_in_range(void) {
        WriteFmt("Testing StrForeachInRange\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrForeachPtrInRangeIdx macro
    bool test_str_foreach_ptr_in_range_idx(void) {
        WriteFmt("Testing StrForeachPtrInRangeIdx\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Test StrForeachPtrInRange macro
    bool test_str_foreach_ptr_in_range(void) {
        WriteFmt("Testing StrForeachPtrInRange\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
    // Make idx go out of bounds in StrForeachInRangeIdx by shrinking string during iteration
    bool test_str_foreach_out_of_bounds_access(void) {
        WriteFmt("Testing StrForeachInRangeIdx where idx goes out of bounds\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
        size original_length = StrLen(&s); // Capture this as 12
        StrForeachInRangeIdx(&s, chr, idx, 0, original_length) {
            WriteFmt("Accessing idx {} (s.length={}): '{c}'\n", idx, StrLen(&s), chr);
    
            // When we reach idx=4, drastically shrink the string to length 3
            if (idx == 4) {
                StrResize(&s, 3); // Shrink to only 3 characters
                WriteFmt("String resized to length {}, idx={}...\n", StrLen(&s), idx);
            }
    // Make idx go out of bounds in StrForeachInRangeIdx by deleting characters
    bool test_str_foreach_idx_out_of_bounds_access(void) {
        WriteFmt("Testing StrForeachInRangeIdx with character deletion where idx goes out of bounds\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
        size original_length = StrLen(&s); // Capture this as 11
        StrForeachInRangeIdx(&s, chr, idx, 0, original_length) {
            WriteFmt("Accessing idx {} (s.length={}): '{c}'\n", idx, StrLen(&s), chr);
    
            // When we reach idx=3, delete several characters from the beginning
            if (idx == 3) {
                StrDeleteRange(&s, 0, 6); // Remove first 6 characters
                WriteFmt("Deleted first 6 characters, new length={}, idx={}...\n", StrLen(&s), idx);
            }
    // Make idx go out of bounds in StrForeachReverseIdx by modifying string during iteration
    bool test_str_foreach_reverse_idx_out_of_bounds_access(void) {
        WriteFmt("Testing StrForeachReverseIdx where idx goes out of bounds\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
        // StrForeachReverseIdx (VecForeachReverseIdx) has explicit bounds checking: if ((idx) >= (v)->length) LOG_FATAL(...)
        StrForeachReverseIdx(&s, chr, idx) {
            WriteFmt("Accessing idx {} (s.length={}): '{c}'\n", idx, StrLen(&s), chr);
    
            // When we reach idx=10, drastically shrink the string
            if (idx == 10) {
                StrResize(&s, 4); // Shrink to only 4 characters
                WriteFmt("String resized to length {} during reverse iteration... idx = {}\n", StrLen(&s), idx);
            }
    // Make idx go out of bounds in StrForeachPtrIdx by modifying string during iteration
    bool test_str_foreach_ptr_idx_out_of_bounds_access(void) {
        WriteFmt("Testing StrForeachPtrIdx where idx goes out of bounds\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
        // StrForeachPtrIdx (VecForeachPtrIdx) has explicit bounds checking: if ((idx) >= (v)->length) LOG_FATAL(...)
        StrForeachPtrIdx(&s, chr_ptr, idx) {
            WriteFmt("Accessing idx {} (s.length={}): '{c}'\n", idx, StrLen(&s), *chr_ptr);
    
            // When we reach idx=4, delete most characters from the string
            if (idx == 4) {
                StrResize(&s, 4); // Shrink to only 4 characters (valid indices: 0,1,2,3)
                WriteFmt("String resized to length {}, current idx={} is now out of bounds...\n", StrLen(&s), idx);
            }
    // Make idx go out of bounds in StrForeachReversePtrIdx by modifying string during iteration
    bool test_str_foreach_reverse_ptr_idx_out_of_bounds_access(void) {
        WriteFmt("Testing StrForeachReversePtrIdx where idx goes out of bounds\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
        // StrForeachReversePtrIdx (VecForeachPtrReverseIdx) has explicit bounds checking: if ((idx) >= (v)->length) LOG_FATAL(...)
        StrForeachReversePtrIdx(&s, chr_ptr, idx) {
            WriteFmt("Accessing idx {} (s.length={}): '{c}'\n", idx, StrLen(&s), *chr_ptr);
    
            // When we reach idx=12, shrink the string significantly
            if (idx == 12) {
                StrResize(&s, 5); // Shrink to only 5 characters
                WriteFmt("String resized to length {} during reverse ptr iteration... idx = {}\n", StrLen(&s), idx);
            }
    // Make idx go out of bounds in StrForeachPtrInRangeIdx by modifying string during iteration
    bool test_str_foreach_ptr_in_range_idx_out_of_bounds_access(void) {
        WriteFmt("Testing StrForeachPtrInRangeIdx where idx goes out of bounds\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
        size original_length = StrLen(&s); // Capture this as 32
        StrForeachPtrInRangeIdx(&s, chr_ptr, idx, 0, original_length) {
            WriteFmt("Accessing idx {} (s.length={}): '{c}'\n", idx, StrLen(&s), *chr_ptr);
    
            // When we reach idx=8, delete several characters
            if (idx == 8) {
                StrDeleteRange(&s, 0, 20); // Remove first 20 characters
                WriteFmt("Deleted first 20 characters, new length={}, idx = {}...\n", StrLen(&s), idx);
            }
    // Make idx go out of bounds in basic StrForeachIdx by modifying string during iteration
    bool test_str_foreach_idx_basic_out_of_bounds_access(void) {
        WriteFmt("Testing basic StrForeachIdx where idx goes out of bounds\n");
        DefaultAllocator alloc = DefaultAllocatorInit();
        // Basic StrForeachIdx (VecForeachIdx) now has explicit bounds checking: if ((idx) >= (v)->length) LOG_FATAL(...)
        StrForeachIdx(&s, chr, idx) {
            WriteFmt("Accessing idx {} (s.length={}): '{c}'\n", idx, StrLen(&s), chr);
    
            // When we reach idx=3, drastically shrink the string
            if (idx == 3) {
                StrResize(&s, 2); // Shrink to only 2 characters
                WriteFmt(
                    "String resized to length {}, but basic foreach iteration continues... idx = {}\n",
                    StrLen(&s),
    // Main function that runs all tests
    int main(void) {
        WriteFmt("[INFO] Starting Str.Foreach.Simple tests\n\n");
    
        // Array of normal test functions
    
    int main(void) {
        WriteFmt("[INFO] Starting ArgParse tests\n\n");
    
        TestFunction tests[] = {
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecGet\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecSet\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecFlip\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec length and capacity operations\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec count operations\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecGet edge cases\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecSet edge cases\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecFlip edge cases\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec count edge cases\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec multiple access operations\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec large pattern access\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec macro functions\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec access stress test\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec comprehensive bit patterns\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
    // Deadend tests
    bool test_bitvec_access_null_failures(void) {
        WriteFmt("Testing BitVec access NULL pointer handling\n");
    
        // Test NULL bitvec pointer - should abort
    
    bool test_bitvec_set_null_failures(void) {
        WriteFmt("Testing BitVec set NULL pointer handling\n");
    
        // Test NULL bitvec pointer - should abort
    
    bool test_bitvec_flip_null_failures(void) {
        WriteFmt("Testing BitVec flip NULL pointer handling\n");
    
        // Test NULL bitvec pointer - should abort
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec get bounds checking\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec set bounds checking\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec flip bounds checking\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec get with large out-of-bounds index\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec set with large out-of-bounds index\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec flip with edge case out-of-bounds index\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
    
    bool test_bitvec_count_null_failures(void) {
        WriteFmt("Testing BitVec count operations with NULL pointer\n");
    
        // Test NULL bitvec pointer - should abort
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec get with maximum index value\n");
    
        BitVec bv = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecFind and BitVecFindLast functions\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecAll, BitVecAny, BitVecNone functions\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecLongestRun function\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecFind edge cases\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVec predicate edge cases\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecLongestRun edge cases\n");
    
        BitVec bv     = BitVecInit(ALLOCATOR_OF(&alloc));
    // Deadend tests - testing NULL pointers and invalid conditions that should cause fatal errors
    bool test_bitvec_find_deadend_tests(void) {
        WriteFmt("Testing BitVecFind deadend scenarios\n");
    
        // This should cause LOG_FATAL and terminate the program
    
    bool test_bitvec_predicate_deadend_tests(void) {
        WriteFmt("Testing BitVec predicate deadend scenarios\n");
    
        // This should cause LOG_FATAL and terminate the program
    
    bool test_bitvec_longest_run_deadend_tests(void) {
        WriteFmt("Testing BitVecLongestRun deadend scenarios\n");
    
        // This should cause LOG_FATAL and terminate the program
    // Main function that runs all tests
    int main(void) {
        WriteFmt("[INFO] Starting BitVec.Access tests\n\n");
    
        // Array of test functions (adding new tests to existing ones)
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecFindPattern(NULL, pattern) - should fatal\n");
    
        BitVec pattern = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecFindPattern(source, NULL) - should fatal\n");
    
        BitVec source = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecFindLastPattern(NULL, pattern) - should fatal\n");
    
        BitVec pattern = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecFindLastPattern(source, NULL) - should fatal\n");
    
        BitVec source = BitVecInit(ALLOCATOR_OF(&alloc));
    // Deadend test 5: BitVecFindAllPattern with NULL source
    bool test_bitvec_find_all_pattern_null_source(void) {
        WriteFmt("Testing BitVecFindAllPattern(NULL, pattern, results, 10) - should fatal\n");
    
        size results[10];
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecFindAllPattern(source, NULL, results, 10) - should fatal\n");
    
        BitVec source = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecFindAllPattern(source, pattern, NULL, 10) - should fatal\n");
    
        BitVec source  = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecFindAllPattern(source, pattern, results, 0) - should fatal\n");
    
        BitVec source  = BitVecInit(ALLOCATOR_OF(&alloc));
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecStartsWith(NULL, prefix) - should fatal\n");
        BitVec prefix = BitVecInit(ALLOCATOR_OF(&alloc));
        BitVecPush(&prefix, true);
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecStartsWith(source, NULL) - should fatal\n");
        BitVec source = BitVecInit(ALLOCATOR_OF(&alloc));
        BitVecPush(&source, true);
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecEndsWith(NULL, suffix) - should fatal\n");
        BitVec suffix = BitVecInit(ALLOCATOR_OF(&alloc));
        BitVecPush(&suffix, true);
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecEndsWith(source, NULL) - should fatal\n");
        BitVec source = BitVecInit(ALLOCATOR_OF(&alloc));
        BitVecPush(&source, true);
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecContainsAt(NULL, pattern, 0) - should fatal\n");
        BitVec pattern = BitVecInit(ALLOCATOR_OF(&alloc));
        BitVecPush(&pattern, true);
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecContainsAt(source, NULL, 0) - should fatal\n");
        BitVec source = BitVecInit(ALLOCATOR_OF(&alloc));
        BitVecPush(&source, true);
    
    bool test_bitvec_replace_null_source(void) {
        WriteFmt("Testing BitVecReplace(NULL, old, new) - should fatal\n");
    
        // Don't create BitVecs since we're testing NULL source validation
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecMatches(NULL, pattern, wildcard) - should fatal\n");
        BitVec pattern  = BitVecInit(ALLOCATOR_OF(&alloc));
        BitVec wildcard = BitVecInit(ALLOCATOR_OF(&alloc));
    
    bool test_bitvec_regex_match_null_source(void) {
        WriteFmt("Testing BitVecRegexMatch(NULL, pattern) - should fatal\n");
        BitVecRegexMatch(NULL, "101");
        return true;
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecRegexMatch(source, NULL) - should fatal\n");
        BitVec source = BitVecInit(ALLOCATOR_OF(&alloc));
        BitVecPush(&source, true);
    bool test_bitvec_prefix_match_null_source(void) {
        DefaultAllocator alloc = DefaultAllocatorInit();
        WriteFmt("Testing BitVecPrefixMatch(NULL, patterns, 1) - should fatal\n");
        BitVecs vp = VecInitWithDeepCopy(NULL, BitVecDeinit, ALLOCATOR_OF(&alloc));
        BitVecPush(VecPtrAt(&vp, 0), true);
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecPrefixMatch(source, NULL, 1) - should fatal\n");
        BitVec source = BitVecInit(ALLOCATOR_OF(&alloc));
        BitVecPush(&source, true);
    bool test_bitvec_suffix_match_null_source(void) {
        DefaultAllocator alloc = DefaultAllocatorInit();
        WriteFmt("Testing BitVecSuffixMatch(NULL, patterns, 1) - should fatal\n");
        BitVecs vp = VecInitWithDeepCopy(NULL, BitVecDeinit, ALLOCATOR_OF(&alloc));
        BitVecPush(VecPtrAt(&vp, 0), true);
        DefaultAllocator alloc = DefaultAllocatorInit();
    
        WriteFmt("Testing BitVecSuffixMatch(source, NULL, 1) - should fatal\n");
        BitVec source = BitVecInit(ALLOCATOR_OF(&alloc));
        BitVecPush(&source, true);
    // Main function that runs all deadend tests
    int main(void) {
        WriteFmt("[INFO] Starting BitVec.Pattern.Deadend tests\n\n");
    
        // Deadend tests that would cause program termination
    
    int main(void) {
        WriteFmt("[INFO] Starting Pe tests\n\n");
    
        TestFunction tests[] = {
Last updated on