diff --git a/SLS_C/include/tests/lexer_test_helpers.h b/SLS_C/include/tests/lexer_test_helpers.h index 6c678d2..f58e2c0 100644 --- a/SLS_C/include/tests/lexer_test_helpers.h +++ b/SLS_C/include/tests/lexer_test_helpers.h @@ -110,9 +110,10 @@ TestResult pass_test(LexerTest *test, LexerResult result); Boolean test_eof_value(LexerTest *test, LexerResult result, size_t i, void *_); Boolean test_identifier_value(LexerTest *test, LexerResult result, size_t i, TestIdentifierValue *value); Boolean test_integer_value(LexerTest *test, LexerResult result, size_t i, TestIntegerValue *value); +Boolean test_character_value(LexerTest *test, LexerResult result, size_t i, uint8_t *value); Boolean test_float_value(LexerTest *test, LexerResult result, size_t i, float *value); Boolean test_double_value(LexerTest *test, LexerResult result, size_t i, double *value); -Boolean test_string_value(LexerTest *test, LexerResult result, size_t i, SlsStr value); +Boolean test_string_value(LexerTest *test, LexerResult result, size_t i, SlsStr *value); Boolean test_boolean_value(LexerTest *test, LexerResult result, size_t i, Boolean *value); Boolean test_array_identifier_value(LexerTest *test, LexerResult result, size_t i, TestArrayIdentifierValue *values); Boolean test_array_integer_value(LexerTest *test, LexerResult result, size_t i, TestArrayIntegerValue *values); diff --git a/SLS_C/tests/lexer_test_helpers.c b/SLS_C/tests/lexer_test_helpers.c index 957baa9..4c121af 100644 --- a/SLS_C/tests/lexer_test_helpers.c +++ b/SLS_C/tests/lexer_test_helpers.c @@ -326,16 +326,16 @@ Boolean test_double_value(LexerTest *test, LexerResult result, size_t i, double return FALSE; } -Boolean test_string_value(LexerTest *test, LexerResult result, size_t i, SlsStr value) { +Boolean test_string_value(LexerTest *test, LexerResult result, size_t i, SlsStr *value) { static const TokenType token_type = TOKEN_STRING; LexerTokenResult *head = get_token(result.result, i); if (test_token_type(test, result, i, token_type)) { return TRUE; - } if (head->result.string_literal.len == value.len) { - logic_fail_test(test, result, token_length_should_be(i + 1, token_type, value.len, head->result.string_literal.len)); + } if (head->result.string_literal.len == value->len) { + logic_fail_test(test, result, token_length_should_be(i + 1, token_type, value->len, head->result.string_literal.len)); return TRUE; - } if (sls_str_cmp(head->result.string_literal, value) != 0) { - logic_fail_test(test, result, token_value_string_should_be(i + 1, token_type, value, head->result.string_literal)); + } if (sls_str_cmp(head->result.string_literal, *value) != 0) { + logic_fail_test(test, result, token_value_string_should_be(i + 1, token_type, *value, head->result.string_literal)); return TRUE; } return FALSE; diff --git a/SLS_C/tests/lexer_tests.c b/SLS_C/tests/lexer_tests.c index 6404d9d..286a4b8 100644 --- a/SLS_C/tests/lexer_tests.c +++ b/SLS_C/tests/lexer_tests.c @@ -16,10 +16,10 @@ #include "tests/tests.h" -static const size_t NUM_OF_TESTS = 294; +static const size_t NUM_OF_TESTS = 369; static TestResult test_Empty_Statement() { - LexerTest test = start_up_test(SLS_STR("test_Empty_Statement"), SLS_STR("")); + LexerTest test = start_up_test(SLS_STR("Empty_Statement"), SLS_STR("")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -28,7 +28,7 @@ static TestResult test_Empty_Statement() { } static TestResult test_Integer_Default_Decimal_0() { - LexerTest test = start_up_test(SLS_STR("test_Integer_Default_Decimal_0"), SLS_STR("0")); + LexerTest test = start_up_test(SLS_STR("Integer Default Decimal 0"), SLS_STR("0")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -38,7 +38,7 @@ static TestResult test_Integer_Default_Decimal_0() { } static TestResult test_Integer_Default_Decimal_1() { - LexerTest test = start_up_test(SLS_STR("test_Integer_Default_Decimal_1"), SLS_STR("-1")); + LexerTest test = start_up_test(SLS_STR("Integer Default Decimal -1"), SLS_STR("-1")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -48,7 +48,7 @@ static TestResult test_Integer_Default_Decimal_1() { } static TestResult test_Integer_Default_Decimal_42() { - LexerTest test = start_up_test(SLS_STR("test_Integer_Default_Decimal_42"), SLS_STR("42")); + LexerTest test = start_up_test(SLS_STR("Integer Default Decimal 42"), SLS_STR("42")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -58,7 +58,7 @@ static TestResult test_Integer_Default_Decimal_42() { } static TestResult test_Integer_Default_Decimal_Leading_Zeros() { - LexerTest test = start_up_test(SLS_STR("test_Integer_Default_Decimal_Leading_Zeros"), SLS_STR("00042")); + LexerTest test = start_up_test(SLS_STR("Integer Default Decimal Leading Zeros"), SLS_STR("00042")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -68,7 +68,7 @@ static TestResult test_Integer_Default_Decimal_Leading_Zeros() { } static TestResult test_Integer_Default_Hex_0xFF() { - LexerTest test = start_up_test(SLS_STR("test_Integer_Default_Hex_0xFF"), SLS_STR("0xFF")); + LexerTest test = start_up_test(SLS_STR("Integer Default Hex 0xFF"), SLS_STR("0xFF")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -78,7 +78,7 @@ static TestResult test_Integer_Default_Hex_0xFF() { } static TestResult test_Integer_Default_Hex_0xdeadbeef() { - LexerTest test = start_up_test(SLS_STR("test_Integer_Default_Hex_0xdeadbeef"), SLS_STR("0xdeadbeef")); + LexerTest test = start_up_test(SLS_STR("Integer Default Hex 0xdeadbeef"), SLS_STR("0xdeadbeef")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -88,7 +88,7 @@ static TestResult test_Integer_Default_Hex_0xdeadbeef() { } static TestResult test_Integer_Default_Hex_Max() { - LexerTest test = start_up_test(SLS_STR("test_Integer_Default_Hex_Max"), SLS_STR("0x7FFFFFFFFFFFFFFF")); + LexerTest test = start_up_test(SLS_STR("Integer Default Hex Max"), SLS_STR("0x7FFFFFFFFFFFFFFF")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -98,7 +98,7 @@ static TestResult test_Integer_Default_Hex_Max() { } static TestResult test_Integer_Default_Binary_0b1010() { - LexerTest test = start_up_test(SLS_STR("test_Integer_Default_Binary_0b1010"), SLS_STR("0b1010")); + LexerTest test = start_up_test(SLS_STR("Integer Default Binary 0b1010"), SLS_STR("0b1010")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -108,7 +108,7 @@ static TestResult test_Integer_Default_Binary_0b1010() { } static TestResult test_Integer_Default_Binary_All_Ones() { - LexerTest test = start_up_test(SLS_STR("test_Integer_Default_Binary_All_Ones"), SLS_STR("0b1111111111111111")); + LexerTest test = start_up_test(SLS_STR("Integer Default Binary All Ones"), SLS_STR("0b1111111111111111")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -118,7 +118,7 @@ static TestResult test_Integer_Default_Binary_All_Ones() { } static TestResult test_Integer_Default_Octal_0o755() { - LexerTest test = start_up_test(SLS_STR("test_Integer_Default_Octal_0o755"), SLS_STR("0o755")); + LexerTest test = start_up_test(SLS_STR("Integer Default Octal 0o755"), SLS_STR("0o755")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -128,7 +128,7 @@ static TestResult test_Integer_Default_Octal_0o755() { } static TestResult test_Integer_Default_Octal_Max_Three_Digits() { - LexerTest test = start_up_test(SLS_STR("test_Integer_Default_Octal_Max_Three_Digits"), SLS_STR("0o777")); + LexerTest test = start_up_test(SLS_STR("Integer Default Octal Max Three Digits"), SLS_STR("0o777")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -138,7 +138,7 @@ static TestResult test_Integer_Default_Octal_Max_Three_Digits() { } static TestResult test_Integer_Default_Decimal_Max_i64() { - LexerTest test = start_up_test(SLS_STR("test_Integer_Default_Decimal_Max_i64"), SLS_STR("9223372036854775807")); + LexerTest test = start_up_test(SLS_STR("Integer Default Decimal Max i64"), SLS_STR("9223372036854775807")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -148,17 +148,17 @@ static TestResult test_Integer_Default_Decimal_Max_i64() { } static TestResult test_Integer_Default_Decimal_Min_i64() { - LexerTest test = start_up_test(SLS_STR("test_Integer_Default_Decimal_Min_i64"), SLS_STR("-9223372036854775808")); + LexerTest test = start_up_test(SLS_STR("Integer Default Decimal Min i64"), SLS_STR("-9223372036854775808")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; - if (test_integer_value(&test, result, i++, &(TestIntegerValue){INTEGER_I64, -9223372036854775808})) return test.result; + if (test_integer_value(&test, result, i++, &(TestIntegerValue){INTEGER_I64, INT64_MIN})) return test.result; if (test_eof_value(&test, result, i++, 0)) return test.result; return pass_test(&test, result); } static TestResult test_Integer_Default_Decimal_with_Underscore() { - LexerTest test = start_up_test(SLS_STR("test_Integer_Default_Decimal_with_Underscore"), SLS_STR("1_000_000")); + LexerTest test = start_up_test(SLS_STR("Integer Default Decimal with Underscore"), SLS_STR("1_000_000")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -168,7 +168,7 @@ static TestResult test_Integer_Default_Decimal_with_Underscore() { } static TestResult test_Integer_Default_Underscore_End() { - LexerTest test = start_up_test(SLS_STR("test_Integer_Default_Underscore_End"), SLS_STR("42_")); + LexerTest test = start_up_test(SLS_STR("Integer Default Underscore End"), SLS_STR("42_")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -178,7 +178,7 @@ static TestResult test_Integer_Default_Underscore_End() { } static TestResult test_Integer_Default_Underscore_Double() { - LexerTest test = start_up_test(SLS_STR("test_Integer_Default_Underscore_Double"), SLS_STR("4__2")); + LexerTest test = start_up_test(SLS_STR("Integer Default Underscore Double"), SLS_STR("4__2")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -188,7 +188,7 @@ static TestResult test_Integer_Default_Underscore_Double() { } static TestResult test_Integer_Default_Whitespace() { - LexerTest test = start_up_test(SLS_STR("test_Integer_Default_Whitespace"), SLS_STR(" 42 ")); + LexerTest test = start_up_test(SLS_STR("Integer Default Whitespace"), SLS_STR(" 42 ")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -198,7 +198,7 @@ static TestResult test_Integer_Default_Whitespace() { } static TestResult test_Integer_Default_Hex_Zero() { - LexerTest test = start_up_test(SLS_STR("test_Integer_Default_Hex_Zero"), SLS_STR("0x0")); + LexerTest test = start_up_test(SLS_STR("Integer Default Hex Zero"), SLS_STR("0x0")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -208,7 +208,7 @@ static TestResult test_Integer_Default_Hex_Zero() { } static TestResult test_Integer_Default_Binary_Zero() { - LexerTest test = start_up_test(SLS_STR("test_Integer_Default_Binary_Zero"), SLS_STR("0b0")); + LexerTest test = start_up_test(SLS_STR("Integer Default Binary Zero"), SLS_STR("0b0")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -218,7 +218,7 @@ static TestResult test_Integer_Default_Binary_Zero() { } static TestResult test_Integer_Default_Octal_Zero() { - LexerTest test = start_up_test(SLS_STR("test_Integer_Default_Octal_Zero"), SLS_STR("0o0")); + LexerTest test = start_up_test(SLS_STR("Integer Default Octal Zero"), SLS_STR("0o0")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -228,7 +228,7 @@ static TestResult test_Integer_Default_Octal_Zero() { } static TestResult test_Integer_Default_Decimal_with_Commas_Invalid() { - LexerTest test = start_up_test(SLS_STR("test_Integer_Default_Decimal_with_Commas_Invalid"), SLS_STR("1,000,000")); + LexerTest test = start_up_test(SLS_STR("Integer Default Decimal with Commas Invalid"), SLS_STR("1,000,000")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -237,7 +237,7 @@ static TestResult test_Integer_Default_Decimal_with_Commas_Invalid() { } static TestResult test_Integer_Default_Invalid_Characters() { - LexerTest test = start_up_test(SLS_STR("test_Integer_Default_Invalid_Characters"), SLS_STR("12a3")); + LexerTest test = start_up_test(SLS_STR("Integer Default Invalid Characters"), SLS_STR("12a3")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -246,7 +246,7 @@ static TestResult test_Integer_Default_Invalid_Characters() { } static TestResult test_Integer_Default_Invalid_Prefix() { - LexerTest test = start_up_test(SLS_STR("test_Integer_Default_Invalid_Prefix"), SLS_STR("0b2")); + LexerTest test = start_up_test(SLS_STR("Integer Default Invalid Prefix"), SLS_STR("0b2")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -255,7 +255,7 @@ static TestResult test_Integer_Default_Invalid_Prefix() { } static TestResult test_Integer_i8_Decimal_Positive() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i8_Decimal_Positive"), SLS_STR("42:i8")); + LexerTest test = start_up_test(SLS_STR("Integer i8 Decimal Positive"), SLS_STR("42:i8")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -265,7 +265,7 @@ static TestResult test_Integer_i8_Decimal_Positive() { } static TestResult test_Integer_i8_Zero() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i8_Zero"), SLS_STR("0:i8")); + LexerTest test = start_up_test(SLS_STR("Integer i8 Zero"), SLS_STR("0:i8")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -275,7 +275,7 @@ static TestResult test_Integer_i8_Zero() { } static TestResult test_Integer_i8_Decimal_Negative() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i8_Decimal_Negative"), SLS_STR("-100:i8")); + LexerTest test = start_up_test(SLS_STR("Integer i8 Decimal Negative"), SLS_STR("-100:i8")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -285,7 +285,7 @@ static TestResult test_Integer_i8_Decimal_Negative() { } static TestResult test_Integer_i8_Hex() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i8_Hex"), SLS_STR("0x7F:i8")); + LexerTest test = start_up_test(SLS_STR("Integer i8 Hex"), SLS_STR("0x7F:i8")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -295,7 +295,7 @@ static TestResult test_Integer_i8_Hex() { } static TestResult test_Integer_i8_Binary() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i8_Binary"), SLS_STR("0b1111:i8")); + LexerTest test = start_up_test(SLS_STR("Integer i8 Binary"), SLS_STR("0b1111:i8")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -305,7 +305,7 @@ static TestResult test_Integer_i8_Binary() { } static TestResult test_Integer_i8_Octal() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i8_Octal"), SLS_STR("0o77:i8")); + LexerTest test = start_up_test(SLS_STR("Integer i8 Octal"), SLS_STR("0o77:i8")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -315,7 +315,7 @@ static TestResult test_Integer_i8_Octal() { } static TestResult test_Integer_i8_Max_Value() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i8_Max_Value"), SLS_STR("127:i8")); + LexerTest test = start_up_test(SLS_STR("Integer i8 Max Value"), SLS_STR("127:i8")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -325,7 +325,7 @@ static TestResult test_Integer_i8_Max_Value() { } static TestResult test_Integer_i8_Min_Value() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i8_Min_Value"), SLS_STR("-128:i8")); + LexerTest test = start_up_test(SLS_STR("Integer i8 Min Value"), SLS_STR("-128:i8")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -335,7 +335,7 @@ static TestResult test_Integer_i8_Min_Value() { } static TestResult test_Integer_i8_Overflow() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i8_Overflow"), SLS_STR("128:i8")); + LexerTest test = start_up_test(SLS_STR("Integer i8 Overflow"), SLS_STR("128:i8")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -344,7 +344,7 @@ static TestResult test_Integer_i8_Overflow() { } static TestResult test_Integer_i8_Underflow() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i8_Underflow"), SLS_STR("-129:i8")); + LexerTest test = start_up_test(SLS_STR("Integer i8 Underflow"), SLS_STR("-129:i8")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -353,7 +353,7 @@ static TestResult test_Integer_i8_Underflow() { } static TestResult test_Integer_i8_Hex_Max() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i8_Hex_Max"), SLS_STR("0x7F:i8")); + LexerTest test = start_up_test(SLS_STR("Integer i8 Hex Max"), SLS_STR("0x7F:i8")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -363,7 +363,7 @@ static TestResult test_Integer_i8_Hex_Max() { } static TestResult test_Integer_i8_Binary_Max() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i8_Binary_Max"), SLS_STR("0b01111111:i8")); + LexerTest test = start_up_test(SLS_STR("Integer i8 Binary Max"), SLS_STR("0b01111111:i8")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -373,7 +373,7 @@ static TestResult test_Integer_i8_Binary_Max() { } static TestResult test_Integer_i8_Octal_Max() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i8_Octal_Max"), SLS_STR("0o177:i8")); + LexerTest test = start_up_test(SLS_STR("Integer i8 Octal Max"), SLS_STR("0o177:i8")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -383,7 +383,7 @@ static TestResult test_Integer_i8_Octal_Max() { } static TestResult test_Integer_i8_Negative_Hex() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i8_Negative_Hex"), SLS_STR("-0x80:i8")); + LexerTest test = start_up_test(SLS_STR("Integer i8 Negative Hex"), SLS_STR("-0x80:i8")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -393,7 +393,7 @@ static TestResult test_Integer_i8_Negative_Hex() { } static TestResult test_Integer_i16_Decimal_Positive() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i16_Decimal_Positive"), SLS_STR("42:i16")); + LexerTest test = start_up_test(SLS_STR("Integer i16 Decimal Positive"), SLS_STR("42:i16")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -403,7 +403,7 @@ static TestResult test_Integer_i16_Decimal_Positive() { } static TestResult test_Integer_i16_Zero() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i16_Zero"), SLS_STR("0:i16")); + LexerTest test = start_up_test(SLS_STR("Integer i16 Zero"), SLS_STR("0:i16")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -413,7 +413,7 @@ static TestResult test_Integer_i16_Zero() { } static TestResult test_Integer_i16_Decimal_Negative() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i16_Decimal_Negative"), SLS_STR("-100:i16")); + LexerTest test = start_up_test(SLS_STR("Integer i16 Decimal Negative"), SLS_STR("-100:i16")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -423,7 +423,7 @@ static TestResult test_Integer_i16_Decimal_Negative() { } static TestResult test_Integer_i16_Hex() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i16_Hex"), SLS_STR("0xFF:i16")); + LexerTest test = start_up_test(SLS_STR("Integer i16 Hex"), SLS_STR("0xFF:i16")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -433,7 +433,7 @@ static TestResult test_Integer_i16_Hex() { } static TestResult test_Integer_i16_Binary() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i16_Binary"), SLS_STR("0b1111:i16")); + LexerTest test = start_up_test(SLS_STR("Integer i16 Binary"), SLS_STR("0b1111:i16")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -443,7 +443,7 @@ static TestResult test_Integer_i16_Binary() { } static TestResult test_Integer_i16_Octal() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i16_Octal"), SLS_STR("0o77:i16")); + LexerTest test = start_up_test(SLS_STR("Integer i16 Octal"), SLS_STR("0o77:i16")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -453,7 +453,7 @@ static TestResult test_Integer_i16_Octal() { } static TestResult test_Integer_i16_Max_Value() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i16_Max_Value"), SLS_STR("32767:i16")); + LexerTest test = start_up_test(SLS_STR("Integer i16 Max Value"), SLS_STR("32767:i16")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -463,7 +463,7 @@ static TestResult test_Integer_i16_Max_Value() { } static TestResult test_Integer_i16_Min_Value() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i16_Min_Value"), SLS_STR("-32768:i16")); + LexerTest test = start_up_test(SLS_STR("Integer i16 Min Value"), SLS_STR("-32768:i16")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -473,7 +473,7 @@ static TestResult test_Integer_i16_Min_Value() { } static TestResult test_Integer_i16_Overflow() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i16_Overflow"), SLS_STR("32768:i16")); + LexerTest test = start_up_test(SLS_STR("Integer i16 Overflow"), SLS_STR("32768:i16")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -482,7 +482,7 @@ static TestResult test_Integer_i16_Overflow() { } static TestResult test_Integer_i16_Underflow() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i16_Underflow"), SLS_STR("-32769:i16")); + LexerTest test = start_up_test(SLS_STR("Integer i16 Underflow"), SLS_STR("-32769:i16")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -491,7 +491,7 @@ static TestResult test_Integer_i16_Underflow() { } static TestResult test_Integer_i16_Hex_Sample() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i16_Hex_Sample"), SLS_STR("0x1234:i16")); + LexerTest test = start_up_test(SLS_STR("Integer i16 Hex Sample"), SLS_STR("0x1234:i16")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -501,7 +501,7 @@ static TestResult test_Integer_i16_Hex_Sample() { } static TestResult test_Integer_i16_Binary_Sample() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i16_Binary_Sample"), SLS_STR("0b1111111100000000:i16")); + LexerTest test = start_up_test(SLS_STR("Integer i16 Binary Sample"), SLS_STR("0b1111111100000000:i16")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -511,7 +511,7 @@ static TestResult test_Integer_i16_Binary_Sample() { } static TestResult test_Integer_i16_Octal_Sample() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i16_Octal_Sample"), SLS_STR("0o1234:i16")); + LexerTest test = start_up_test(SLS_STR("Integer i16 Octal Sample"), SLS_STR("0o1234:i16")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -521,7 +521,7 @@ static TestResult test_Integer_i16_Octal_Sample() { } static TestResult test_Integer_i32_Decimal_Positive() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i32_Decimal_Positive"), SLS_STR("42:i32")); + LexerTest test = start_up_test(SLS_STR("Integer i32 Decimal Positive"), SLS_STR("42:i32")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -531,7 +531,7 @@ static TestResult test_Integer_i32_Decimal_Positive() { } static TestResult test_Integer_i32_Zero() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i32_Zero"), SLS_STR("0:i32")); + LexerTest test = start_up_test(SLS_STR("Integer i32 Zero"), SLS_STR("0:i32")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -541,7 +541,7 @@ static TestResult test_Integer_i32_Zero() { } static TestResult test_Integer_i32_Decimal_Negative() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i32_Decimal_Negative"), SLS_STR("-100:i32")); + LexerTest test = start_up_test(SLS_STR("Integer i32 Decimal Negative"), SLS_STR("-100:i32")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -551,7 +551,7 @@ static TestResult test_Integer_i32_Decimal_Negative() { } static TestResult test_Integer_i32_Hex() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i32_Hex"), SLS_STR("0xFF:i32")); + LexerTest test = start_up_test(SLS_STR("Integer i32 Hex"), SLS_STR("0xFF:i32")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -561,7 +561,7 @@ static TestResult test_Integer_i32_Hex() { } static TestResult test_Integer_i32_Binary() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i32_Binary"), SLS_STR("0b1111:i32")); + LexerTest test = start_up_test(SLS_STR("Integer i32 Binary"), SLS_STR("0b1111:i32")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -571,7 +571,7 @@ static TestResult test_Integer_i32_Binary() { } static TestResult test_Integer_i32_Octal() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i32_Octal"), SLS_STR("0o77:i32")); + LexerTest test = start_up_test(SLS_STR("Integer i32 Octal"), SLS_STR("0o77:i32")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -581,7 +581,7 @@ static TestResult test_Integer_i32_Octal() { } static TestResult test_Integer_i32_Max_Value() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i32_Max_Value"), SLS_STR("2147483647:i32")); + LexerTest test = start_up_test(SLS_STR("Integer i32 Max Value"), SLS_STR("2147483647:i32")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -591,7 +591,7 @@ static TestResult test_Integer_i32_Max_Value() { } static TestResult test_Integer_i32_Min_Value() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i32_Min_Value"), SLS_STR("-2147483648:i32")); + LexerTest test = start_up_test(SLS_STR("Integer i32 Min Value"), SLS_STR("-2147483648:i32")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -601,7 +601,7 @@ static TestResult test_Integer_i32_Min_Value() { } static TestResult test_Integer_i32_Overflow() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i32_Overflow"), SLS_STR("2147483648:i32")); + LexerTest test = start_up_test(SLS_STR("Integer i32 Overflow"), SLS_STR("2147483648:i32")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -610,7 +610,7 @@ static TestResult test_Integer_i32_Overflow() { } static TestResult test_Integer_i32_Underflow() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i32_Underflow"), SLS_STR("-2147483649:i32")); + LexerTest test = start_up_test(SLS_STR("Integer i32 Underflow"), SLS_STR("-2147483649:i32")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -619,7 +619,7 @@ static TestResult test_Integer_i32_Underflow() { } static TestResult test_Integer_i32_With_Underscores() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i32_With_Underscores"), SLS_STR("1_000_000:i32")); + LexerTest test = start_up_test(SLS_STR("Integer i32 With Underscores"), SLS_STR("1_000_000:i32")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -629,7 +629,7 @@ static TestResult test_Integer_i32_With_Underscores() { } static TestResult test_Integer_i32_Hex_Sample() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i32_Hex_Sample"), SLS_STR("0xABCD:i32")); + LexerTest test = start_up_test(SLS_STR("Integer i32 Hex Sample"), SLS_STR("0xABCD:i32")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -639,7 +639,7 @@ static TestResult test_Integer_i32_Hex_Sample() { } static TestResult test_Integer_i32_Binary_Sample() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i32_Binary_Sample"), SLS_STR("0b11110000:i32")); + LexerTest test = start_up_test(SLS_STR("Integer i32 Binary Sample"), SLS_STR("0b11110000:i32")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -649,7 +649,7 @@ static TestResult test_Integer_i32_Binary_Sample() { } static TestResult test_Integer_i64_Decimal_Positive() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i64_Decimal_Positive"), SLS_STR("42:i64")); + LexerTest test = start_up_test(SLS_STR("Integer i64 Decimal Positive"), SLS_STR("42:i64")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -659,7 +659,7 @@ static TestResult test_Integer_i64_Decimal_Positive() { } static TestResult test_Integer_i64_Zero() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i64_Zero"), SLS_STR("0:i64")); + LexerTest test = start_up_test(SLS_STR("Integer i64 Zero"), SLS_STR("0:i64")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -669,7 +669,7 @@ static TestResult test_Integer_i64_Zero() { } static TestResult test_Integer_i64_Decimal_Negative() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i64_Decimal_Negative"), SLS_STR("-100:i64")); + LexerTest test = start_up_test(SLS_STR("Integer i64 Decimal Negative"), SLS_STR("-100:i64")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -679,7 +679,7 @@ static TestResult test_Integer_i64_Decimal_Negative() { } static TestResult test_Integer_i64_Hex() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i64_Hex"), SLS_STR("0xFF:i64")); + LexerTest test = start_up_test(SLS_STR("Integer i64 Hex"), SLS_STR("0xFF:i64")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -689,7 +689,7 @@ static TestResult test_Integer_i64_Hex() { } static TestResult test_Integer_i64_Binary() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i64_Binary"), SLS_STR("0b1111:i64")); + LexerTest test = start_up_test(SLS_STR("Integer i64 Binary"), SLS_STR("0b1111:i64")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -699,7 +699,7 @@ static TestResult test_Integer_i64_Binary() { } static TestResult test_Integer_i64_Octal() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i64_Octal"), SLS_STR("0o77:i64")); + LexerTest test = start_up_test(SLS_STR("Integer i64 Octal"), SLS_STR("0o77:i64")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -709,7 +709,7 @@ static TestResult test_Integer_i64_Octal() { } static TestResult test_Integer_i64_Max_Value() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i64_Max_Value"), SLS_STR("9223372036854775807:i64")); + LexerTest test = start_up_test(SLS_STR("Integer i64 Max Value"), SLS_STR("9223372036854775807:i64")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -719,17 +719,17 @@ static TestResult test_Integer_i64_Max_Value() { } static TestResult test_Integer_i64_Min_Value() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i64_Min_Value"), SLS_STR("-9223372036854775808:i64")); + LexerTest test = start_up_test(SLS_STR("Integer i64 Min Value"), SLS_STR("-9223372036854775808:i64")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; - if (test_integer_value(&test, result, i++, &(TestIntegerValue){INTEGER_I64, -9223372036854775808})) return test.result; + if (test_integer_value(&test, result, i++, &(TestIntegerValue){INTEGER_I64, INT64_MIN})) return test.result; if (test_eof_value(&test, result, i++, 0)) return test.result; return pass_test(&test, result); } static TestResult test_Integer_i64_Overflow() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i64_Overflow"), SLS_STR("9223372036854775808:i64")); + LexerTest test = start_up_test(SLS_STR("Integer i64 Overflow"), SLS_STR("9223372036854775808:i64")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -738,7 +738,7 @@ static TestResult test_Integer_i64_Overflow() { } static TestResult test_Integer_i64_Underflow() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i64_Underflow"), SLS_STR("-9223372036854775809:i64")); + LexerTest test = start_up_test(SLS_STR("Integer i64 Underflow"), SLS_STR("-9223372036854775809:i64")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -747,7 +747,7 @@ static TestResult test_Integer_i64_Underflow() { } static TestResult test_Integer_i64_With_Underscores() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i64_With_Underscores"), SLS_STR("1_000_000:i64")); + LexerTest test = start_up_test(SLS_STR("Integer i64 With Underscores"), SLS_STR("1_000_000:i64")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -757,7 +757,7 @@ static TestResult test_Integer_i64_With_Underscores() { } static TestResult test_Integer_i64_Decimal_Positive_42() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i64_Decimal_Positive_42"), SLS_STR("42:i64")); + LexerTest test = start_up_test(SLS_STR("Integer i64 Decimal Positive 42"), SLS_STR("42:i64")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -767,7 +767,7 @@ static TestResult test_Integer_i64_Decimal_Positive_42() { } static TestResult test_Integer_i64_Hex_0xFF() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i64_Hex_0xFF"), SLS_STR("0xFF:i64")); + LexerTest test = start_up_test(SLS_STR("Integer i64 Hex 0xFF"), SLS_STR("0xFF:i64")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -777,7 +777,7 @@ static TestResult test_Integer_i64_Hex_0xFF() { } static TestResult test_Integer_i64_Binary_0b1010() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i64_Binary_0b1010"), SLS_STR("0b1010:i64")); + LexerTest test = start_up_test(SLS_STR("Integer i64 Binary 0b1010"), SLS_STR("0b1010:i64")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -787,7 +787,7 @@ static TestResult test_Integer_i64_Binary_0b1010() { } static TestResult test_Integer_i64_Octal_0o755() { - LexerTest test = start_up_test(SLS_STR("test_Integer_i64_Octal_0o755"), SLS_STR("0o755:i64")); + LexerTest test = start_up_test(SLS_STR("Integer i64 Octal 0o755"), SLS_STR("0o755:i64")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -797,7 +797,7 @@ static TestResult test_Integer_i64_Octal_0o755() { } static TestResult test_Integer_u8_Decimal_Positive() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u8_Decimal_Positive"), SLS_STR("42:u8")); + LexerTest test = start_up_test(SLS_STR("Integer u8 Decimal Positive"), SLS_STR("42:u8")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -807,7 +807,7 @@ static TestResult test_Integer_u8_Decimal_Positive() { } static TestResult test_Integer_u8_Zero() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u8_Zero"), SLS_STR("0:u8")); + LexerTest test = start_up_test(SLS_STR("Integer u8 Zero"), SLS_STR("0:u8")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -817,7 +817,7 @@ static TestResult test_Integer_u8_Zero() { } static TestResult test_Integer_u8_Hex() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u8_Hex"), SLS_STR("0xFF:u8")); + LexerTest test = start_up_test(SLS_STR("Integer u8 Hex"), SLS_STR("0xFF:u8")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -827,7 +827,7 @@ static TestResult test_Integer_u8_Hex() { } static TestResult test_Integer_u8_Binary() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u8_Binary"), SLS_STR("0b1111:u8")); + LexerTest test = start_up_test(SLS_STR("Integer u8 Binary"), SLS_STR("0b1111:u8")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -837,7 +837,7 @@ static TestResult test_Integer_u8_Binary() { } static TestResult test_Integer_u8_Octal() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u8_Octal"), SLS_STR("0o77:u8")); + LexerTest test = start_up_test(SLS_STR("Integer u8 Octal"), SLS_STR("0o77:u8")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -847,7 +847,7 @@ static TestResult test_Integer_u8_Octal() { } static TestResult test_Integer_u8_Max_Value() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u8_Max_Value"), SLS_STR("255:u8")); + LexerTest test = start_up_test(SLS_STR("Integer u8 Max Value"), SLS_STR("255:u8")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -857,7 +857,7 @@ static TestResult test_Integer_u8_Max_Value() { } static TestResult test_Integer_u8_Min_Value() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u8_Min_Value"), SLS_STR("0:u8")); + LexerTest test = start_up_test(SLS_STR("Integer u8 Min Value"), SLS_STR("0:u8")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -867,7 +867,7 @@ static TestResult test_Integer_u8_Min_Value() { } static TestResult test_Integer_u8_Overflow() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u8_Overflow"), SLS_STR("256:u8")); + LexerTest test = start_up_test(SLS_STR("Integer u8 Overflow"), SLS_STR("256:u8")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -876,7 +876,7 @@ static TestResult test_Integer_u8_Overflow() { } static TestResult test_Integer_u8_Underflow() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u8_Underflow"), SLS_STR("-1:u8")); + LexerTest test = start_up_test(SLS_STR("Integer u8 Underflow"), SLS_STR("-1:u8")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -885,7 +885,7 @@ static TestResult test_Integer_u8_Underflow() { } static TestResult test_Integer_u8_Hex_Max() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u8_Hex_Max"), SLS_STR("0xFF:u8")); + LexerTest test = start_up_test(SLS_STR("Integer u8 Hex Max"), SLS_STR("0xFF:u8")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -895,7 +895,7 @@ static TestResult test_Integer_u8_Hex_Max() { } static TestResult test_Integer_u8_Binary_Max() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u8_Binary_Max"), SLS_STR("0b11111111:u8")); + LexerTest test = start_up_test(SLS_STR("Integer u8 Binary Max"), SLS_STR("0b11111111:u8")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -905,7 +905,7 @@ static TestResult test_Integer_u8_Binary_Max() { } static TestResult test_Integer_u8_Octal_Max() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u8_Octal_Max"), SLS_STR("0o377:u8")); + LexerTest test = start_up_test(SLS_STR("Integer u8 Octal Max"), SLS_STR("0o377:u8")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -915,7 +915,7 @@ static TestResult test_Integer_u8_Octal_Max() { } static TestResult test_Integer_u16_Decimal_Positive() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u16_Decimal_Positive"), SLS_STR("42:u16")); + LexerTest test = start_up_test(SLS_STR("Integer u16 Decimal Positive"), SLS_STR("42:u16")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -925,7 +925,7 @@ static TestResult test_Integer_u16_Decimal_Positive() { } static TestResult test_Integer_u16_Zero() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u16_Zero"), SLS_STR("0:u16")); + LexerTest test = start_up_test(SLS_STR("Integer u16 Zero"), SLS_STR("0:u16")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -935,7 +935,7 @@ static TestResult test_Integer_u16_Zero() { } static TestResult test_Integer_u16_Hex() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u16_Hex"), SLS_STR("0xFF:u16")); + LexerTest test = start_up_test(SLS_STR("Integer u16 Hex"), SLS_STR("0xFF:u16")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -945,7 +945,7 @@ static TestResult test_Integer_u16_Hex() { } static TestResult test_Integer_u16_Binary() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u16_Binary"), SLS_STR("0b1111:u16")); + LexerTest test = start_up_test(SLS_STR("Integer u16 Binary"), SLS_STR("0b1111:u16")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -955,7 +955,7 @@ static TestResult test_Integer_u16_Binary() { } static TestResult test_Integer_u16_Octal() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u16_Octal"), SLS_STR("0o77:u16")); + LexerTest test = start_up_test(SLS_STR("Integer u16 Octal"), SLS_STR("0o77:u16")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -965,7 +965,7 @@ static TestResult test_Integer_u16_Octal() { } static TestResult test_Integer_u16_Max_Value() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u16_Max_Value"), SLS_STR("65535:u16")); + LexerTest test = start_up_test(SLS_STR("Integer u16 Max Value"), SLS_STR("65535:u16")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -975,7 +975,7 @@ static TestResult test_Integer_u16_Max_Value() { } static TestResult test_Integer_u16_Min_Value() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u16_Min_Value"), SLS_STR("0:u16")); + LexerTest test = start_up_test(SLS_STR("Integer u16 Min Value"), SLS_STR("0:u16")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -985,7 +985,7 @@ static TestResult test_Integer_u16_Min_Value() { } static TestResult test_Integer_u16_Overflow() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u16_Overflow"), SLS_STR("65536:u16")); + LexerTest test = start_up_test(SLS_STR("Integer u16 Overflow"), SLS_STR("65536:u16")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -994,7 +994,7 @@ static TestResult test_Integer_u16_Overflow() { } static TestResult test_Integer_u16_Underflow() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u16_Underflow"), SLS_STR("-1:u16")); + LexerTest test = start_up_test(SLS_STR("Integer u16 Underflow"), SLS_STR("-1:u16")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1003,7 +1003,7 @@ static TestResult test_Integer_u16_Underflow() { } static TestResult test_Integer_u16_Hex_Max() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u16_Hex_Max"), SLS_STR("0xFFFF:u16")); + LexerTest test = start_up_test(SLS_STR("Integer u16 Hex Max"), SLS_STR("0xFFFF:u16")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1013,7 +1013,7 @@ static TestResult test_Integer_u16_Hex_Max() { } static TestResult test_Integer_u16_Binary_Max() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u16_Binary_Max"), SLS_STR("0b1111111111111111:u16")); + LexerTest test = start_up_test(SLS_STR("Integer u16 Binary Max"), SLS_STR("0b1111111111111111:u16")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1023,7 +1023,7 @@ static TestResult test_Integer_u16_Binary_Max() { } static TestResult test_Integer_u16_Octal_Max() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u16_Octal_Max"), SLS_STR("0o177777:u16")); + LexerTest test = start_up_test(SLS_STR("Integer u16 Octal Max"), SLS_STR("0o177777:u16")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1033,7 +1033,7 @@ static TestResult test_Integer_u16_Octal_Max() { } static TestResult test_Integer_u16_Decimal_Mid() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u16_Decimal_Mid"), SLS_STR("50000:u16")); + LexerTest test = start_up_test(SLS_STR("Integer u16 Decimal Mid"), SLS_STR("50000:u16")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1043,7 +1043,7 @@ static TestResult test_Integer_u16_Decimal_Mid() { } static TestResult test_Integer_u32_Decimal_Positive() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u32_Decimal_Positive"), SLS_STR("42:u32")); + LexerTest test = start_up_test(SLS_STR("Integer u32 Decimal Positive"), SLS_STR("42:u32")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1053,7 +1053,7 @@ static TestResult test_Integer_u32_Decimal_Positive() { } static TestResult test_Integer_u32_Zero() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u32_Zero"), SLS_STR("0:u32")); + LexerTest test = start_up_test(SLS_STR("Integer u32 Zero"), SLS_STR("0:u32")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1063,7 +1063,7 @@ static TestResult test_Integer_u32_Zero() { } static TestResult test_Integer_u32_Hex() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u32_Hex"), SLS_STR("0xFF:u32")); + LexerTest test = start_up_test(SLS_STR("Integer u32 Hex"), SLS_STR("0xFF:u32")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1073,7 +1073,7 @@ static TestResult test_Integer_u32_Hex() { } static TestResult test_Integer_u32_Binary() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u32_Binary"), SLS_STR("0b1111:u32")); + LexerTest test = start_up_test(SLS_STR("Integer u32 Binary"), SLS_STR("0b1111:u32")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1083,7 +1083,7 @@ static TestResult test_Integer_u32_Binary() { } static TestResult test_Integer_u32_Octal() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u32_Octal"), SLS_STR("0o77:u32")); + LexerTest test = start_up_test(SLS_STR("Integer u32 Octal"), SLS_STR("0o77:u32")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1093,7 +1093,7 @@ static TestResult test_Integer_u32_Octal() { } static TestResult test_Integer_u32_Max_Value() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u32_Max_Value"), SLS_STR("4294967295:u32")); + LexerTest test = start_up_test(SLS_STR("Integer u32 Max Value"), SLS_STR("4294967295:u32")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1103,7 +1103,7 @@ static TestResult test_Integer_u32_Max_Value() { } static TestResult test_Integer_u32_Min_Value() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u32_Min_Value"), SLS_STR("0:u32")); + LexerTest test = start_up_test(SLS_STR("Integer u32 Min Value"), SLS_STR("0:u32")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1113,7 +1113,7 @@ static TestResult test_Integer_u32_Min_Value() { } static TestResult test_Integer_u32_Overflow() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u32_Overflow"), SLS_STR("4294967296:u32")); + LexerTest test = start_up_test(SLS_STR("Integer u32 Overflow"), SLS_STR("4294967296:u32")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1122,7 +1122,7 @@ static TestResult test_Integer_u32_Overflow() { } static TestResult test_Integer_u32_Underflow() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u32_Underflow"), SLS_STR("-1:u32")); + LexerTest test = start_up_test(SLS_STR("Integer u32 Underflow"), SLS_STR("-1:u32")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1131,7 +1131,7 @@ static TestResult test_Integer_u32_Underflow() { } static TestResult test_Integer_u32_With_Underscores() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u32_With_Underscores"), SLS_STR("1_000_000:u32")); + LexerTest test = start_up_test(SLS_STR("Integer u32 With Underscores"), SLS_STR("1_000_000:u32")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1141,7 +1141,7 @@ static TestResult test_Integer_u32_With_Underscores() { } static TestResult test_Integer_u32_Hex_Max() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u32_Hex_Max"), SLS_STR("0xFFFFFFFF:u32")); + LexerTest test = start_up_test(SLS_STR("Integer u32 Hex Max"), SLS_STR("0xFFFFFFFF:u32")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1151,7 +1151,7 @@ static TestResult test_Integer_u32_Hex_Max() { } static TestResult test_Integer_u32_Binary_Sample() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u32_Binary_Sample"), SLS_STR("0b11111111000000001111111100000000:u32")); + LexerTest test = start_up_test(SLS_STR("Integer u32 Binary Sample"), SLS_STR("0b11111111000000001111111100000000:u32")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1161,7 +1161,7 @@ static TestResult test_Integer_u32_Binary_Sample() { } static TestResult test_Integer_u32_Octal_Max() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u32_Octal_Max"), SLS_STR("0o37777777777:u32")); + LexerTest test = start_up_test(SLS_STR("Integer u32 Octal Max"), SLS_STR("0o37777777777:u32")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1171,7 +1171,7 @@ static TestResult test_Integer_u32_Octal_Max() { } static TestResult test_Integer_u32_Decimal_Mid() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u32_Decimal_Mid"), SLS_STR("1000000:u32")); + LexerTest test = start_up_test(SLS_STR("Integer u32 Decimal Mid"), SLS_STR("1000000:u32")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1181,7 +1181,7 @@ static TestResult test_Integer_u32_Decimal_Mid() { } static TestResult test_Integer_u64_Decimal_Positive() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u64_Decimal_Positive"), SLS_STR("42:u64")); + LexerTest test = start_up_test(SLS_STR("Integer u64 Decimal Positive"), SLS_STR("42:u64")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1191,7 +1191,7 @@ static TestResult test_Integer_u64_Decimal_Positive() { } static TestResult test_Integer_u64_Zero() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u64_Zero"), SLS_STR("0:u64")); + LexerTest test = start_up_test(SLS_STR("Integer u64 Zero"), SLS_STR("0:u64")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1201,7 +1201,7 @@ static TestResult test_Integer_u64_Zero() { } static TestResult test_Integer_u64_Hex() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u64_Hex"), SLS_STR("0xFF:u64")); + LexerTest test = start_up_test(SLS_STR("Integer u64 Hex"), SLS_STR("0xFF:u64")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1211,7 +1211,7 @@ static TestResult test_Integer_u64_Hex() { } static TestResult test_Integer_u64_Binary() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u64_Binary"), SLS_STR("0b1111:u64")); + LexerTest test = start_up_test(SLS_STR("Integer u64 Binary"), SLS_STR("0b1111:u64")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1221,7 +1221,7 @@ static TestResult test_Integer_u64_Binary() { } static TestResult test_Integer_u64_Octal() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u64_Octal"), SLS_STR("0o77:u64")); + LexerTest test = start_up_test(SLS_STR("Integer u64 Octal"), SLS_STR("0o77:u64")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1231,17 +1231,17 @@ static TestResult test_Integer_u64_Octal() { } static TestResult test_Integer_u64_Max_Value() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u64_Max_Value"), SLS_STR("18446744073709551615:u64")); + LexerTest test = start_up_test(SLS_STR("Integer u64 Max Value"), SLS_STR("18446744073709551615:u64")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; - if (test_integer_value(&test, result, i++, &(TestIntegerValue){INTEGER_U64, 18446744073709551615})) return test.result; + if (test_integer_value(&test, result, i++, &(TestIntegerValue){INTEGER_U64, UINT64_MAX})) return test.result; if (test_eof_value(&test, result, i++, 0)) return test.result; return pass_test(&test, result); } static TestResult test_Integer_u64_Min_Value() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u64_Min_Value"), SLS_STR("0:u64")); + LexerTest test = start_up_test(SLS_STR("Integer u64 Min Value"), SLS_STR("0:u64")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1251,7 +1251,7 @@ static TestResult test_Integer_u64_Min_Value() { } static TestResult test_Integer_u64_Overflow() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u64_Overflow"), SLS_STR("18446744073709551616:u64")); + LexerTest test = start_up_test(SLS_STR("Integer u64 Overflow"), SLS_STR("18446744073709551616:u64")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1260,7 +1260,7 @@ static TestResult test_Integer_u64_Overflow() { } static TestResult test_Integer_u64_Underflow() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u64_Underflow"), SLS_STR("-1:u64")); + LexerTest test = start_up_test(SLS_STR("Integer u64 Underflow"), SLS_STR("-1:u64")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1269,7 +1269,7 @@ static TestResult test_Integer_u64_Underflow() { } static TestResult test_Integer_u64_With_Underscores() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u64_With_Underscores"), SLS_STR("1_000_000:u64")); + LexerTest test = start_up_test(SLS_STR("Integer u64 With Underscores"), SLS_STR("1_000_000:u64")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1279,17 +1279,17 @@ static TestResult test_Integer_u64_With_Underscores() { } static TestResult test_Integer_u64_Hex_Max() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u64_Hex_Max"), SLS_STR("0xFFFFFFFFFFFFFFFF:u64")); + LexerTest test = start_up_test(SLS_STR("Integer u64 Hex Max"), SLS_STR("0xFFFFFFFFFFFFFFFF:u64")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; - if (test_integer_value(&test, result, i++, &(TestIntegerValue){INTEGER_U64, 18446744073709551615})) return test.result; + if (test_integer_value(&test, result, i++, &(TestIntegerValue){INTEGER_U64, UINT64_MAX})) return test.result; if (test_eof_value(&test, result, i++, 0)) return test.result; return pass_test(&test, result); } static TestResult test_Integer_u64_Binary_Sample() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u64_Binary_Sample"), SLS_STR("0b1010101010101010:u64")); + LexerTest test = start_up_test(SLS_STR("Integer u64 Binary Sample"), SLS_STR("0b1010101010101010:u64")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1299,7 +1299,7 @@ static TestResult test_Integer_u64_Binary_Sample() { } static TestResult test_Integer_u64_Octal_Sample() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u64_Octal_Sample"), SLS_STR("0o7777:u64")); + LexerTest test = start_up_test(SLS_STR("Integer u64 Octal Sample"), SLS_STR("0o7777:u64")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1309,7 +1309,7 @@ static TestResult test_Integer_u64_Octal_Sample() { } static TestResult test_Integer_u64_Decimal() { - LexerTest test = start_up_test(SLS_STR("test_Integer_u64_Decimal"), SLS_STR("42:u64")); + LexerTest test = start_up_test(SLS_STR("Integer u64 Decimal"), SLS_STR("42:u64")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1319,7 +1319,7 @@ static TestResult test_Integer_u64_Decimal() { } static TestResult test_Integer_Hex_With_Underscores() { - LexerTest test = start_up_test(SLS_STR("test_Integer_Hex_With_Underscores"), SLS_STR("0xDEAD_BEEF:i64")); + LexerTest test = start_up_test(SLS_STR("Integer Hex With Underscores"), SLS_STR("0xDEAD_BEEF:i64")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1329,7 +1329,7 @@ static TestResult test_Integer_Hex_With_Underscores() { } static TestResult test_Integer_Binary_With_Underscores() { - LexerTest test = start_up_test(SLS_STR("test_Integer_Binary_With_Underscores"), SLS_STR("0b1111_0000_1010_0101:i32")); + LexerTest test = start_up_test(SLS_STR("Integer Binary With Underscores"), SLS_STR("0b1111_0000_1010_0101:i32")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1339,7 +1339,7 @@ static TestResult test_Integer_Binary_With_Underscores() { } static TestResult test_Integer_Octal_With_Underscores() { - LexerTest test = start_up_test(SLS_STR("test_Integer_Octal_With_Underscores"), SLS_STR("0o7_7_7:i16")); + LexerTest test = start_up_test(SLS_STR("Integer Octal With Underscores"), SLS_STR("0o7_7_7:i16")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1349,7 +1349,7 @@ static TestResult test_Integer_Octal_With_Underscores() { } static TestResult test_Float_Default_Simple() { - LexerTest test = start_up_test(SLS_STR("test_Float_Default_Simple"), SLS_STR("3.14")); + LexerTest test = start_up_test(SLS_STR("Float Default Simple"), SLS_STR("3.14")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1359,7 +1359,7 @@ static TestResult test_Float_Default_Simple() { } static TestResult test_Float_Default_Zero() { - LexerTest test = start_up_test(SLS_STR("test_Float_Default_Zero"), SLS_STR("0.0")); + LexerTest test = start_up_test(SLS_STR("Float Default Zero"), SLS_STR("0.0")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1369,7 +1369,7 @@ static TestResult test_Float_Default_Zero() { } static TestResult test_Float_Default_Negative() { - LexerTest test = start_up_test(SLS_STR("test_Float_Default_Negative"), SLS_STR("-2.5")); + LexerTest test = start_up_test(SLS_STR("Float Default Negative"), SLS_STR("-2.5")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1379,7 +1379,7 @@ static TestResult test_Float_Default_Negative() { } static TestResult test_Float_Default_One() { - LexerTest test = start_up_test(SLS_STR("test_Float_Default_One"), SLS_STR("1.0")); + LexerTest test = start_up_test(SLS_STR("Float Default One"), SLS_STR("1.0")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1389,7 +1389,7 @@ static TestResult test_Float_Default_One() { } static TestResult test_Float_f32_Simple() { - LexerTest test = start_up_test(SLS_STR("test_Float_f32_Simple"), SLS_STR("3.14:f32")); + LexerTest test = start_up_test(SLS_STR("Float f32 Simple"), SLS_STR("3.14:f32")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1399,7 +1399,7 @@ static TestResult test_Float_f32_Simple() { } static TestResult test_Float_f64_Simple() { - LexerTest test = start_up_test(SLS_STR("test_Float_f64_Simple"), SLS_STR("2.718:f64")); + LexerTest test = start_up_test(SLS_STR("Float f64 Simple"), SLS_STR("2.718:f64")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1409,7 +1409,7 @@ static TestResult test_Float_f64_Simple() { } static TestResult test_Float_Default_Leading_Zeros() { - LexerTest test = start_up_test(SLS_STR("test_Float_Default_Leading_Zeros"), SLS_STR("00042.5")); + LexerTest test = start_up_test(SLS_STR("Float Default Leading Zeros"), SLS_STR("00042.5")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1419,7 +1419,7 @@ static TestResult test_Float_Default_Leading_Zeros() { } static TestResult test_Float_Default_Leading_Zero_Decimal() { - LexerTest test = start_up_test(SLS_STR("test_Float_Default_Leading_Zero_Decimal"), SLS_STR("0.5")); + LexerTest test = start_up_test(SLS_STR("Float Default Leading Zero Decimal"), SLS_STR("0.5")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1429,7 +1429,7 @@ static TestResult test_Float_Default_Leading_Zero_Decimal() { } static TestResult test_Float_Default_Trailing_Zeros() { - LexerTest test = start_up_test(SLS_STR("test_Float_Default_Trailing_Zeros"), SLS_STR("3.1400")); + LexerTest test = start_up_test(SLS_STR("Float Default Trailing Zeros"), SLS_STR("3.1400")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1439,7 +1439,7 @@ static TestResult test_Float_Default_Trailing_Zeros() { } static TestResult test_Float_Default_No_Leading_Digit() { - LexerTest test = start_up_test(SLS_STR("test_Float_Default_No_Leading_Digit"), SLS_STR(".5")); + LexerTest test = start_up_test(SLS_STR("Float Default No Leading Digit"), SLS_STR(".5")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1449,7 +1449,7 @@ static TestResult test_Float_Default_No_Leading_Digit() { } static TestResult test_Float_Default_No_Leading_Digit_Negative() { - LexerTest test = start_up_test(SLS_STR("test_Float_Default_No_Leading_Digit_Negative"), SLS_STR("-.25")); + LexerTest test = start_up_test(SLS_STR("Float Default No Leading Digit Negative"), SLS_STR("-.25")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1459,7 +1459,7 @@ static TestResult test_Float_Default_No_Leading_Digit_Negative() { } static TestResult test_Float_Default_No_Trailing_Digits() { - LexerTest test = start_up_test(SLS_STR("test_Float_Default_No_Trailing_Digits"), SLS_STR("42.")); + LexerTest test = start_up_test(SLS_STR("Float Default No Trailing Digits"), SLS_STR("42.")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1469,7 +1469,7 @@ static TestResult test_Float_Default_No_Trailing_Digits() { } static TestResult test_Float_Default_No_Trailing_Digits_Negative() { - LexerTest test = start_up_test(SLS_STR("test_Float_Default_No_Trailing_Digits_Negative"), SLS_STR("-7.")); + LexerTest test = start_up_test(SLS_STR("Float Default No Trailing Digits Negative"), SLS_STR("-7.")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1479,7 +1479,7 @@ static TestResult test_Float_Default_No_Trailing_Digits_Negative() { } static TestResult test_Float_Default_Scientific_Positive_Exp() { - LexerTest test = start_up_test(SLS_STR("test_Float_Default_Scientific_Positive_Exp"), SLS_STR("1.5e10")); + LexerTest test = start_up_test(SLS_STR("Float Default Scientific Positive Exp"), SLS_STR("1.5e10")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1489,7 +1489,7 @@ static TestResult test_Float_Default_Scientific_Positive_Exp() { } static TestResult test_Float_Default_Scientific_Negative_Exp() { - LexerTest test = start_up_test(SLS_STR("test_Float_Default_Scientific_Negative_Exp"), SLS_STR("2.5e-5")); + LexerTest test = start_up_test(SLS_STR("Float Default Scientific Negative Exp"), SLS_STR("2.5e-5")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1499,7 +1499,7 @@ static TestResult test_Float_Default_Scientific_Negative_Exp() { } static TestResult test_Float_Default_Scientific_Capital_E() { - LexerTest test = start_up_test(SLS_STR("test_Float_Default_Scientific_Capital_E"), SLS_STR("3.14E8")); + LexerTest test = start_up_test(SLS_STR("Float Default Scientific Capital E"), SLS_STR("3.14E8")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1509,7 +1509,7 @@ static TestResult test_Float_Default_Scientific_Capital_E() { } static TestResult test_Float_Default_Scientific_Plus_Sign() { - LexerTest test = start_up_test(SLS_STR("test_Float_Default_Scientific_Plus_Sign"), SLS_STR("1.0e+3")); + LexerTest test = start_up_test(SLS_STR("Float Default Scientific Plus Sign"), SLS_STR("1.0e+3")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1519,7 +1519,7 @@ static TestResult test_Float_Default_Scientific_Plus_Sign() { } static TestResult test_Float_Default_Very_Small() { - LexerTest test = start_up_test(SLS_STR("test_Float_Default_Very_Small"), SLS_STR("0.000001")); + LexerTest test = start_up_test(SLS_STR("Float Default Very Small"), SLS_STR("0.000001")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1529,7 +1529,7 @@ static TestResult test_Float_Default_Very_Small() { } static TestResult test_Float_Default_Scientific_Very_Small() { - LexerTest test = start_up_test(SLS_STR("test_Float_Default_Scientific_Very_Small"), SLS_STR("1.0e-20")); + LexerTest test = start_up_test(SLS_STR("Float Default Scientific Very Small"), SLS_STR("1.0e-20")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1539,7 +1539,7 @@ static TestResult test_Float_Default_Scientific_Very_Small() { } static TestResult test_Float_Default_Very_Large() { - LexerTest test = start_up_test(SLS_STR("test_Float_Default_Very_Large"), SLS_STR("1000000.0")); + LexerTest test = start_up_test(SLS_STR("Float Default Very Large"), SLS_STR("1000000.0")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1549,7 +1549,7 @@ static TestResult test_Float_Default_Very_Large() { } static TestResult test_Float_Default_Scientific_Very_Large() { - LexerTest test = start_up_test(SLS_STR("test_Float_Default_Scientific_Very_Large"), SLS_STR("1.0e20")); + LexerTest test = start_up_test(SLS_STR("Float Default Scientific Very Large"), SLS_STR("1.0e20")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1559,7 +1559,7 @@ static TestResult test_Float_Default_Scientific_Very_Large() { } static TestResult test_Float_Default_Underscore_Integer_Part() { - LexerTest test = start_up_test(SLS_STR("test_Float_Default_Underscore_Integer_Part"), SLS_STR("1_000_000.5")); + LexerTest test = start_up_test(SLS_STR("Float Default Underscore Integer Part"), SLS_STR("1_000_000.5")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1569,7 +1569,7 @@ static TestResult test_Float_Default_Underscore_Integer_Part() { } static TestResult test_Float_Default_Underscore_Decimal_Part() { - LexerTest test = start_up_test(SLS_STR("test_Float_Default_Underscore_Decimal_Part"), SLS_STR("3.141_592_653")); + LexerTest test = start_up_test(SLS_STR("Float Default Underscore Decimal Part"), SLS_STR("3.141_592_653")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1579,7 +1579,7 @@ static TestResult test_Float_Default_Underscore_Decimal_Part() { } static TestResult test_Float_Default_Underscore_Both_Parts() { - LexerTest test = start_up_test(SLS_STR("test_Float_Default_Underscore_Both_Parts"), SLS_STR("1_234.567_89")); + LexerTest test = start_up_test(SLS_STR("Float Default Underscore Both Parts"), SLS_STR("1_234.567_89")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1589,7 +1589,7 @@ static TestResult test_Float_Default_Underscore_Both_Parts() { } static TestResult test_Float_Default_Underscore_Scientific_Mantissa() { - LexerTest test = start_up_test(SLS_STR("test_Float_Default_Underscore_Scientific_Mantissa"), SLS_STR("1_000.5e10")); + LexerTest test = start_up_test(SLS_STR("Float Default Underscore Scientific Mantissa"), SLS_STR("1_000.5e10")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1599,7 +1599,7 @@ static TestResult test_Float_Default_Underscore_Scientific_Mantissa() { } static TestResult test_Float_Default_Underscore_Scientific_Exponent() { - LexerTest test = start_up_test(SLS_STR("test_Float_Default_Underscore_Scientific_Exponent"), SLS_STR("1.5e1_0")); + LexerTest test = start_up_test(SLS_STR("Float Default Underscore Scientific Exponent"), SLS_STR("1.5e1_0")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1609,7 +1609,7 @@ static TestResult test_Float_Default_Underscore_Scientific_Exponent() { } static TestResult test_Float_Default_Underscore_Trailing() { - LexerTest test = start_up_test(SLS_STR("test_Float_Default_Underscore_Trailing"), SLS_STR("42.5_")); + LexerTest test = start_up_test(SLS_STR("Float Default Underscore Trailing"), SLS_STR("42.5_")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1619,7 +1619,7 @@ static TestResult test_Float_Default_Underscore_Trailing() { } static TestResult test_Float_Default_Underscore_Double() { - LexerTest test = start_up_test(SLS_STR("test_Float_Default_Underscore_Double"), SLS_STR("4__2.5")); + LexerTest test = start_up_test(SLS_STR("Float Default Underscore Double"), SLS_STR("4__2.5")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1629,7 +1629,7 @@ static TestResult test_Float_Default_Underscore_Double() { } static TestResult test_Float_f32_With_Underscores() { - LexerTest test = start_up_test(SLS_STR("test_Float_f32_With_Underscores"), SLS_STR("1_234.567_89:f32")); + LexerTest test = start_up_test(SLS_STR("Float f32 With Underscores"), SLS_STR("1_234.567_89:f32")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1639,7 +1639,7 @@ static TestResult test_Float_f32_With_Underscores() { } static TestResult test_Float_f32_Max_Value() { - LexerTest test = start_up_test(SLS_STR("test_Float_f32_Max_Value"), SLS_STR("3.4028235e+38:f32")); + LexerTest test = start_up_test(SLS_STR("Float f32 Max Value"), SLS_STR("3.4028235e+38:f32")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1649,7 +1649,7 @@ static TestResult test_Float_f32_Max_Value() { } static TestResult test_Float_f32_Min_Value() { - LexerTest test = start_up_test(SLS_STR("test_Float_f32_Min_Value"), SLS_STR("-3.4028235e+38:f32")); + LexerTest test = start_up_test(SLS_STR("Float f32 Min Value"), SLS_STR("-3.4028235e+38:f32")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1659,7 +1659,7 @@ static TestResult test_Float_f32_Min_Value() { } static TestResult test_Float_f32_Min_Positive() { - LexerTest test = start_up_test(SLS_STR("test_Float_f32_Min_Positive"), SLS_STR("1.1754944e-38:f32")); + LexerTest test = start_up_test(SLS_STR("Float f32 Min Positive"), SLS_STR("1.1754944e-38:f32")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1669,7 +1669,7 @@ static TestResult test_Float_f32_Min_Positive() { } static TestResult test_Float_f32_Epsilon() { - LexerTest test = start_up_test(SLS_STR("test_Float_f32_Epsilon"), SLS_STR("1.1920929e-07:f32")); + LexerTest test = start_up_test(SLS_STR("Float f32 Epsilon"), SLS_STR("1.1920929e-07:f32")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1679,7 +1679,7 @@ static TestResult test_Float_f32_Epsilon() { } static TestResult test_Float_f32_Near_Zero_Positive() { - LexerTest test = start_up_test(SLS_STR("test_Float_f32_Near_Zero_Positive"), SLS_STR("1e-30:f32")); + LexerTest test = start_up_test(SLS_STR("Float f32 Near Zero Positive"), SLS_STR("1e-30:f32")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1689,7 +1689,7 @@ static TestResult test_Float_f32_Near_Zero_Positive() { } static TestResult test_Float_f32_Near_Zero_Negative() { - LexerTest test = start_up_test(SLS_STR("test_Float_f32_Near_Zero_Negative"), SLS_STR("-1e-30:f32")); + LexerTest test = start_up_test(SLS_STR("Float f32 Near Zero Negative"), SLS_STR("-1e-30:f32")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1699,7 +1699,7 @@ static TestResult test_Float_f32_Near_Zero_Negative() { } static TestResult test_Float_f32_Subnormal() { - LexerTest test = start_up_test(SLS_STR("test_Float_f32_Subnormal"), SLS_STR("1e-40:f32")); + LexerTest test = start_up_test(SLS_STR("Float f32 Subnormal"), SLS_STR("1e-40:f32")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1709,7 +1709,7 @@ static TestResult test_Float_f32_Subnormal() { } static TestResult test_Float_f64_Max_Value() { - LexerTest test = start_up_test(SLS_STR("test_Float_f64_Max_Value"), SLS_STR("1.7976931348623157e+308:f64")); + LexerTest test = start_up_test(SLS_STR("Float f64 Max Value"), SLS_STR("1.7976931348623157e+308:f64")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1719,7 +1719,7 @@ static TestResult test_Float_f64_Max_Value() { } static TestResult test_Float_f64_Min_Value() { - LexerTest test = start_up_test(SLS_STR("test_Float_f64_Min_Value"), SLS_STR("-1.7976931348623157e+308:f64")); + LexerTest test = start_up_test(SLS_STR("Float f64 Min Value"), SLS_STR("-1.7976931348623157e+308:f64")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1729,7 +1729,7 @@ static TestResult test_Float_f64_Min_Value() { } static TestResult test_Float_f64_Min_Positive() { - LexerTest test = start_up_test(SLS_STR("test_Float_f64_Min_Positive"), SLS_STR("2.2250738585072014e-308:f64")); + LexerTest test = start_up_test(SLS_STR("Float f64 Min Positive"), SLS_STR("2.2250738585072014e-308:f64")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1739,7 +1739,7 @@ static TestResult test_Float_f64_Min_Positive() { } static TestResult test_Float_f64_Epsilon() { - LexerTest test = start_up_test(SLS_STR("test_Float_f64_Epsilon"), SLS_STR("2.220446049250313e-16:f64")); + LexerTest test = start_up_test(SLS_STR("Float f64 Epsilon"), SLS_STR("2.220446049250313e-16:f64")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1749,7 +1749,7 @@ static TestResult test_Float_f64_Epsilon() { } static TestResult test_Float_f64_Near_Zero_Positive() { - LexerTest test = start_up_test(SLS_STR("test_Float_f64_Near_Zero_Positive"), SLS_STR("1e-30:f64")); + LexerTest test = start_up_test(SLS_STR("Float f64 Near Zero Positive"), SLS_STR("1e-30:f64")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1759,7 +1759,7 @@ static TestResult test_Float_f64_Near_Zero_Positive() { } static TestResult test_Float_f64_Near_Zero_Negative() { - LexerTest test = start_up_test(SLS_STR("test_Float_f64_Near_Zero_Negative"), SLS_STR("-1e-30:f64")); + LexerTest test = start_up_test(SLS_STR("Float f64 Near Zero Negative"), SLS_STR("-1e-30:f64")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1769,7 +1769,7 @@ static TestResult test_Float_f64_Near_Zero_Negative() { } static TestResult test_Float_f64_Subnormal() { - LexerTest test = start_up_test(SLS_STR("test_Float_f64_Subnormal"), SLS_STR("1e-320:f64")); + LexerTest test = start_up_test(SLS_STR("Float f64 Subnormal"), SLS_STR("1e-320:f64")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1779,7 +1779,7 @@ static TestResult test_Float_f64_Subnormal() { } static TestResult test_Float_f32_Overflow_Positive() { - LexerTest test = start_up_test(SLS_STR("test_Float_f32_Overflow_Positive"), SLS_STR("1e40:f32")); + LexerTest test = start_up_test(SLS_STR("Float f32 Overflow Positive"), SLS_STR("1e40:f32")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1788,7 +1788,7 @@ static TestResult test_Float_f32_Overflow_Positive() { } static TestResult test_Float_f32_Overflow_Negative() { - LexerTest test = start_up_test(SLS_STR("test_Float_f32_Overflow_Negative"), SLS_STR("-1e40:f32")); + LexerTest test = start_up_test(SLS_STR("Float f32 Overflow Negative"), SLS_STR("-1e40:f32")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1797,7 +1797,7 @@ static TestResult test_Float_f32_Overflow_Negative() { } static TestResult test_Float_f64_Overflow_Positive() { - LexerTest test = start_up_test(SLS_STR("test_Float_f64_Overflow_Positive"), SLS_STR("1e310:f64")); + LexerTest test = start_up_test(SLS_STR("Float f64 Overflow Positive"), SLS_STR("1e310:f64")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1806,7 +1806,7 @@ static TestResult test_Float_f64_Overflow_Positive() { } static TestResult test_Float_f64_Overflow_Negative() { - LexerTest test = start_up_test(SLS_STR("test_Float_f64_Overflow_Negative"), SLS_STR("-1e310:f64")); + LexerTest test = start_up_test(SLS_STR("Float f64 Overflow Negative"), SLS_STR("-1e310:f64")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1815,7 +1815,7 @@ static TestResult test_Float_f64_Overflow_Negative() { } static TestResult test_Float_f32_Precision_Limit() { - LexerTest test = start_up_test(SLS_STR("test_Float_f32_Precision_Limit"), SLS_STR("1.2345678:f32")); + LexerTest test = start_up_test(SLS_STR("Float f32 Precision Limit"), SLS_STR("1.2345678:f32")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1825,7 +1825,7 @@ static TestResult test_Float_f32_Precision_Limit() { } static TestResult test_Float_f32_High_Precision() { - LexerTest test = start_up_test(SLS_STR("test_Float_f32_High_Precision"), SLS_STR("3.141592653589793:f32")); + LexerTest test = start_up_test(SLS_STR("Float f32 High Precision"), SLS_STR("3.141592653589793:f32")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1835,7 +1835,7 @@ static TestResult test_Float_f32_High_Precision() { } static TestResult test_Float_f64_Precision_Limit() { - LexerTest test = start_up_test(SLS_STR("test_Float_f64_Precision_Limit"), SLS_STR("1.234567890123456:f64")); + LexerTest test = start_up_test(SLS_STR("Float f64 Precision Limit"), SLS_STR("1.234567890123456:f64")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1845,7 +1845,7 @@ static TestResult test_Float_f64_Precision_Limit() { } static TestResult test_Float_f64_High_Precision() { - LexerTest test = start_up_test(SLS_STR("test_Float_f64_High_Precision"), SLS_STR("3.141592653589793238:f64")); + LexerTest test = start_up_test(SLS_STR("Float f64 High Precision"), SLS_STR("3.141592653589793238:f64")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1855,7 +1855,7 @@ static TestResult test_Float_f64_High_Precision() { } static TestResult test_Float_f64_Close_Numbers_1() { - LexerTest test = start_up_test(SLS_STR("test_Float_f64_Close_Numbers_1"), SLS_STR("1.0000000000000001:f64")); + LexerTest test = start_up_test(SLS_STR("Float f64 Close Numbers 1"), SLS_STR("1.0000000000000001:f64")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1865,7 +1865,7 @@ static TestResult test_Float_f64_Close_Numbers_1() { } static TestResult test_Float_f64_Close_Numbers_2() { - LexerTest test = start_up_test(SLS_STR("test_Float_f64_Close_Numbers_2"), SLS_STR("1.0000000000000002:f64")); + LexerTest test = start_up_test(SLS_STR("Float f64 Close Numbers 2"), SLS_STR("1.0000000000000002:f64")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1875,7 +1875,7 @@ static TestResult test_Float_f64_Close_Numbers_2() { } static TestResult test_Float_Invalid_No_Decimal_Point() { - LexerTest test = start_up_test(SLS_STR("test_Float_Invalid_No_Decimal_Point"), SLS_STR("42")); + LexerTest test = start_up_test(SLS_STR("Float Invalid No Decimal Point"), SLS_STR("42")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1884,7 +1884,7 @@ static TestResult test_Float_Invalid_No_Decimal_Point() { } static TestResult test_Float_Invalid_Multiple_Decimal_Points() { - LexerTest test = start_up_test(SLS_STR("test_Float_Invalid_Multiple_Decimal_Points"), SLS_STR("3.14.159")); + LexerTest test = start_up_test(SLS_STR("Float Invalid Multiple Decimal Points"), SLS_STR("3.14.159")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1893,7 +1893,7 @@ static TestResult test_Float_Invalid_Multiple_Decimal_Points() { } static TestResult test_Float_Invalid_Only_Decimal_Point() { - LexerTest test = start_up_test(SLS_STR("test_Float_Invalid_Only_Decimal_Point"), SLS_STR(".")); + LexerTest test = start_up_test(SLS_STR("Float Invalid Only Decimal Point"), SLS_STR(".")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1902,7 +1902,7 @@ static TestResult test_Float_Invalid_Only_Decimal_Point() { } static TestResult test_Float_Invalid_Characters() { - LexerTest test = start_up_test(SLS_STR("test_Float_Invalid_Characters"), SLS_STR("3.1a4")); + LexerTest test = start_up_test(SLS_STR("Float Invalid Characters"), SLS_STR("3.1a4")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1911,7 +1911,7 @@ static TestResult test_Float_Invalid_Characters() { } static TestResult test_Float_Invalid_Scientific_No_Exponent() { - LexerTest test = start_up_test(SLS_STR("test_Float_Invalid_Scientific_No_Exponent"), SLS_STR("3.14e")); + LexerTest test = start_up_test(SLS_STR("Float Invalid Scientific No Exponent"), SLS_STR("3.14e")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1920,7 +1920,7 @@ static TestResult test_Float_Invalid_Scientific_No_Exponent() { } static TestResult test_Float_Invalid_Scientific_Double_E() { - LexerTest test = start_up_test(SLS_STR("test_Float_Invalid_Scientific_Double_E"), SLS_STR("3.14e10e5")); + LexerTest test = start_up_test(SLS_STR("Float Invalid Scientific Double E"), SLS_STR("3.14e10e5")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1929,7 +1929,7 @@ static TestResult test_Float_Invalid_Scientific_Double_E() { } static TestResult test_Float_Invalid_Scientific_Invalid_Exponent() { - LexerTest test = start_up_test(SLS_STR("test_Float_Invalid_Scientific_Invalid_Exponent"), SLS_STR("3.14eX")); + LexerTest test = start_up_test(SLS_STR("Float Invalid Scientific Invalid Exponent"), SLS_STR("3.14eX")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1938,7 +1938,7 @@ static TestResult test_Float_Invalid_Scientific_Invalid_Exponent() { } static TestResult test_Float_Invalid_Leading_Underscore() { - LexerTest test = start_up_test(SLS_STR("test_Float_Invalid_Leading_Underscore"), SLS_STR("_3.14")); + LexerTest test = start_up_test(SLS_STR("Float Invalid Leading Underscore"), SLS_STR("_3.14")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1947,7 +1947,7 @@ static TestResult test_Float_Invalid_Leading_Underscore() { } static TestResult test_Float_Invalid_Underscore_Before_Decimal() { - LexerTest test = start_up_test(SLS_STR("test_Float_Invalid_Underscore_Before_Decimal"), SLS_STR("3_.14")); + LexerTest test = start_up_test(SLS_STR("Float Invalid Underscore Before Decimal"), SLS_STR("3_.14")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1956,7 +1956,7 @@ static TestResult test_Float_Invalid_Underscore_Before_Decimal() { } static TestResult test_Float_Invalid_Underscore_After_Decimal() { - LexerTest test = start_up_test(SLS_STR("test_Float_Invalid_Underscore_After_Decimal"), SLS_STR("3._14")); + LexerTest test = start_up_test(SLS_STR("Float Invalid Underscore After Decimal"), SLS_STR("3._14")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1965,7 +1965,7 @@ static TestResult test_Float_Invalid_Underscore_After_Decimal() { } static TestResult test_Float_Invalid_Type_Annotation() { - LexerTest test = start_up_test(SLS_STR("test_Float_Invalid_Type_Annotation"), SLS_STR("3.14:i32")); + LexerTest test = start_up_test(SLS_STR("Float Invalid Type Annotation"), SLS_STR("3.14:i32")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1974,7 +1974,7 @@ static TestResult test_Float_Invalid_Type_Annotation() { } static TestResult test_Float_Invalid_Type_Name() { - LexerTest test = start_up_test(SLS_STR("test_Float_Invalid_Type_Name"), SLS_STR("3.14:f16")); + LexerTest test = start_up_test(SLS_STR("Float Invalid Type Name"), SLS_STR("3.14:f16")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1983,7 +1983,7 @@ static TestResult test_Float_Invalid_Type_Name() { } static TestResult test_Float_Invalid_Comma_Separator() { - LexerTest test = start_up_test(SLS_STR("test_Float_Invalid_Comma_Separator"), SLS_STR("1,234.56")); + LexerTest test = start_up_test(SLS_STR("Float Invalid Comma Separator"), SLS_STR("1,234.56")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -1992,7 +1992,7 @@ static TestResult test_Float_Invalid_Comma_Separator() { } static TestResult test_Float_Default_Leading_Whitespace() { - LexerTest test = start_up_test(SLS_STR("test_Float_Default_Leading_Whitespace"), SLS_STR(" 3.14")); + LexerTest test = start_up_test(SLS_STR("Float Default Leading Whitespace"), SLS_STR(" 3.14")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2002,7 +2002,7 @@ static TestResult test_Float_Default_Leading_Whitespace() { } static TestResult test_Float_Default_Trailing_Whitespace() { - LexerTest test = start_up_test(SLS_STR("test_Float_Default_Trailing_Whitespace"), SLS_STR("3.14 ")); + LexerTest test = start_up_test(SLS_STR("Float Default Trailing Whitespace"), SLS_STR("3.14 ")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2012,7 +2012,7 @@ static TestResult test_Float_Default_Trailing_Whitespace() { } static TestResult test_Float_Default_Both_Whitespace() { - LexerTest test = start_up_test(SLS_STR("test_Float_Default_Both_Whitespace"), SLS_STR(" 3.14 ")); + LexerTest test = start_up_test(SLS_STR("Float Default Both Whitespace"), SLS_STR(" 3.14 ")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2022,7 +2022,7 @@ static TestResult test_Float_Default_Both_Whitespace() { } static TestResult test_Float_f32_With_Whitespace() { - LexerTest test = start_up_test(SLS_STR("test_Float_f32_With_Whitespace"), SLS_STR(" 2.718:f32 ")); + LexerTest test = start_up_test(SLS_STR("Float f32 With Whitespace"), SLS_STR(" 2.718:f32 ")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2032,7 +2032,7 @@ static TestResult test_Float_f32_With_Whitespace() { } static TestResult test_Float_Default_Pi_Approximate() { - LexerTest test = start_up_test(SLS_STR("test_Float_Default_Pi_Approximate"), SLS_STR("3.141592653589793")); + LexerTest test = start_up_test(SLS_STR("Float Default Pi Approximate"), SLS_STR("3.141592653589793")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2042,7 +2042,7 @@ static TestResult test_Float_Default_Pi_Approximate() { } static TestResult test_Float_f32_Pi_Approximate() { - LexerTest test = start_up_test(SLS_STR("test_Float_f32_Pi_Approximate"), SLS_STR("3.1415927:f32")); + LexerTest test = start_up_test(SLS_STR("Float f32 Pi Approximate"), SLS_STR("3.1415927:f32")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2052,7 +2052,7 @@ static TestResult test_Float_f32_Pi_Approximate() { } static TestResult test_Float_Default_Euler_Approximate() { - LexerTest test = start_up_test(SLS_STR("test_Float_Default_Euler_Approximate"), SLS_STR("2.718281828459045")); + LexerTest test = start_up_test(SLS_STR("Float Default Euler Approximate"), SLS_STR("2.718281828459045")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2062,7 +2062,7 @@ static TestResult test_Float_Default_Euler_Approximate() { } static TestResult test_Float_f32_Euler_Approximate() { - LexerTest test = start_up_test(SLS_STR("test_Float_f32_Euler_Approximate"), SLS_STR("2.7182817:f32")); + LexerTest test = start_up_test(SLS_STR("Float f32 Euler Approximate"), SLS_STR("2.7182817:f32")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2072,7 +2072,7 @@ static TestResult test_Float_f32_Euler_Approximate() { } static TestResult test_Float_Default_Golden_Ratio() { - LexerTest test = start_up_test(SLS_STR("test_Float_Default_Golden_Ratio"), SLS_STR("1.618033988749895")); + LexerTest test = start_up_test(SLS_STR("Float Default Golden Ratio"), SLS_STR("1.618033988749895")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2082,7 +2082,7 @@ static TestResult test_Float_Default_Golden_Ratio() { } static TestResult test_Float_Default_Sqrt2() { - LexerTest test = start_up_test(SLS_STR("test_Float_Default_Sqrt2"), SLS_STR("1.4142135623730951")); + LexerTest test = start_up_test(SLS_STR("Float Default Sqrt2"), SLS_STR("1.4142135623730951")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2092,7 +2092,7 @@ static TestResult test_Float_Default_Sqrt2() { } static TestResult test_Float_Default_Positive_Zero() { - LexerTest test = start_up_test(SLS_STR("test_Float_Default_Positive_Zero"), SLS_STR("0.0")); + LexerTest test = start_up_test(SLS_STR("Float Default Positive Zero"), SLS_STR("0.0")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2102,7 +2102,7 @@ static TestResult test_Float_Default_Positive_Zero() { } static TestResult test_Float_Default_Negative_Zero() { - LexerTest test = start_up_test(SLS_STR("test_Float_Default_Negative_Zero"), SLS_STR("-0.0")); + LexerTest test = start_up_test(SLS_STR("Float Default Negative Zero"), SLS_STR("-0.0")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2112,7 +2112,7 @@ static TestResult test_Float_Default_Negative_Zero() { } static TestResult test_Float_f32_Positive_Zero() { - LexerTest test = start_up_test(SLS_STR("test_Float_f32_Positive_Zero"), SLS_STR("0.0:f32")); + LexerTest test = start_up_test(SLS_STR("Float f32 Positive Zero"), SLS_STR("0.0:f32")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2122,7 +2122,7 @@ static TestResult test_Float_f32_Positive_Zero() { } static TestResult test_Float_f32_Negative_Zero() { - LexerTest test = start_up_test(SLS_STR("test_Float_f32_Negative_Zero"), SLS_STR("-0.0:f32")); + LexerTest test = start_up_test(SLS_STR("Float f32 Negative Zero"), SLS_STR("-0.0:f32")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2132,7 +2132,7 @@ static TestResult test_Float_f32_Negative_Zero() { } static TestResult test_Char_Simple_Letter_A() { - LexerTest test = start_up_test(SLS_STR("test_Char_Simple_Letter_A"), SLS_STR("'A'")); + LexerTest test = start_up_test(SLS_STR("Char Simple Letter A"), SLS_STR("'A'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2142,7 +2142,7 @@ static TestResult test_Char_Simple_Letter_A() { } static TestResult test_Char_Simple_Letter_a() { - LexerTest test = start_up_test(SLS_STR("test_Char_Simple_Letter_a"), SLS_STR("'a'")); + LexerTest test = start_up_test(SLS_STR("Char Simple Letter a"), SLS_STR("'a'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2152,7 +2152,7 @@ static TestResult test_Char_Simple_Letter_a() { } static TestResult test_Char_Simple_Letter_Z() { - LexerTest test = start_up_test(SLS_STR("test_Char_Simple_Letter_Z"), SLS_STR("'Z'")); + LexerTest test = start_up_test(SLS_STR("Char Simple Letter Z"), SLS_STR("'Z'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2162,7 +2162,7 @@ static TestResult test_Char_Simple_Letter_Z() { } static TestResult test_Char_Simple_Letter_z() { - LexerTest test = start_up_test(SLS_STR("test_Char_Simple_Letter_z"), SLS_STR("'z'")); + LexerTest test = start_up_test(SLS_STR("Char Simple Letter z"), SLS_STR("'z'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2172,7 +2172,7 @@ static TestResult test_Char_Simple_Letter_z() { } static TestResult test_Char_Digit_0() { - LexerTest test = start_up_test(SLS_STR("test_Char_Digit_0"), SLS_STR("'0'")); + LexerTest test = start_up_test(SLS_STR("Char Digit 0"), SLS_STR("'0'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2182,7 +2182,7 @@ static TestResult test_Char_Digit_0() { } static TestResult test_Char_Digit_5() { - LexerTest test = start_up_test(SLS_STR("test_Char_Digit_5"), SLS_STR("'5'")); + LexerTest test = start_up_test(SLS_STR("Char Digit 5"), SLS_STR("'5'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2192,7 +2192,7 @@ static TestResult test_Char_Digit_5() { } static TestResult test_Char_Digit_9() { - LexerTest test = start_up_test(SLS_STR("test_Char_Digit_9"), SLS_STR("'9'")); + LexerTest test = start_up_test(SLS_STR("Char Digit 9"), SLS_STR("'9'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2202,7 +2202,7 @@ static TestResult test_Char_Digit_9() { } static TestResult test_Char_Space() { - LexerTest test = start_up_test(SLS_STR("test_Char_Space"), SLS_STR("' '")); + LexerTest test = start_up_test(SLS_STR("Char Space"), SLS_STR("' '")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2212,7 +2212,7 @@ static TestResult test_Char_Space() { } static TestResult test_Char_Exclamation() { - LexerTest test = start_up_test(SLS_STR("test_Char_Exclamation"), SLS_STR("'!'")); + LexerTest test = start_up_test(SLS_STR("Char Exclamation"), SLS_STR("'!'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2222,7 +2222,7 @@ static TestResult test_Char_Exclamation() { } static TestResult test_Char_Question_Mark() { - LexerTest test = start_up_test(SLS_STR("test_Char_Question_Mark"), SLS_STR("'?'")); + LexerTest test = start_up_test(SLS_STR("Char Question Mark"), SLS_STR("'?'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2232,7 +2232,7 @@ static TestResult test_Char_Question_Mark() { } static TestResult test_Char_Period() { - LexerTest test = start_up_test(SLS_STR("test_Char_Period"), SLS_STR("'.'")); + LexerTest test = start_up_test(SLS_STR("Char Period"), SLS_STR("'.'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2242,7 +2242,7 @@ static TestResult test_Char_Period() { } static TestResult test_Char_Comma() { - LexerTest test = start_up_test(SLS_STR("test_Char_Comma"), SLS_STR("','")); + LexerTest test = start_up_test(SLS_STR("Char Comma"), SLS_STR("','")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2252,7 +2252,7 @@ static TestResult test_Char_Comma() { } static TestResult test_Char_Semicolon() { - LexerTest test = start_up_test(SLS_STR("test_Char_Semicolon"), SLS_STR("';'")); + LexerTest test = start_up_test(SLS_STR("Char Semicolon"), SLS_STR("';'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2262,7 +2262,7 @@ static TestResult test_Char_Semicolon() { } static TestResult test_Char_Colon() { - LexerTest test = start_up_test(SLS_STR("test_Char_Colon"), SLS_STR("':'")); + LexerTest test = start_up_test(SLS_STR("Char Colon"), SLS_STR("':'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2272,7 +2272,7 @@ static TestResult test_Char_Colon() { } static TestResult test_Char_Plus() { - LexerTest test = start_up_test(SLS_STR("test_Char_Plus"), SLS_STR("'+'")); + LexerTest test = start_up_test(SLS_STR("Char Plus"), SLS_STR("'+'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2282,7 +2282,7 @@ static TestResult test_Char_Plus() { } static TestResult test_Char_Minus() { - LexerTest test = start_up_test(SLS_STR("test_Char_Minus"), SLS_STR("'-'")); + LexerTest test = start_up_test(SLS_STR("Char Minus"), SLS_STR("'-'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2292,7 +2292,7 @@ static TestResult test_Char_Minus() { } static TestResult test_Char_Asterisk() { - LexerTest test = start_up_test(SLS_STR("test_Char_Asterisk"), SLS_STR("'*'")); + LexerTest test = start_up_test(SLS_STR("Char Asterisk"), SLS_STR("'*'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2302,7 +2302,7 @@ static TestResult test_Char_Asterisk() { } static TestResult test_Char_Slash() { - LexerTest test = start_up_test(SLS_STR("test_Char_Slash"), SLS_STR("'/'")); + LexerTest test = start_up_test(SLS_STR("Char Slash"), SLS_STR("'/'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2312,7 +2312,7 @@ static TestResult test_Char_Slash() { } static TestResult test_Char_Equals() { - LexerTest test = start_up_test(SLS_STR("test_Char_Equals"), SLS_STR("'='")); + LexerTest test = start_up_test(SLS_STR("Char Equals"), SLS_STR("'='")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2322,7 +2322,7 @@ static TestResult test_Char_Equals() { } static TestResult test_Char_Less_Than() { - LexerTest test = start_up_test(SLS_STR("test_Char_Less_Than"), SLS_STR("'<'")); + LexerTest test = start_up_test(SLS_STR("Char Less Than"), SLS_STR("'<'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2332,7 +2332,7 @@ static TestResult test_Char_Less_Than() { } static TestResult test_Char_Greater_Than() { - LexerTest test = start_up_test(SLS_STR("test_Char_Greater_Than"), SLS_STR("'>'")); + LexerTest test = start_up_test(SLS_STR("Char Greater Than"), SLS_STR("'>'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2342,7 +2342,7 @@ static TestResult test_Char_Greater_Than() { } static TestResult test_Char_Left_Paren() { - LexerTest test = start_up_test(SLS_STR("test_Char_Left_Paren"), SLS_STR("'('")); + LexerTest test = start_up_test(SLS_STR("Char Left Paren"), SLS_STR("'('")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2352,7 +2352,7 @@ static TestResult test_Char_Left_Paren() { } static TestResult test_Char_Right_Paren() { - LexerTest test = start_up_test(SLS_STR("test_Char_Right_Paren"), SLS_STR("')'")); + LexerTest test = start_up_test(SLS_STR("Char Right Paren"), SLS_STR("')'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2362,7 +2362,7 @@ static TestResult test_Char_Right_Paren() { } static TestResult test_Char_Left_Bracket() { - LexerTest test = start_up_test(SLS_STR("test_Char_Left_Bracket"), SLS_STR("'['")); + LexerTest test = start_up_test(SLS_STR("Char Left Bracket"), SLS_STR("'['")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2372,7 +2372,7 @@ static TestResult test_Char_Left_Bracket() { } static TestResult test_Char_Right_Bracket() { - LexerTest test = start_up_test(SLS_STR("test_Char_Right_Bracket"), SLS_STR("']'")); + LexerTest test = start_up_test(SLS_STR("Char Right Bracket"), SLS_STR("']'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2382,7 +2382,7 @@ static TestResult test_Char_Right_Bracket() { } static TestResult test_Char_Left_Brace() { - LexerTest test = start_up_test(SLS_STR("test_Char_Left_Brace"), SLS_STR("'{'")); + LexerTest test = start_up_test(SLS_STR("Char Left Brace"), SLS_STR("'{'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2392,7 +2392,7 @@ static TestResult test_Char_Left_Brace() { } static TestResult test_Char_Right_Brace() { - LexerTest test = start_up_test(SLS_STR("test_Char_Right_Brace"), SLS_STR("'}'")); + LexerTest test = start_up_test(SLS_STR("Char Right Brace"), SLS_STR("'}'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2401,8 +2401,18 @@ static TestResult test_Char_Right_Brace() { return pass_test(&test, result); } +static TestResult test_Char_Escape_Single_quote() { + LexerTest test = start_up_test(SLS_STR("Char Escape Single quote"), SLS_STR("'\''")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_character_value(&test, result, i++, &(uint8_t){39})) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + static TestResult test_Char_Escape_Newline() { - LexerTest test = start_up_test(SLS_STR("test_Char_Escape_Newline"), SLS_STR("'\n'")); + LexerTest test = start_up_test(SLS_STR("Char Escape Newline"), SLS_STR("'\n'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2411,8 +2421,28 @@ static TestResult test_Char_Escape_Newline() { return pass_test(&test, result); } +static TestResult test_Char_Escape_Carriage_return() { + LexerTest test = start_up_test(SLS_STR("Char Escape Carriage return"), SLS_STR("'\r'")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_character_value(&test, result, i++, &(uint8_t){13})) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_Char_Escape_Tab() { + LexerTest test = start_up_test(SLS_STR("Char Escape Tab"), SLS_STR("'\t'")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_character_value(&test, result, i++, &(uint8_t){9})) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + static TestResult test_Char_Escape_Null_character() { - LexerTest test = start_up_test(SLS_STR("test_Char_Escape_Null_character"), SLS_STR("'\0'")); + LexerTest test = start_up_test(SLS_STR("Char Escape Null character"), SLS_STR("'\0'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2422,7 +2452,7 @@ static TestResult test_Char_Escape_Null_character() { } static TestResult test_Char_Escape_Double_quote() { - LexerTest test = start_up_test(SLS_STR("test_Char_Escape_Double_quote"), SLS_STR("'\\\"'")); + LexerTest test = start_up_test(SLS_STR("Char Escape Double quote"), SLS_STR("'\\\"'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2431,28 +2461,8 @@ static TestResult test_Char_Escape_Double_quote() { return pass_test(&test, result); } -static TestResult test_Char_Escape_Single_quote() { - LexerTest test = start_up_test(SLS_STR("test_Char_Escape_Single_quote"), SLS_STR("'\''")); - LexerResult result = lexical_analysis(&test.lexer_info); - if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); - size_t i = 0; - if (test_character_value(&test, result, i++, &(uint8_t){39})) return test.result; - if (test_eof_value(&test, result, i++, 0)) return test.result; - return pass_test(&test, result); -} - -static TestResult test_Char_Escape_Tab() { - LexerTest test = start_up_test(SLS_STR("test_Char_Escape_Tab"), SLS_STR("'\t'")); - LexerResult result = lexical_analysis(&test.lexer_info); - if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); - size_t i = 0; - if (test_character_value(&test, result, i++, &(uint8_t){9})) return test.result; - if (test_eof_value(&test, result, i++, 0)) return test.result; - return pass_test(&test, result); -} - static TestResult test_Char_Escape_Backslash() { - LexerTest test = start_up_test(SLS_STR("test_Char_Escape_Backslash"), SLS_STR("'\\'")); + LexerTest test = start_up_test(SLS_STR("Char Escape Backslash"), SLS_STR("'\\'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2461,18 +2471,8 @@ static TestResult test_Char_Escape_Backslash() { return pass_test(&test, result); } -static TestResult test_Char_Escape_Carriage_return() { - LexerTest test = start_up_test(SLS_STR("test_Char_Escape_Carriage_return"), SLS_STR("'\r'")); - LexerResult result = lexical_analysis(&test.lexer_info); - if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); - size_t i = 0; - if (test_character_value(&test, result, i++, &(uint8_t){13})) return test.result; - if (test_eof_value(&test, result, i++, 0)) return test.result; - return pass_test(&test, result); -} - static TestResult test_Char_Newline() { - LexerTest test = start_up_test(SLS_STR("test_Char_Newline"), SLS_STR("'\n'")); + LexerTest test = start_up_test(SLS_STR("Char Newline"), SLS_STR("'\n'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2482,7 +2482,7 @@ static TestResult test_Char_Newline() { } static TestResult test_Char_Carriage_Return() { - LexerTest test = start_up_test(SLS_STR("test_Char_Carriage_Return"), SLS_STR("'\r'")); + LexerTest test = start_up_test(SLS_STR("Char Carriage Return"), SLS_STR("'\r'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2492,7 +2492,7 @@ static TestResult test_Char_Carriage_Return() { } static TestResult test_Char_Tab() { - LexerTest test = start_up_test(SLS_STR("test_Char_Tab"), SLS_STR("'\t'")); + LexerTest test = start_up_test(SLS_STR("Char Tab"), SLS_STR("'\t'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2502,7 +2502,7 @@ static TestResult test_Char_Tab() { } static TestResult test_Char_Backslash() { - LexerTest test = start_up_test(SLS_STR("test_Char_Backslash"), SLS_STR("'\\'")); + LexerTest test = start_up_test(SLS_STR("Char Backslash"), SLS_STR("'\\'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2512,7 +2512,7 @@ static TestResult test_Char_Backslash() { } static TestResult test_Char_Double_Quote() { - LexerTest test = start_up_test(SLS_STR("test_Char_Double_Quote"), SLS_STR("'\\\"'")); + LexerTest test = start_up_test(SLS_STR("Char Double Quote"), SLS_STR("'\\\"'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2522,7 +2522,7 @@ static TestResult test_Char_Double_Quote() { } static TestResult test_Char_Single_Quote() { - LexerTest test = start_up_test(SLS_STR("test_Char_Single_Quote"), SLS_STR("'\''")); + LexerTest test = start_up_test(SLS_STR("Char Single Quote"), SLS_STR("'\''")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2532,7 +2532,7 @@ static TestResult test_Char_Single_Quote() { } static TestResult test_Char_Null() { - LexerTest test = start_up_test(SLS_STR("test_Char_Null"), SLS_STR("'\0'")); + LexerTest test = start_up_test(SLS_STR("Char Null"), SLS_STR("'\0'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2542,7 +2542,7 @@ static TestResult test_Char_Null() { } static TestResult test_Char_Hex_Escape_x41() { - LexerTest test = start_up_test(SLS_STR("test_Char_Hex_Escape_x41"), SLS_STR("'\x41'")); + LexerTest test = start_up_test(SLS_STR("Char Hex Escape \x41"), SLS_STR("'\x41'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2552,7 +2552,7 @@ static TestResult test_Char_Hex_Escape_x41() { } static TestResult test_Char_Hex_Escape_x61() { - LexerTest test = start_up_test(SLS_STR("test_Char_Hex_Escape_x61"), SLS_STR("'\x61'")); + LexerTest test = start_up_test(SLS_STR("Char Hex Escape \x61"), SLS_STR("'\x61'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2562,7 +2562,7 @@ static TestResult test_Char_Hex_Escape_x61() { } static TestResult test_Char_Hex_Escape_x20() { - LexerTest test = start_up_test(SLS_STR("test_Char_Hex_Escape_x20"), SLS_STR("'\x20'")); + LexerTest test = start_up_test(SLS_STR("Char Hex Escape \x20"), SLS_STR("'\x20'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2572,7 +2572,7 @@ static TestResult test_Char_Hex_Escape_x20() { } static TestResult test_Char_Hex_Escape_x00() { - LexerTest test = start_up_test(SLS_STR("test_Char_Hex_Escape_x00"), SLS_STR("'\x00'")); + LexerTest test = start_up_test(SLS_STR("Char Hex Escape \x00"), SLS_STR("'\x00'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2582,7 +2582,7 @@ static TestResult test_Char_Hex_Escape_x00() { } static TestResult test_Char_Hex_Escape_xFF() { - LexerTest test = start_up_test(SLS_STR("test_Char_Hex_Escape_xFF"), SLS_STR("'\xFF'")); + LexerTest test = start_up_test(SLS_STR("Char Hex Escape \xFF"), SLS_STR("'\xFF'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2592,7 +2592,7 @@ static TestResult test_Char_Hex_Escape_xFF() { } static TestResult test_Char_Hex_Lowercase_A() { - LexerTest test = start_up_test(SLS_STR("test_Char_Hex_Lowercase_A"), SLS_STR("'\x61'")); + LexerTest test = start_up_test(SLS_STR("Char Hex Lowercase A"), SLS_STR("'\x61'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2602,7 +2602,7 @@ static TestResult test_Char_Hex_Lowercase_A() { } static TestResult test_Char_Hex_Uppercase_A() { - LexerTest test = start_up_test(SLS_STR("test_Char_Hex_Uppercase_A"), SLS_STR("'\x41'")); + LexerTest test = start_up_test(SLS_STR("Char Hex Uppercase A"), SLS_STR("'\x41'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2612,7 +2612,7 @@ static TestResult test_Char_Hex_Uppercase_A() { } static TestResult test_Char_Hex_Space() { - LexerTest test = start_up_test(SLS_STR("test_Char_Hex_Space"), SLS_STR("'\x20'")); + LexerTest test = start_up_test(SLS_STR("Char Hex Space"), SLS_STR("'\x20'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2622,7 +2622,7 @@ static TestResult test_Char_Hex_Space() { } static TestResult test_Char_Hex_Tab() { - LexerTest test = start_up_test(SLS_STR("test_Char_Hex_Tab"), SLS_STR("'\x09'")); + LexerTest test = start_up_test(SLS_STR("Char Hex Tab"), SLS_STR("'\x09'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2632,7 +2632,7 @@ static TestResult test_Char_Hex_Tab() { } static TestResult test_Char_Hex_Newline() { - LexerTest test = start_up_test(SLS_STR("test_Char_Hex_Newline"), SLS_STR("'\x0A'")); + LexerTest test = start_up_test(SLS_STR("Char Hex Newline"), SLS_STR("'\x0A'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2642,7 +2642,7 @@ static TestResult test_Char_Hex_Newline() { } static TestResult test_Char_Hex_Max_ASCII() { - LexerTest test = start_up_test(SLS_STR("test_Char_Hex_Max_ASCII"), SLS_STR("'\x7F'")); + LexerTest test = start_up_test(SLS_STR("Char Hex Max ASCII"), SLS_STR("'\x7F'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2652,7 +2652,7 @@ static TestResult test_Char_Hex_Max_ASCII() { } static TestResult test_Char_With_Leading_Whitespace() { - LexerTest test = start_up_test(SLS_STR("test_Char_With_Leading_Whitespace"), SLS_STR(" 'A'")); + LexerTest test = start_up_test(SLS_STR("Char With Leading Whitespace"), SLS_STR(" 'A'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2662,7 +2662,7 @@ static TestResult test_Char_With_Leading_Whitespace() { } static TestResult test_Char_With_Trailing_Whitespace() { - LexerTest test = start_up_test(SLS_STR("test_Char_With_Trailing_Whitespace"), SLS_STR("'A' ")); + LexerTest test = start_up_test(SLS_STR("Char With Trailing Whitespace"), SLS_STR("'A' ")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2672,7 +2672,7 @@ static TestResult test_Char_With_Trailing_Whitespace() { } static TestResult test_Char_With_Both_Whitespace() { - LexerTest test = start_up_test(SLS_STR("test_Char_With_Both_Whitespace"), SLS_STR(" 'A' ")); + LexerTest test = start_up_test(SLS_STR("Char With Both Whitespace"), SLS_STR(" 'A' ")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2682,7 +2682,7 @@ static TestResult test_Char_With_Both_Whitespace() { } static TestResult test_Char_Tab_Before() { - LexerTest test = start_up_test(SLS_STR("test_Char_Tab_Before"), SLS_STR("\t'B'")); + LexerTest test = start_up_test(SLS_STR("Char Tab Before"), SLS_STR("\t'B'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2692,7 +2692,7 @@ static TestResult test_Char_Tab_Before() { } static TestResult test_Char_Newline_Before() { - LexerTest test = start_up_test(SLS_STR("test_Char_Newline_Before"), SLS_STR("\n'C'")); + LexerTest test = start_up_test(SLS_STR("Char Newline Before"), SLS_STR("\n'C'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2702,7 +2702,7 @@ static TestResult test_Char_Newline_Before() { } static TestResult test_Char_Empty_Literal() { - LexerTest test = start_up_test(SLS_STR("test_Char_Empty_Literal"), SLS_STR("''")); + LexerTest test = start_up_test(SLS_STR("Char Empty Literal"), SLS_STR("''")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2711,7 +2711,7 @@ static TestResult test_Char_Empty_Literal() { } static TestResult test_Char_Multiple_Characters() { - LexerTest test = start_up_test(SLS_STR("test_Char_Multiple_Characters"), SLS_STR("'AB'")); + LexerTest test = start_up_test(SLS_STR("Char Multiple Characters"), SLS_STR("'AB'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2720,7 +2720,7 @@ static TestResult test_Char_Multiple_Characters() { } static TestResult test_Char_Unclosed_Quote() { - LexerTest test = start_up_test(SLS_STR("test_Char_Unclosed_Quote"), SLS_STR("'A")); + LexerTest test = start_up_test(SLS_STR("Char Unclosed Quote"), SLS_STR("'A")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2729,7 +2729,7 @@ static TestResult test_Char_Unclosed_Quote() { } static TestResult test_Char_Unescaped_Newline() { - LexerTest test = start_up_test(SLS_STR("test_Char_Unescaped_Newline"), SLS_STR("'\n'")); + LexerTest test = start_up_test(SLS_STR("Char Unescaped Newline"), SLS_STR("'\n'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2738,16 +2738,16 @@ static TestResult test_Char_Unescaped_Newline() { } static TestResult test_Char_Invalid_Escape() { - LexerTest test = start_up_test(SLS_STR("test_Char_Invalid_Escape"), SLS_STR("'\q'")); + LexerTest test = start_up_test(SLS_STR("Char Invalid Escape"), SLS_STR("'\\q'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; - if (test_for_error(&test, result, i++, SLS_STR("Invalid character literal: unknown escape sequence '\q'."))) return test.result; + if (test_for_error(&test, result, i++, SLS_STR("Invalid character literal: unknown escape sequence '\\q'."))) return test.result; return pass_test(&test, result); } static TestResult test_Char_Hex_Escape_Too_Short() { - LexerTest test = start_up_test(SLS_STR("test_Char_Hex_Escape_Too_Short"), SLS_STR("'\x4'")); + LexerTest test = start_up_test(SLS_STR("Char Hex Escape Too Short"), SLS_STR("'\\x4'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2756,7 +2756,7 @@ static TestResult test_Char_Hex_Escape_Too_Short() { } static TestResult test_Char_Hex_Escape_Too_Long() { - LexerTest test = start_up_test(SLS_STR("test_Char_Hex_Escape_Too_Long"), SLS_STR("'\x414'")); + LexerTest test = start_up_test(SLS_STR("Char Hex Escape Too Long"), SLS_STR("'\\x414'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2765,7 +2765,7 @@ static TestResult test_Char_Hex_Escape_Too_Long() { } static TestResult test_Char_Hex_Invalid_Digit() { - LexerTest test = start_up_test(SLS_STR("test_Char_Hex_Invalid_Digit"), SLS_STR("'\\xGG'")); + LexerTest test = start_up_test(SLS_STR("Char Hex Invalid Digit"), SLS_STR("'\\xGG'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2774,7 +2774,7 @@ static TestResult test_Char_Hex_Invalid_Digit() { } static TestResult test_Char_Double_Quotes() { - LexerTest test = start_up_test(SLS_STR("test_Char_Double_Quotes"), SLS_STR("\"A\"")); + LexerTest test = start_up_test(SLS_STR("Char Double Quotes"), SLS_STR("\"A\"")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2783,7 +2783,7 @@ static TestResult test_Char_Double_Quotes() { } static TestResult test_Char_No_Quotes() { - LexerTest test = start_up_test(SLS_STR("test_Char_No_Quotes"), SLS_STR("A")); + LexerTest test = start_up_test(SLS_STR("Char No Quotes"), SLS_STR("A")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2792,7 +2792,7 @@ static TestResult test_Char_No_Quotes() { } static TestResult test_Char_ASCII_Control_SOH() { - LexerTest test = start_up_test(SLS_STR("test_Char_ASCII_Control_SOH"), SLS_STR("'\x01'")); + LexerTest test = start_up_test(SLS_STR("Char ASCII Control SOH"), SLS_STR("'\x01'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2802,7 +2802,7 @@ static TestResult test_Char_ASCII_Control_SOH() { } static TestResult test_Char_ASCII_Control_BEL() { - LexerTest test = start_up_test(SLS_STR("test_Char_ASCII_Control_BEL"), SLS_STR("'\x07'")); + LexerTest test = start_up_test(SLS_STR("Char ASCII Control BEL"), SLS_STR("'\x07'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2812,7 +2812,7 @@ static TestResult test_Char_ASCII_Control_BEL() { } static TestResult test_Char_ASCII_Control_ESC() { - LexerTest test = start_up_test(SLS_STR("test_Char_ASCII_Control_ESC"), SLS_STR("'\x1B'")); + LexerTest test = start_up_test(SLS_STR("Char ASCII Control ESC"), SLS_STR("'\x1B'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2822,7 +2822,7 @@ static TestResult test_Char_ASCII_Control_ESC() { } static TestResult test_Char_ASCII_Control_DEL() { - LexerTest test = start_up_test(SLS_STR("test_Char_ASCII_Control_DEL"), SLS_STR("'\x7F'")); + LexerTest test = start_up_test(SLS_STR("Char ASCII Control DEL"), SLS_STR("'\x7F'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2832,7 +2832,7 @@ static TestResult test_Char_ASCII_Control_DEL() { } static TestResult test_Char_Extended_ASCII_Lower() { - LexerTest test = start_up_test(SLS_STR("test_Char_Extended_ASCII_Lower"), SLS_STR("'\x80'")); + LexerTest test = start_up_test(SLS_STR("Char Extended ASCII Lower"), SLS_STR("'\x80'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2842,7 +2842,7 @@ static TestResult test_Char_Extended_ASCII_Lower() { } static TestResult test_Char_Extended_ASCII_Upper() { - LexerTest test = start_up_test(SLS_STR("test_Char_Extended_ASCII_Upper"), SLS_STR("'\xFF'")); + LexerTest test = start_up_test(SLS_STR("Char Extended ASCII Upper"), SLS_STR("'\xFF'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2852,7 +2852,7 @@ static TestResult test_Char_Extended_ASCII_Upper() { } static TestResult test_Char_Backslash_Literal() { - LexerTest test = start_up_test(SLS_STR("test_Char_Backslash_Literal"), SLS_STR("'\\'")); + LexerTest test = start_up_test(SLS_STR("Char Backslash Literal"), SLS_STR("'\\'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2862,7 +2862,7 @@ static TestResult test_Char_Backslash_Literal() { } static TestResult test_Char_Single_Quote_Escaped() { - LexerTest test = start_up_test(SLS_STR("test_Char_Single_Quote_Escaped"), SLS_STR("'\''")); + LexerTest test = start_up_test(SLS_STR("Char Single Quote Escaped"), SLS_STR("'\''")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2872,7 +2872,7 @@ static TestResult test_Char_Single_Quote_Escaped() { } static TestResult test_Char_Hex_Lowercase_x() { - LexerTest test = start_up_test(SLS_STR("test_Char_Hex_Lowercase_x"), SLS_STR("'\x41'")); + LexerTest test = start_up_test(SLS_STR("Char Hex Lowercase x"), SLS_STR("'\x41'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2882,7 +2882,7 @@ static TestResult test_Char_Hex_Lowercase_x() { } static TestResult test_Char_Hex_Digits_Uppercase() { - LexerTest test = start_up_test(SLS_STR("test_Char_Hex_Digits_Uppercase"), SLS_STR("'\xFF'")); + LexerTest test = start_up_test(SLS_STR("Char Hex Digits Uppercase"), SLS_STR("'\xFF'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2892,7 +2892,7 @@ static TestResult test_Char_Hex_Digits_Uppercase() { } static TestResult test_Char_Hex_Digits_Lowercase() { - LexerTest test = start_up_test(SLS_STR("test_Char_Hex_Digits_Lowercase"), SLS_STR("'\xff'")); + LexerTest test = start_up_test(SLS_STR("Char Hex Digits Lowercase"), SLS_STR("'\xff'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2902,7 +2902,7 @@ static TestResult test_Char_Hex_Digits_Lowercase() { } static TestResult test_Char_Hex_Digits_Mixed() { - LexerTest test = start_up_test(SLS_STR("test_Char_Hex_Digits_Mixed"), SLS_STR("'\xAb'")); + LexerTest test = start_up_test(SLS_STR("Char Hex Digits Mixed"), SLS_STR("'\xAb'")); LexerResult result = lexical_analysis(&test.lexer_info); if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); size_t i = 0; @@ -2911,6 +2911,748 @@ static TestResult test_Char_Hex_Digits_Mixed() { return pass_test(&test, result); } +static TestResult test_String_Empty() { + LexerTest test = start_up_test(SLS_STR("String Empty"), SLS_STR("\"\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR(""))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Simple() { + LexerTest test = start_up_test(SLS_STR("String Simple"), SLS_STR("\"hello\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("hello"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_With_Space() { + LexerTest test = start_up_test(SLS_STR("String With Space"), SLS_STR("\"hello world\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("hello world"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Single_Char() { + LexerTest test = start_up_test(SLS_STR("String Single Char"), SLS_STR("\"A\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("A"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Multiple_Words() { + LexerTest test = start_up_test(SLS_STR("String Multiple Words"), SLS_STR("\"The quick brown fox\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("The quick brown fox"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_With_Numbers() { + LexerTest test = start_up_test(SLS_STR("String With Numbers"), SLS_STR("\"abc123\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("abc123"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Only_Numbers() { + LexerTest test = start_up_test(SLS_STR("String Only Numbers"), SLS_STR("\"12345\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("12345"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Mixed_Case() { + LexerTest test = start_up_test(SLS_STR("String Mixed Case"), SLS_STR("\"HeLLo WoRLd\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("HeLLo WoRLd"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_With_Punctuation() { + LexerTest test = start_up_test(SLS_STR("String With Punctuation"), SLS_STR("\"Hello, World!\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("Hello, World!"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_With_Symbols() { + LexerTest test = start_up_test(SLS_STR("String With Symbols"), SLS_STR("\"@#$%^&*()\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("@#$%^&*()"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Multiple_Spaces() { + LexerTest test = start_up_test(SLS_STR("String Multiple Spaces"), SLS_STR("\"hello world\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("hello world"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Leading_Space() { + LexerTest test = start_up_test(SLS_STR("String Leading Space"), SLS_STR("\" hello\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR(" hello"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Trailing_Space() { + LexerTest test = start_up_test(SLS_STR("String Trailing Space"), SLS_STR("\"hello \"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("hello "))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Only_Spaces() { + LexerTest test = start_up_test(SLS_STR("String Only Spaces"), SLS_STR("\" \"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR(" "))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Newline() { + LexerTest test = start_up_test(SLS_STR("String Newline"), SLS_STR("\"hello\nworld\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("hello\nworld"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Tab() { + LexerTest test = start_up_test(SLS_STR("String Tab"), SLS_STR("\"hello\tworld\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("hello\tworld"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Carriage_Return() { + LexerTest test = start_up_test(SLS_STR("String Carriage Return"), SLS_STR("\"hello\rworld\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("hello\rworld"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Backslash() { + LexerTest test = start_up_test(SLS_STR("String Backslash"), SLS_STR("\"hello\\world\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("hello\\world"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Double_Quote() { + LexerTest test = start_up_test(SLS_STR("String Double Quote"), SLS_STR("\"say \\\"hello\\\"\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("say \"hello\""))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Single_Quote() { + LexerTest test = start_up_test(SLS_STR("String Single Quote"), SLS_STR("\"it\'s\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("it's"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Null_Char() { + LexerTest test = start_up_test(SLS_STR("String Null Char"), SLS_STR("\"hello\0world\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("hello\0world"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Multiple_Escapes() { + LexerTest test = start_up_test(SLS_STR("String Multiple Escapes"), SLS_STR("\"line1\nline2\nline3\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("line1\nline2\nline3"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Mixed_Escapes() { + LexerTest test = start_up_test(SLS_STR("String Mixed Escapes"), SLS_STR("\"tab\there\nnewline\\backslash\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("tab\there\nnewline\\backslash"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Escape_At_Start() { + LexerTest test = start_up_test(SLS_STR("String Escape At Start"), SLS_STR("\"\nhello\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("\nhello"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Escape_At_End() { + LexerTest test = start_up_test(SLS_STR("String Escape At End"), SLS_STR("\"hello\n\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("hello\n"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Consecutive_Escapes() { + LexerTest test = start_up_test(SLS_STR("String Consecutive Escapes"), SLS_STR("\"\n\n\n\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("\n\n\n"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_All_Escapes() { + LexerTest test = start_up_test(SLS_STR("String All Escapes"), SLS_STR("\"\n\r\t\\\"\'\0\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("\n\r\t\\\"\'\0"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Hex_Letter_A() { + LexerTest test = start_up_test(SLS_STR("String Hex Letter A"), SLS_STR("\"\x41\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("A"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Hex_Letter_a() { + LexerTest test = start_up_test(SLS_STR("String Hex Letter a"), SLS_STR("\"\x61\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("a"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Hex_Space() { + LexerTest test = start_up_test(SLS_STR("String Hex Space"), SLS_STR("\"\x20\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR(" "))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Hex_Tab() { + LexerTest test = start_up_test(SLS_STR("String Hex Tab"), SLS_STR("\"\x09\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("\t"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Hex_Newline() { + LexerTest test = start_up_test(SLS_STR("String Hex Newline"), SLS_STR("\"\x0A\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("\n"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Multiple_Hex() { + LexerTest test = start_up_test(SLS_STR("String Multiple Hex"), SLS_STR("\"\x48\x65\x6C\x6C\x6F\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("Hello"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Hex_Mixed() { + LexerTest test = start_up_test(SLS_STR("String Hex Mixed"), SLS_STR("\"Hello\x20World\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("Hello World"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Hex_Extended_ASCII() { + LexerTest test = start_up_test(SLS_STR("String Hex Extended ASCII"), SLS_STR("\"\xA9\xAE\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("©®"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Hex_Uppercase() { + LexerTest test = start_up_test(SLS_STR("String Hex Uppercase"), SLS_STR("\"\xFF\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("\xFF"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Hex_Lowercase() { + LexerTest test = start_up_test(SLS_STR("String Hex Lowercase"), SLS_STR("\"\xff\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("\xff"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Hex_Mixed_Case() { + LexerTest test = start_up_test(SLS_STR("String Hex Mixed Case"), SLS_STR("\"\xAb\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("\xAb"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Hex_Zero() { + LexerTest test = start_up_test(SLS_STR("String Hex Zero"), SLS_STR("\"\x00\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("\0"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Hex_Max() { + LexerTest test = start_up_test(SLS_STR("String Hex Max"), SLS_STR("\"\xFF\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("\xFF"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_With_Escaped_Newlines() { + LexerTest test = start_up_test(SLS_STR("String With Escaped Newlines"), SLS_STR("\"line1\nline2\nline3\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("line1\nline2\nline3"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Paragraph() { + LexerTest test = start_up_test(SLS_STR("String Paragraph"), SLS_STR("\"First line.\nSecond line.\nThird line.\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("First line.\nSecond line.\nThird line."))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Mixed_Line_Endings() { + LexerTest test = start_up_test(SLS_STR("String Mixed Line Endings"), SLS_STR("\"Windows\r\nUnix\nMac\r\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("Windows\r\nUnix\nMac\r"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Leading_Whitespace_Outside() { + LexerTest test = start_up_test(SLS_STR("String Leading Whitespace Outside"), SLS_STR(" \"hello\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("hello"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Trailing_Whitespace_Outside() { + LexerTest test = start_up_test(SLS_STR("String Trailing Whitespace Outside"), SLS_STR("\"hello\" ")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("hello"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Both_Whitespace_Outside() { + LexerTest test = start_up_test(SLS_STR("String Both Whitespace Outside"), SLS_STR(" \"hello\" ")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("hello"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Tab_Before() { + LexerTest test = start_up_test(SLS_STR("String Tab Before"), SLS_STR(" \"hello\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("hello"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Tabs_And_Newlines_Inside() { + LexerTest test = start_up_test(SLS_STR("String Tabs And Newlines Inside"), SLS_STR("\"hello\t\tworld\n\ntest\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("hello\t\tworld\n\ntest"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Only_Tabs() { + LexerTest test = start_up_test(SLS_STR("String Only Tabs"), SLS_STR("\"\t\t\t\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("\t\t\t"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Only_Newlines() { + LexerTest test = start_up_test(SLS_STR("String Only Newlines"), SLS_STR("\"\n\n\n\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("\n\n\n"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Mixed_Whitespace() { + LexerTest test = start_up_test(SLS_STR("String Mixed Whitespace"), SLS_STR("\" \t\n\r \"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR(" \t\n\r "))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Sentence() { + LexerTest test = start_up_test(SLS_STR("String Sentence"), SLS_STR("\"The quick brown fox jumps over the lazy dog.\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("The quick brown fox jumps over the lazy dog."))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Multiple_Sentences() { + LexerTest test = start_up_test(SLS_STR("String Multiple Sentences"), SLS_STR("\"First sentence. Second sentence. Third sentence.\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("First sentence. Second sentence. Third sentence."))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Long_With_Escapes() { + LexerTest test = start_up_test(SLS_STR("String Long With Escapes"), SLS_STR("\"This is a long string.\nIt has multiple lines.\nAnd some tabs\there.\nPlus quotes \"like this\".\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("This is a long string.\nIt has multiple lines.\nAnd some tabs\there.\nPlus quotes \"like this\"."))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Repetitive() { + LexerTest test = start_up_test(SLS_STR("String Repetitive"), SLS_STR("\"aaaaaaaaaa\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("aaaaaaaaaa"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_ASCII_Printable() { + LexerTest test = start_up_test(SLS_STR("String ASCII Printable"), SLS_STR("\" !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR(" !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Code_Like() { + LexerTest test = start_up_test(SLS_STR("String Code Like"), SLS_STR("\"int main() { return 0; }\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("int main() { return 0; }"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_JSON_Like() { + LexerTest test = start_up_test(SLS_STR("String JSON Like"), SLS_STR("\"{{\\\"key\\\": \\\"value\\\"}}\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("{\"key\": \"value\"}"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_URL() { + LexerTest test = start_up_test(SLS_STR("String URL"), SLS_STR("\"https://example.com/path?query=value\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("https://example.com/path?query=value"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Email() { + LexerTest test = start_up_test(SLS_STR("String Email"), SLS_STR("\"user@example.com\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("user@example.com"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Unix_Path() { + LexerTest test = start_up_test(SLS_STR("String Unix Path"), SLS_STR("\"/home/user/file.txt\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("/home/user/file.txt"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Windows_Path() { + LexerTest test = start_up_test(SLS_STR("String Windows Path"), SLS_STR("\"C:\\Users\\file.txt\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("C:\\Users\\file.txt"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_SQL_Like() { + LexerTest test = start_up_test(SLS_STR("String SQL Like"), SLS_STR("\"SELECT * FROM users WHERE id = 1\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("SELECT * FROM users WHERE id = 1"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Regex_Like() { + LexerTest test = start_up_test(SLS_STR("String Regex Like"), SLS_STR("\"[a-zA-Z0-9]+\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("[a-zA-Z0-9]+"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Unclosed() { + LexerTest test = start_up_test(SLS_STR("String Unclosed"), SLS_STR("\"hello")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_for_error(&test, result, i++, SLS_STR("Invalid string literal: unclosed string literal."))) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Unescaped_Newline() { + LexerTest test = start_up_test(SLS_STR("String Unescaped Newline"), SLS_STR("\"hello\nworld\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_for_error(&test, result, i++, SLS_STR("Invalid string literal: unescaped newline in string literal."))) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Invalid_Escape() { + LexerTest test = start_up_test(SLS_STR("String Invalid Escape"), SLS_STR("\"hello\\qworld\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_for_error(&test, result, i++, SLS_STR("Invalid string literal: unknown escape sequence '\\q'."))) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Hex_Too_Short() { + LexerTest test = start_up_test(SLS_STR("String Hex Too Short"), SLS_STR("\"\x4\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_for_error(&test, result, i++, SLS_STR("Invalid string literal: hexadecimal escape must have exactly 2 digits."))) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Hex_Too_Long() { + LexerTest test = start_up_test(SLS_STR("String Hex Too Long"), SLS_STR("\"\\x414\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_for_error(&test, result, i++, SLS_STR("Invalid string literal: hexadecimal escape must have exactly 2 digits."))) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Hex_Invalid_Digit() { + LexerTest test = start_up_test(SLS_STR("String Hex Invalid Digit"), SLS_STR("\"\\xGG\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_for_error(&test, result, i++, SLS_STR("Invalid string literal: invalid hexadecimal digit 'G'."))) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Single_Quotes() { + LexerTest test = start_up_test(SLS_STR("String Single Quotes"), SLS_STR("'hello'")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_for_error(&test, result, i++, SLS_STR("Invalid string literal: string literals must use double quotes."))) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Backslash_At_End() { + LexerTest test = start_up_test(SLS_STR("String Backslash At End"), SLS_STR("\"hello\\\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_for_error(&test, result, i++, SLS_STR("Invalid string literal: incomplete escape sequence at end."))) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Only_Escapes() { + LexerTest test = start_up_test(SLS_STR("String Only Escapes"), SLS_STR("\"\n\t\r\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("\n\t\r"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_With_Nulls() { + LexerTest test = start_up_test(SLS_STR("String With Nulls"), SLS_STR("\"a\0b\0c\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("a\0b\0c"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + +static TestResult test_String_Many_Escapes() { + LexerTest test = start_up_test(SLS_STR("String Many Escapes"), SLS_STR("\"\n\n\n\n\n\n\n\n\n\n\"")); + LexerResult result = lexical_analysis(&test.lexer_info); + if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error); + size_t i = 0; + if (test_string_value(&test, result, i++, &SLS_STR("\n\n\n\n\n\n\n\n\n\n"))) return test.result; + if (test_eof_value(&test, result, i++, 0)) return test.result; + return pass_test(&test, result); +} + TestsReport run_lexer_tests() { TestsReport test_report = (TestsReport) { .section = SLS_STR("lexer_tests"), @@ -3162,13 +3904,13 @@ TestsReport run_lexer_tests() { test_report.tests[i++] = test_Char_Right_Bracket(); test_report.tests[i++] = test_Char_Left_Brace(); test_report.tests[i++] = test_Char_Right_Brace(); + test_report.tests[i++] = test_Char_Escape_Single_quote(); test_report.tests[i++] = test_Char_Escape_Newline(); + test_report.tests[i++] = test_Char_Escape_Carriage_return(); + test_report.tests[i++] = test_Char_Escape_Tab(); test_report.tests[i++] = test_Char_Escape_Null_character(); test_report.tests[i++] = test_Char_Escape_Double_quote(); - test_report.tests[i++] = test_Char_Escape_Single_quote(); - test_report.tests[i++] = test_Char_Escape_Tab(); test_report.tests[i++] = test_Char_Escape_Backslash(); - test_report.tests[i++] = test_Char_Escape_Carriage_return(); test_report.tests[i++] = test_Char_Newline(); test_report.tests[i++] = test_Char_Carriage_Return(); test_report.tests[i++] = test_Char_Tab(); @@ -3214,6 +3956,81 @@ TestsReport run_lexer_tests() { test_report.tests[i++] = test_Char_Hex_Digits_Uppercase(); test_report.tests[i++] = test_Char_Hex_Digits_Lowercase(); test_report.tests[i++] = test_Char_Hex_Digits_Mixed(); + test_report.tests[i++] = test_String_Empty(); + test_report.tests[i++] = test_String_Simple(); + test_report.tests[i++] = test_String_With_Space(); + test_report.tests[i++] = test_String_Single_Char(); + test_report.tests[i++] = test_String_Multiple_Words(); + test_report.tests[i++] = test_String_With_Numbers(); + test_report.tests[i++] = test_String_Only_Numbers(); + test_report.tests[i++] = test_String_Mixed_Case(); + test_report.tests[i++] = test_String_With_Punctuation(); + test_report.tests[i++] = test_String_With_Symbols(); + test_report.tests[i++] = test_String_Multiple_Spaces(); + test_report.tests[i++] = test_String_Leading_Space(); + test_report.tests[i++] = test_String_Trailing_Space(); + test_report.tests[i++] = test_String_Only_Spaces(); + test_report.tests[i++] = test_String_Newline(); + test_report.tests[i++] = test_String_Tab(); + test_report.tests[i++] = test_String_Carriage_Return(); + test_report.tests[i++] = test_String_Backslash(); + test_report.tests[i++] = test_String_Double_Quote(); + test_report.tests[i++] = test_String_Single_Quote(); + test_report.tests[i++] = test_String_Null_Char(); + test_report.tests[i++] = test_String_Multiple_Escapes(); + test_report.tests[i++] = test_String_Mixed_Escapes(); + test_report.tests[i++] = test_String_Escape_At_Start(); + test_report.tests[i++] = test_String_Escape_At_End(); + test_report.tests[i++] = test_String_Consecutive_Escapes(); + test_report.tests[i++] = test_String_All_Escapes(); + test_report.tests[i++] = test_String_Hex_Letter_A(); + test_report.tests[i++] = test_String_Hex_Letter_a(); + test_report.tests[i++] = test_String_Hex_Space(); + test_report.tests[i++] = test_String_Hex_Tab(); + test_report.tests[i++] = test_String_Hex_Newline(); + test_report.tests[i++] = test_String_Multiple_Hex(); + test_report.tests[i++] = test_String_Hex_Mixed(); + test_report.tests[i++] = test_String_Hex_Extended_ASCII(); + test_report.tests[i++] = test_String_Hex_Uppercase(); + test_report.tests[i++] = test_String_Hex_Lowercase(); + test_report.tests[i++] = test_String_Hex_Mixed_Case(); + test_report.tests[i++] = test_String_Hex_Zero(); + test_report.tests[i++] = test_String_Hex_Max(); + test_report.tests[i++] = test_String_With_Escaped_Newlines(); + test_report.tests[i++] = test_String_Paragraph(); + test_report.tests[i++] = test_String_Mixed_Line_Endings(); + test_report.tests[i++] = test_String_Leading_Whitespace_Outside(); + test_report.tests[i++] = test_String_Trailing_Whitespace_Outside(); + test_report.tests[i++] = test_String_Both_Whitespace_Outside(); + test_report.tests[i++] = test_String_Tab_Before(); + test_report.tests[i++] = test_String_Tabs_And_Newlines_Inside(); + test_report.tests[i++] = test_String_Only_Tabs(); + test_report.tests[i++] = test_String_Only_Newlines(); + test_report.tests[i++] = test_String_Mixed_Whitespace(); + test_report.tests[i++] = test_String_Sentence(); + test_report.tests[i++] = test_String_Multiple_Sentences(); + test_report.tests[i++] = test_String_Long_With_Escapes(); + test_report.tests[i++] = test_String_Repetitive(); + test_report.tests[i++] = test_String_ASCII_Printable(); + test_report.tests[i++] = test_String_Code_Like(); + test_report.tests[i++] = test_String_JSON_Like(); + test_report.tests[i++] = test_String_URL(); + test_report.tests[i++] = test_String_Email(); + test_report.tests[i++] = test_String_Unix_Path(); + test_report.tests[i++] = test_String_Windows_Path(); + test_report.tests[i++] = test_String_SQL_Like(); + test_report.tests[i++] = test_String_Regex_Like(); + test_report.tests[i++] = test_String_Unclosed(); + test_report.tests[i++] = test_String_Unescaped_Newline(); + test_report.tests[i++] = test_String_Invalid_Escape(); + test_report.tests[i++] = test_String_Hex_Too_Short(); + test_report.tests[i++] = test_String_Hex_Too_Long(); + test_report.tests[i++] = test_String_Hex_Invalid_Digit(); + test_report.tests[i++] = test_String_Single_Quotes(); + test_report.tests[i++] = test_String_Backslash_At_End(); + test_report.tests[i++] = test_String_Only_Escapes(); + test_report.tests[i++] = test_String_With_Nulls(); + test_report.tests[i++] = test_String_Many_Escapes(); return test_report; } diff --git a/SLS_Tests/cases.yaml b/SLS_Tests/cases.yaml index f2ee725..ff21a83 100644 --- a/SLS_Tests/cases.yaml +++ b/SLS_Tests/cases.yaml @@ -149,14 +149,14 @@ code: '-9223372036854775808' tokens: - type: i64 - value: -9223372036854775808 + value: INT64_MIN operations: - function: push type: i64 - value: -9223372036854775808 + value: INT64_MIN stack_final: - type: i64 - value: -9223372036854775808 + value: INT64_MIN - name: Integer Default Decimal with Underscore code: '1_000_000' tokens: @@ -782,14 +782,14 @@ code: -9223372036854775808:i64 tokens: - type: i64 - value: -9223372036854775808 + value: INT64_MIN operations: - function: push type: i64 - value: -9223372036854775808 + value: INT64_MIN stack_final: - type: i64 - value: -9223372036854775808 + value: INT64_MIN - name: Integer i64 Overflow code: 9223372036854775808:i64 tokens: @@ -1350,14 +1350,14 @@ code: 18446744073709551615:u64 tokens: - type: u64 - value: 18446744073709551615 + value: UINT64_MAX operations: - function: push type: u64 - value: 18446744073709551615 + value: UINT64_MAX stack_final: - type: u64 - value: 18446744073709551615 + value: UINT64_MAX - name: Integer u64 Min Value code: 0:u64 tokens: @@ -1396,14 +1396,14 @@ code: 0xFFFFFFFFFFFFFFFF:u64 tokens: - type: u64 - value: 18446744073709551615 + value: UINT64_MAX operations: - function: push type: u64 - value: 18446744073709551615 + value: UINT64_MAX stack_final: - type: u64 - value: 18446744073709551615 + value: UINT64_MAX - name: Integer u64 Binary Sample code: 0b1010101010101010:u64 tokens: @@ -2641,6 +2641,18 @@ stack_final: - type: char value: '}' +- name: Char Escape Single quote + code: '''\''''' + tokens: + - type: char + value: '''' + operations: + - function: push + type: char + value: '''' + stack_final: + - type: char + value: '''' - name: Char Escape Newline code: '''\n''' tokens: @@ -2659,6 +2671,30 @@ value: ' ' +- name: Char Escape Carriage return + code: '''\r''' + tokens: + - type: char + value: "\r" + operations: + - function: push + type: char + value: "\r" + stack_final: + - type: char + value: "\r" +- name: Char Escape Tab + code: '''\t''' + tokens: + - type: char + value: "\t" + operations: + - function: push + type: char + value: "\t" + stack_final: + - type: char + value: "\t" - name: Char Escape Null character code: '''\0''' tokens: @@ -2683,30 +2719,6 @@ stack_final: - type: char value: '"' -- name: Char Escape Single quote - code: '''\''''' - tokens: - - type: char - value: '''' - operations: - - function: push - type: char - value: '''' - stack_final: - - type: char - value: '''' -- name: Char Escape Tab - code: '''\t''' - tokens: - - type: char - value: "\t" - operations: - - function: push - type: char - value: "\t" - stack_final: - - type: char - value: "\t" - name: Char Escape Backslash code: '''\\''' tokens: @@ -2719,18 +2731,6 @@ stack_final: - type: char value: \ -- name: Char Escape Carriage return - code: '''\r''' - tokens: - - type: char - value: "\r" - operations: - - function: push - type: char - value: "\r" - stack_final: - - type: char - value: "\r" - name: Char Newline code: '''\n''' tokens: @@ -3040,17 +3040,17 @@ - type: error value: 'Invalid character literal: unescaped newline in character literal.' - name: Char Invalid Escape - code: '''\q''' + code: '''\\q''' tokens: - type: error - value: 'Invalid character literal: unknown escape sequence ''\q''.' + value: 'Invalid character literal: unknown escape sequence ''\\q''.' - name: Char Hex Escape Too Short - code: '''\x4''' + code: '''\\x4''' tokens: - type: error value: 'Invalid character literal: hexadecimal escape must have exactly 2 digits.' - name: Char Hex Escape Too Long - code: '''\x414''' + code: '''\\x414''' tokens: - type: error value: 'Invalid character literal: hexadecimal escape must have exactly 2 digits.' @@ -3213,3 +3213,851 @@ stack_final: - type: char value: "\xAB" +- name: String Empty + code: '""' + tokens: + - type: string + value: '' + operations: + - function: push + type: string + value: '' + stack_final: + - type: string + value: '' +- name: String Simple + code: '"hello"' + tokens: + - type: string + value: hello + operations: + - function: push + type: string + value: hello + stack_final: + - type: string + value: hello +- name: String With Space + code: '"hello world"' + tokens: + - type: string + value: hello world + operations: + - function: push + type: string + value: hello world + stack_final: + - type: string + value: hello world +- name: String Single Char + code: '"A"' + tokens: + - type: string + value: A + operations: + - function: push + type: string + value: A + stack_final: + - type: string + value: A +- name: String Multiple Words + code: '"The quick brown fox"' + tokens: + - type: string + value: The quick brown fox + operations: + - function: push + type: string + value: The quick brown fox + stack_final: + - type: string + value: The quick brown fox +- name: String With Numbers + code: '"abc123"' + tokens: + - type: string + value: abc123 + operations: + - function: push + type: string + value: abc123 + stack_final: + - type: string + value: abc123 +- name: String Only Numbers + code: '"12345"' + tokens: + - type: string + value: '12345' + operations: + - function: push + type: string + value: '12345' + stack_final: + - type: string + value: '12345' +- name: String Mixed Case + code: '"HeLLo WoRLd"' + tokens: + - type: string + value: HeLLo WoRLd + operations: + - function: push + type: string + value: HeLLo WoRLd + stack_final: + - type: string + value: HeLLo WoRLd +- name: String With Punctuation + code: '"Hello, World!"' + tokens: + - type: string + value: Hello, World! + operations: + - function: push + type: string + value: Hello, World! + stack_final: + - type: string + value: Hello, World! +- name: String With Symbols + code: '"@#$%^&*()"' + tokens: + - type: string + value: '@#$%^&*()' + operations: + - function: push + type: string + value: '@#$%^&*()' + stack_final: + - type: string + value: '@#$%^&*()' +- name: String Multiple Spaces + code: '"hello world"' + tokens: + - type: string + value: hello world + operations: + - function: push + type: string + value: hello world + stack_final: + - type: string + value: hello world +- name: String Leading Space + code: '" hello"' + tokens: + - type: string + value: ' hello' + operations: + - function: push + type: string + value: ' hello' + stack_final: + - type: string + value: ' hello' +- name: String Trailing Space + code: '"hello "' + tokens: + - type: string + value: 'hello ' + operations: + - function: push + type: string + value: 'hello ' + stack_final: + - type: string + value: 'hello ' +- name: String Only Spaces + code: '" "' + tokens: + - type: string + value: ' ' + operations: + - function: push + type: string + value: ' ' + stack_final: + - type: string + value: ' ' +- name: String Newline + code: '"hello\nworld"' + tokens: + - type: string + value: hello\nworld + operations: + - function: push + type: string + value: hello\nworld + stack_final: + - type: string + value: hello\nworld +- name: String Tab + code: '"hello\tworld"' + tokens: + - type: string + value: hello\tworld + operations: + - function: push + type: string + value: hello\tworld + stack_final: + - type: string + value: hello\tworld +- name: String Carriage Return + code: '"hello\rworld"' + tokens: + - type: string + value: hello\rworld + operations: + - function: push + type: string + value: hello\rworld + stack_final: + - type: string + value: hello\rworld +- name: String Backslash + code: '"hello\\world"' + tokens: + - type: string + value: hello\\world + operations: + - function: push + type: string + value: hello\\world + stack_final: + - type: string + value: hello\\world +- name: String Double Quote + code: '"say \\"hello\\""' + tokens: + - type: string + value: say \"hello\" + operations: + - function: push + type: string + value: say \"hello\" + stack_final: + - type: string + value: say \"hello\" +- name: String Single Quote + code: '"it\''s"' + tokens: + - type: string + value: it's + operations: + - function: push + type: string + value: it's + stack_final: + - type: string + value: it's +- name: String Null Char + code: '"hello\0world"' + tokens: + - type: string + value: hello\0world + operations: + - function: push + type: string + value: hello\0world + stack_final: + - type: string + value: hello\0world +- name: String Multiple Escapes + code: '"line1\nline2\nline3"' + tokens: + - type: string + value: line1\nline2\nline3 + operations: + - function: push + type: string + value: line1\nline2\nline3 + stack_final: + - type: string + value: line1\nline2\nline3 +- name: String Mixed Escapes + code: '"tab\there\nnewline\\backslash"' + tokens: + - type: string + value: tab\there\nnewline\\backslash + operations: + - function: push + type: string + value: tab\there\nnewline\\backslash + stack_final: + - type: string + value: tab\there\nnewline\\backslash +- name: String Escape At Start + code: '"\nhello"' + tokens: + - type: string + value: \nhello + operations: + - function: push + type: string + value: \nhello + stack_final: + - type: string + value: \nhello +- name: String Escape At End + code: '"hello\n"' + tokens: + - type: string + value: hello\n + operations: + - function: push + type: string + value: hello\n + stack_final: + - type: string + value: hello\n +- name: String Consecutive Escapes + code: '"\n\n\n"' + tokens: + - type: string + value: \n\n\n + operations: + - function: push + type: string + value: \n\n\n + stack_final: + - type: string + value: \n\n\n +- name: String All Escapes + code: '"\n\r\t\\"\''\0"' + tokens: + - type: string + value: \n\r\t\\\"\'\0 + operations: + - function: push + type: string + value: \n\r\t\\\"\'\0 + stack_final: + - type: string + value: \n\r\t\\\"\'\0 +- name: String Hex Letter A + code: '"\x41"' + tokens: + - type: string + value: A + operations: + - function: push + type: string + value: A + stack_final: + - type: string + value: A +- name: String Hex Letter a + code: '"\x61"' + tokens: + - type: string + value: a + operations: + - function: push + type: string + value: a + stack_final: + - type: string + value: a +- name: String Hex Space + code: '"\x20"' + tokens: + - type: string + value: ' ' + operations: + - function: push + type: string + value: ' ' + stack_final: + - type: string + value: ' ' +- name: String Hex Tab + code: '"\x09"' + tokens: + - type: string + value: \t + operations: + - function: push + type: string + value: \t + stack_final: + - type: string + value: \t +- name: String Hex Newline + code: '"\x0A"' + tokens: + - type: string + value: \n + operations: + - function: push + type: string + value: \n + stack_final: + - type: string + value: \n +- name: String Multiple Hex + code: '"\x48\x65\x6C\x6C\x6F"' + tokens: + - type: string + value: Hello + operations: + - function: push + type: string + value: Hello + stack_final: + - type: string + value: Hello +- name: String Hex Mixed + code: '"Hello\x20World"' + tokens: + - type: string + value: Hello World + operations: + - function: push + type: string + value: Hello World + stack_final: + - type: string + value: Hello World +- name: String Hex Extended ASCII + code: '"\xA9\xAE"' + tokens: + - type: string + value: "\xA9\xAE" + operations: + - function: push + type: string + value: "\xA9\xAE" + stack_final: + - type: string + value: "\xA9\xAE" +- name: String Hex Uppercase + code: '"\xFF"' + tokens: + - type: string + value: \xFF + operations: + - function: push + type: string + value: \xFF + stack_final: + - type: string + value: \xFF +- name: String Hex Lowercase + code: '"\xff"' + tokens: + - type: string + value: \xff + operations: + - function: push + type: string + value: \xff + stack_final: + - type: string + value: \xff +- name: String Hex Mixed Case + code: '"\xAb"' + tokens: + - type: string + value: \xAb + operations: + - function: push + type: string + value: \xAb + stack_final: + - type: string + value: \xAb +- name: String Hex Zero + code: '"\x00"' + tokens: + - type: string + value: \0 + operations: + - function: push + type: string + value: \0 + stack_final: + - type: string + value: \0 +- name: String Hex Max + code: '"\xFF"' + tokens: + - type: string + value: \xFF + operations: + - function: push + type: string + value: \xFF + stack_final: + - type: string + value: \xFF +- name: String With Escaped Newlines + code: '"line1\nline2\nline3"' + tokens: + - type: string + value: line1\nline2\nline3 + operations: + - function: push + type: string + value: line1\nline2\nline3 + stack_final: + - type: string + value: line1\nline2\nline3 +- name: String Paragraph + code: '"First line.\nSecond line.\nThird line."' + tokens: + - type: string + value: First line.\nSecond line.\nThird line. + operations: + - function: push + type: string + value: First line.\nSecond line.\nThird line. + stack_final: + - type: string + value: First line.\nSecond line.\nThird line. +- name: String Mixed Line Endings + code: '"Windows\r\nUnix\nMac\r"' + tokens: + - type: string + value: Windows\r\nUnix\nMac\r + operations: + - function: push + type: string + value: Windows\r\nUnix\nMac\r + stack_final: + - type: string + value: Windows\r\nUnix\nMac\r +- name: String Leading Whitespace Outside + code: ' "hello"' + tokens: + - type: string + value: hello + operations: + - function: push + type: string + value: hello + stack_final: + - type: string + value: hello +- name: String Trailing Whitespace Outside + code: '"hello" ' + tokens: + - type: string + value: hello + operations: + - function: push + type: string + value: hello + stack_final: + - type: string + value: hello +- name: String Both Whitespace Outside + code: ' "hello" ' + tokens: + - type: string + value: hello + operations: + - function: push + type: string + value: hello + stack_final: + - type: string + value: hello +- name: String Tab Before + code: "\t\"hello\"" + tokens: + - type: string + value: hello + operations: + - function: push + type: string + value: hello + stack_final: + - type: string + value: hello +- name: String Tabs And Newlines Inside + code: '"hello\t\tworld\n\ntest"' + tokens: + - type: string + value: hello\t\tworld\n\ntest + operations: + - function: push + type: string + value: hello\t\tworld\n\ntest + stack_final: + - type: string + value: hello\t\tworld\n\ntest +- name: String Only Tabs + code: '"\t\t\t"' + tokens: + - type: string + value: \t\t\t + operations: + - function: push + type: string + value: \t\t\t + stack_final: + - type: string + value: \t\t\t +- name: String Only Newlines + code: '"\n\n\n"' + tokens: + - type: string + value: \n\n\n + operations: + - function: push + type: string + value: \n\n\n + stack_final: + - type: string + value: \n\n\n +- name: String Mixed Whitespace + code: '" \t\n\r "' + tokens: + - type: string + value: ' \t\n\r ' + operations: + - function: push + type: string + value: ' \t\n\r ' + stack_final: + - type: string + value: ' \t\n\r ' +- name: String Sentence + code: '"The quick brown fox jumps over the lazy dog."' + tokens: + - type: string + value: The quick brown fox jumps over the lazy dog. + operations: + - function: push + type: string + value: The quick brown fox jumps over the lazy dog. + stack_final: + - type: string + value: The quick brown fox jumps over the lazy dog. +- name: String Multiple Sentences + code: '"First sentence. Second sentence. Third sentence."' + tokens: + - type: string + value: First sentence. Second sentence. Third sentence. + operations: + - function: push + type: string + value: First sentence. Second sentence. Third sentence. + stack_final: + - type: string + value: First sentence. Second sentence. Third sentence. +- name: String Long With Escapes + code: '"This is a long string.\nIt has multiple lines.\nAnd some tabs\there.\nPlus + quotes "like this"."' + tokens: + - type: string + value: This is a long string.\nIt has multiple lines.\nAnd some tabs\there.\nPlus + quotes \"like this\". + operations: + - function: push + type: string + value: This is a long string.\nIt has multiple lines.\nAnd some tabs\there.\nPlus + quotes \"like this\". + stack_final: + - type: string + value: This is a long string.\nIt has multiple lines.\nAnd some tabs\there.\nPlus + quotes \"like this\". +- name: String Repetitive + code: '"aaaaaaaaaa"' + tokens: + - type: string + value: aaaaaaaaaa + operations: + - function: push + type: string + value: aaaaaaaaaa + stack_final: + - type: string + value: aaaaaaaaaa +- name: String ASCII Printable + code: '" !#$%&''()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~"' + tokens: + - type: string + value: ' !#$%&''()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~' + operations: + - function: push + type: string + value: ' !#$%&''()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~' + stack_final: + - type: string + value: ' !#$%&''()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~' +- name: String Code Like + code: '"int main() { return 0; }"' + tokens: + - type: string + value: int main() { return 0; } + operations: + - function: push + type: string + value: int main() { return 0; } + stack_final: + - type: string + value: int main() { return 0; } +- name: String JSON Like + code: '"{{\\"key\\": \\"value\\"}}"' + tokens: + - type: string + value: '{\"key\": \"value\"}' + operations: + - function: push + type: string + value: '{\"key\": \"value\"}' + stack_final: + - type: string + value: '{\"key\": \"value\"}' +- name: String URL + code: '"https://example.com/path?query=value"' + tokens: + - type: string + value: https://example.com/path?query=value + operations: + - function: push + type: string + value: https://example.com/path?query=value + stack_final: + - type: string + value: https://example.com/path?query=value +- name: String Email + code: '"user@example.com"' + tokens: + - type: string + value: user@example.com + operations: + - function: push + type: string + value: user@example.com + stack_final: + - type: string + value: user@example.com +- name: String Unix Path + code: '"/home/user/file.txt"' + tokens: + - type: string + value: /home/user/file.txt + operations: + - function: push + type: string + value: /home/user/file.txt + stack_final: + - type: string + value: /home/user/file.txt +- name: String Windows Path + code: '"C:\\Users\\file.txt"' + tokens: + - type: string + value: C:\\Users\\file.txt + operations: + - function: push + type: string + value: C:\\Users\\file.txt + stack_final: + - type: string + value: C:\\Users\\file.txt +- name: String SQL Like + code: '"SELECT * FROM users WHERE id = 1"' + tokens: + - type: string + value: SELECT * FROM users WHERE id = 1 + operations: + - function: push + type: string + value: SELECT * FROM users WHERE id = 1 + stack_final: + - type: string + value: SELECT * FROM users WHERE id = 1 +- name: String Regex Like + code: '"[a-zA-Z0-9]+"' + tokens: + - type: string + value: '[a-zA-Z0-9]+' + operations: + - function: push + type: string + value: '[a-zA-Z0-9]+' + stack_final: + - type: string + value: '[a-zA-Z0-9]+' +- name: String Unclosed + code: '"hello' + tokens: + - type: error + value: 'Invalid string literal: unclosed string literal.' +- name: String Unescaped Newline + code: '"hello\nworld"' + tokens: + - type: error + value: 'Invalid string literal: unescaped newline in string literal.' +- name: String Invalid Escape + code: '"hello\\qworld"' + tokens: + - type: error + value: 'Invalid string literal: unknown escape sequence ''\\q''.' +- name: String Hex Too Short + code: '"\x4"' + tokens: + - type: error + value: 'Invalid string literal: hexadecimal escape must have exactly 2 digits.' +- name: String Hex Too Long + code: '"\\x414"' + tokens: + - type: error + value: 'Invalid string literal: hexadecimal escape must have exactly 2 digits.' +- name: String Hex Invalid Digit + code: '"\\xGG"' + tokens: + - type: error + value: 'Invalid string literal: invalid hexadecimal digit ''G''.' +- name: String Single Quotes + code: '''hello''' + tokens: + - type: error + value: 'Invalid string literal: string literals must use double quotes.' +- name: String Backslash At End + code: '"hello\\"' + tokens: + - type: error + value: 'Invalid string literal: incomplete escape sequence at end.' +- name: String Only Escapes + code: '"\n\t\r"' + tokens: + - type: string + value: \n\t\r + operations: + - function: push + type: string + value: \n\t\r + stack_final: + - type: string + value: \n\t\r +- name: String With Nulls + code: '"a\0b\0c"' + tokens: + - type: string + value: a\0b\0c + operations: + - function: push + type: string + value: a\0b\0c + stack_final: + - type: string + value: a\0b\0c +- name: String Many Escapes + code: '"\n\n\n\n\n\n\n\n\n\n"' + tokens: + - type: string + value: \n\n\n\n\n\n\n\n\n\n + operations: + - function: push + type: string + value: \n\n\n\n\n\n\n\n\n\n + stack_final: + - type: string + value: \n\n\n\n\n\n\n\n\n\n diff --git a/SLS_Tests/generate_tests/base_tests.py b/SLS_Tests/generate_tests/base_tests.py index f70881a..dc02caa 100644 --- a/SLS_Tests/generate_tests/base_tests.py +++ b/SLS_Tests/generate_tests/base_tests.py @@ -52,6 +52,8 @@ class BaseTestGenerator(ABC): test creation, operation building, and error handling. """ + ENABLE_UNICODE = False + __generators: "ClassVar[List[Type[BaseTestGenerator]]]" = [] def __init_subclass__(cls): diff --git a/SLS_Tests/generate_tests/char_tests.py b/SLS_Tests/generate_tests/char_tests.py index b6e9830..449899f 100644 --- a/SLS_Tests/generate_tests/char_tests.py +++ b/SLS_Tests/generate_tests/char_tests.py @@ -5,8 +5,6 @@ from .base_tests import BaseTestGenerator class CharTestGenerator(BaseTestGenerator): """Generate test cases for character literals.""" - ENABLE_UNICODE = False - # Common escape sequences ESCAPE_SEQUENCES = { ("Newline", '\\n', '\n',), # Newline @@ -192,16 +190,16 @@ class CharTestGenerator(BaseTestGenerator): # Invalid escape sequence self.make_error_test("Char Invalid Escape", - "'\\q'", - "Invalid character literal: unknown escape sequence '\\q'.") + "'\\\\q'", + "Invalid character literal: unknown escape sequence '\\\\q'.") # Invalid hex escape (not 2 digits) self.make_error_test("Char Hex Escape Too Short", - "'\\x4'", + "'\\\\x4'", "Invalid character literal: hexadecimal escape must have exactly 2 digits.") self.make_error_test("Char Hex Escape Too Long", - "'\\x414'", + "'\\\\x414'", "Invalid character literal: hexadecimal escape must have exactly 2 digits.") # Invalid hex digits diff --git a/SLS_Tests/generate_tests/string_tests.py b/SLS_Tests/generate_tests/string_tests.py index ce02816..0ece35e 100644 --- a/SLS_Tests/generate_tests/string_tests.py +++ b/SLS_Tests/generate_tests/string_tests.py @@ -19,301 +19,301 @@ class StringTestGenerator(BaseTestGenerator): def generate_basic_tests(self): """Generate basic string literal tests.""" # Empty string - self.make_success_test("String Empty", '""', "String", "") + self.make_success_test("String Empty", '""', "string", "") # Simple strings - self.make_success_test("String Simple", '"hello"', "String", "hello") - self.make_success_test("String With Space", '"hello world"', "String", "hello world") - self.make_success_test("String Single Char", '"A"', "String", "A") + self.make_success_test("String Simple", '"hello"', "string", "hello") + self.make_success_test("String With Space", '"hello world"', "string", "hello world") + self.make_success_test("String Single Char", '"A"', "string", "A") # Multiple words self.make_success_test("String Multiple Words", - '"The quick brown fox"', "String", "The quick brown fox") + '"The quick brown fox"', "string", "The quick brown fox") # Numbers in strings - self.make_success_test("String With Numbers", '"abc123"', "String", "abc123") - self.make_success_test("String Only Numbers", '"12345"', "String", "12345") + self.make_success_test("String With Numbers", '"abc123"', "string", "abc123") + self.make_success_test("String Only Numbers", '"12345"', "string", "12345") # Mixed case - self.make_success_test("String Mixed Case", '"HeLLo WoRLd"', "String", "HeLLo WoRLd") + self.make_success_test("String Mixed Case", '"HeLLo WoRLd"', "string", "HeLLo WoRLd") # Special characters self.make_success_test("String With Punctuation", - '"Hello, World!"', "String", "Hello, World!") + '"Hello, World!"', "string", "Hello, World!") self.make_success_test("String With Symbols", - '"@#$%^&*()"', "String", "@#$%^&*()") + '"@#$%^&*()"', "string", "@#$%^&*()") # Spaces self.make_success_test("String Multiple Spaces", - '"hello world"', "String", "hello world") - self.make_success_test("String Leading Space", '" hello"', "String", " hello") - self.make_success_test("String Trailing Space", '"hello "', "String", "hello ") - self.make_success_test("String Only Spaces", '" "', "String", " ") + '"hello world"', "string", "hello world") + self.make_success_test("String Leading Space", '" hello"', "string", " hello") + self.make_success_test("String Trailing Space", '"hello "', "string", "hello ") + self.make_success_test("String Only Spaces", '" "', "string", " ") def generate_escape_sequence_tests(self): """Generate tests for escape sequences.""" # Individual escape sequences self.make_success_test("String Newline", '"hello\\nworld"', - "String", "hello\nworld") + "string", "hello\\nworld") self.make_success_test("String Tab", '"hello\\tworld"', - "String", "hello\tworld") + "string", "hello\\tworld") self.make_success_test("String Carriage Return", '"hello\\rworld"', - "String", "hello\rworld") + "string", "hello\\rworld") self.make_success_test("String Backslash", '"hello\\\\world"', - "String", "hello\\world") - self.make_success_test("String Double Quote", '"say \\"hello\\""', - "String", 'say "hello"') + "string", "hello\\\\world") + self.make_success_test("String Double Quote", '"say \\\\"hello\\\\""', + "string", 'say \\"hello\\"') self.make_success_test("String Single Quote", '"it\\\'s"', - "String", "it's") + "string", "it's") self.make_success_test("String Null Char", '"hello\\0world"', - "String", "hello\0world") + "string", "hello\\0world") # Multiple escape sequences self.make_success_test("String Multiple Escapes", '"line1\\nline2\\nline3"', - "String", "line1\nline2\nline3") + "string", "line1\\nline2\\nline3") self.make_success_test("String Mixed Escapes", '"tab\\there\\nnewline\\\\backslash"', - "String", "tab\there\nnewline\\backslash") + "string", "tab\\there\\nnewline\\\\backslash") # Escape at start/end self.make_success_test("String Escape At Start", '"\\nhello"', - "String", "\nhello") + "string", "\\nhello") self.make_success_test("String Escape At End", '"hello\\n"', - "String", "hello\n") + "string", "hello\\n") # Consecutive escapes self.make_success_test("String Consecutive Escapes", '"\\n\\n\\n"', - "String", "\n\n\n") - self.make_success_test("String All Escapes", '"\\n\\r\\t\\\\\\"\\\'\\0"', - "String", "\n\r\t\\\"\'\0") + "string", "\\n\\n\\n") + self.make_success_test("String All Escapes", '"\\n\\r\\t\\\\"\\\'\\0"', + "string", "\\n\\r\\t\\\\\\\"\\'\\0") def generate_hexadecimal_escape_tests(self): """Generate tests for hexadecimal escape sequences.""" # Basic hex escapes - self.make_success_test("String Hex Letter A", '"\\x41"', "String", "A") - self.make_success_test("String Hex Letter a", '"\\x61"', "String", "a") - self.make_success_test("String Hex Space", '"\\x20"', "String", " ") - self.make_success_test("String Hex Tab", '"\\x09"', "String", "\t") - self.make_success_test("String Hex Newline", '"\\x0A"', "String", "\n") + self.make_success_test("String Hex Letter A", '"\\x41"', "string", "A") + self.make_success_test("String Hex Letter a", '"\\x61"', "string", "a") + self.make_success_test("String Hex Space", '"\\x20"', "string", " ") + self.make_success_test("String Hex Tab", '"\\x09"', "string", "\\t") + self.make_success_test("String Hex Newline", '"\\x0A"', "string", "\\n") # Multiple hex escapes self.make_success_test("String Multiple Hex", '"\\x48\\x65\\x6C\\x6C\\x6F"', - "String", "Hello") + "string", "Hello") # Hex with regular text self.make_success_test("String Hex Mixed", '"Hello\\x20World"', - "String", "Hello World") + "string", "Hello World") # Extended ASCII self.make_success_test("String Hex Extended ASCII", '"\\xA9\\xAE"', - "String", "\xA9\xAE") + "string", "\xA9\xAE") # Case variations - self.make_success_test("String Hex Uppercase", '"\\xFF"', "String", "\xFF") - self.make_success_test("String Hex Lowercase", '"\\xff"', "String", "\xff") - self.make_success_test("String Hex Mixed Case", '"\\xAb"', "String", "\xAb") + self.make_success_test("String Hex Uppercase", '"\\xFF"', "string", "\\xFF") + self.make_success_test("String Hex Lowercase", '"\\xff"', "string", "\\xff") + self.make_success_test("String Hex Mixed Case", '"\\xAb"', "string", "\\xAb") # All hex values - self.make_success_test("String Hex Zero", '"\\x00"', "String", "\x00") - self.make_success_test("String Hex Max", '"\\xFF"', "String", "\xFF") + self.make_success_test("String Hex Zero", '"\\x00"', "string", "\\0") + self.make_success_test("String Hex Max", '"\\xFF"', "string", "\\xFF") def generate_unicode_escape_tests(self): """Generate tests for Unicode escape sequences.""" # Basic Unicode escapes - self.make_success_test("String Unicode Letter A", '"\\u{41}"', "String", "A") - self.make_success_test("String Unicode Space", '"\\u{20}"', "String", " ") + self.make_success_test("String Unicode Letter A", '"\\u{41}"', "string", "A") + self.make_success_test("String Unicode Space", '"\\u{20}"', "string", " ") # Emoji self.make_success_test("String Unicode Smiley", '"\\u{1F600}"', - "String", "😀") + "string", "😀") self.make_success_test("String Unicode Heart", '"\\u{2764}"', - "String", "❤") + "string", "❤") self.make_success_test("String Unicode Star", '"\\u{2B50}"', - "String", "⭐") + "string", "⭐") # Multiple emoji self.make_success_test("String Multiple Emoji", '"\\u{1F600}\\u{2764}\\u{2B50}"', - "String", "😀❤⭐") + "string", "😀❤⭐") # Greek letters self.make_success_test("String Unicode Greek Alpha", '"\\u{03B1}"', - "String", "α") + "string", "α") self.make_success_test("String Unicode Greek Beta", '"\\u{03B2}"', - "String", "β") + "string", "β") # Chinese characters self.make_success_test("String Unicode Chinese", '"\\u{4E2D}\\u{6587}"', - "String", "中文") + "string", "中文") # Arabic self.make_success_test("String Unicode Arabic", '"\\u{0639}\\u{0631}\\u{0628}"', - "String", "عرب") + "string", "عرب") # Cyrillic self.make_success_test("String Unicode Cyrillic", '"\\u{0420}\\u{0443}\\u{0441}"', - "String", "Рус") + "string", "Рус") # Mathematical symbols self.make_success_test("String Unicode Math", '"\\u{221E}\\u{2211}\\u{222B}"', - "String", "∞∑∫") + "string", "∞∑∫") # Mixed with regular text self.make_success_test("String Unicode Mixed", '"Hello \\u{1F600} World"', - "String", "Hello 😀 World") + "string", "Hello 😀 World") # Case variations in hex digits self.make_success_test("String Unicode Hex Uppercase", '"\\u{1F600}"', - "String", "😀") + "string", "😀") self.make_success_test("String Unicode Hex Lowercase", '"\\u{1f600}"', - "String", "😀") + "string", "😀") self.make_success_test("String Unicode Hex Mixed", '"\\u{1F60a}"', - "String", "😊") + "string", "😊") # Variable length code points - self.make_success_test("String Unicode 2 Digits", '"\\u{41}"', "String", "A") - self.make_success_test("String Unicode 4 Digits", '"\\u{03B1}"', "String", "α") - self.make_success_test("String Unicode 5 Digits", '"\\u{1F600}"', "String", "😀") + self.make_success_test("String Unicode 2 Digits", '"\\u{41}"', "string", "A") + self.make_success_test("String Unicode 4 Digits", '"\\u{03B1}"', "string", "α") + self.make_success_test("String Unicode 5 Digits", '"\\u{1F600}"', "string", "😀") self.make_success_test("String Unicode 6 Digits", '"\\u{10FFFF}"', - "String", "\U0010FFFF") + "string", "\U0010FFFF") def generate_direct_unicode_tests(self): """Generate tests for direct Unicode characters in strings.""" # Direct emoji self.make_success_test("String Direct Emoji", '"Hello 😀 World"', - "String", "Hello 😀 World") + "string", "Hello 😀 World") self.make_success_test("String Multiple Direct Emoji", '"😀❤⭐👍"', - "String", "😀❤⭐👍") + "string", "😀❤⭐👍") # Direct Greek - self.make_success_test("String Direct Greek", '"αβγδ"', "String", "αβγδ") + self.make_success_test("String Direct Greek", '"αβγδ"', "string", "αβγδ") # Direct Chinese self.make_success_test("String Direct Chinese", '"你好世界"', - "String", "你好世界") + "string", "你好世界") # Direct Arabic - self.make_success_test("String Direct Arabic", '"مرحبا"', "String", "مرحبا") + self.make_success_test("String Direct Arabic", '"مرحبا"', "string", "مرحبا") # Direct Cyrillic self.make_success_test("String Direct Cyrillic", '"Привет"', - "String", "Привет") + "string", "Привет") # Direct mathematical - self.make_success_test("String Direct Math", '"∞∑∫√π"', "String", "∞∑∫√π") + self.make_success_test("String Direct Math", '"∞∑∫√π"', "string", "∞∑∫√π") # Mixed scripts self.make_success_test("String Mixed Scripts", '"Hello 世界 Привет"', - "String", "Hello 世界 Привет") + "string", "Hello 世界 Привет") def generate_multiline_tests(self): """Generate tests for strings with embedded newlines.""" # Strings with escape newlines self.make_success_test("String With Escaped Newlines", '"line1\\nline2\\nline3"', - "String", "line1\nline2\nline3") + "string", "line1\\nline2\\nline3") # Paragraph-like text self.make_success_test("String Paragraph", '"First line.\\nSecond line.\\nThird line."', - "String", "First line.\nSecond line.\nThird line.") + "string", "First line.\\nSecond line.\\nThird line.") # Mixed line endings self.make_success_test("String Mixed Line Endings", '"Windows\\r\\nUnix\\nMac\\r"', - "String", "Windows\r\nUnix\nMac\r") + "string", "Windows\\r\\nUnix\\nMac\\r") def generate_whitespace_tests(self): """Generate tests with various whitespace.""" # Leading/trailing whitespace outside quotes self.make_success_test("String Leading Whitespace Outside", - ' "hello"', "String", "hello") + ' "hello"', "string", "hello") self.make_success_test("String Trailing Whitespace Outside", - '"hello" ', "String", "hello") + '"hello" ', "string", "hello") self.make_success_test("String Both Whitespace Outside", - ' "hello" ', "String", "hello") + ' "hello" ', "string", "hello") # Tabs outside quotes - self.make_success_test("String Tab Before", '\t"hello"', "String", "hello") + self.make_success_test("String Tab Before", '\t"hello"', "string", "hello") # Mixed whitespace self.make_success_test("String Tabs And Newlines Inside", '"hello\\t\\tworld\\n\\ntest"', - "String", "hello\t\tworld\n\ntest") + "string", "hello\\t\\tworld\\n\\ntest") # Only whitespace inside - self.make_success_test("String Only Tabs", '"\\t\\t\\t"', "String", "\t\t\t") - self.make_success_test("String Only Newlines", '"\\n\\n\\n"', "String", "\n\n\n") + self.make_success_test("String Only Tabs", '"\\t\\t\\t"', "string", "\\t\\t\\t") + self.make_success_test("String Only Newlines", '"\\n\\n\\n"', "string", "\\n\\n\\n") self.make_success_test("String Mixed Whitespace", '" \\t\\n\\r "', - "String", " \t\n\r ") + "string", " \\t\\n\\r ") def generate_long_string_tests(self): """Generate tests for longer strings.""" # Sentence self.make_success_test("String Sentence", '"The quick brown fox jumps over the lazy dog."', - "String", "The quick brown fox jumps over the lazy dog.") + "string", "The quick brown fox jumps over the lazy dog.") # Multiple sentences self.make_success_test("String Multiple Sentences", '"First sentence. Second sentence. Third sentence."', - "String", "First sentence. Second sentence. Third sentence.") + "string", "First sentence. Second sentence. Third sentence.") # Long string with escapes - long_str = "This is a long string.\\nIt has multiple lines.\\nAnd some tabs\\there.\\nPlus quotes \\\"like this\\\"." - expected = "This is a long string.\nIt has multiple lines.\nAnd some tabs\there.\nPlus quotes \"like this\"." - self.make_success_test("String Long With Escapes", f'"{long_str}"', - "String", expected) + long_str = '"This is a long string.\\nIt has multiple lines.\\nAnd some tabs\\there.\\nPlus quotes "like this"."' + expected = "This is a long string.\\nIt has multiple lines.\\nAnd some tabs\\there.\\nPlus quotes \\\"like this\\\"." + self.make_success_test("String Long With Escapes", long_str, + "string", expected) # Repetitive string self.make_success_test("String Repetitive", '"aaaaaaaaaa"', - "String", "aaaaaaaaaa") + "string", "aaaaaaaaaa") # All ASCII printable characters printable = "".join(chr(i) for i in range(32, 127) if chr(i) not in ['"', '\\']) self.make_success_test("String ASCII Printable", - f'"{printable}"', "String", printable) + f'"{printable}"', "string", printable) def generate_special_content_tests(self): """Generate tests for strings with special content.""" # Code-like strings self.make_success_test("String Code Like", '"int main() { return 0; }"', - "String", "int main() { return 0; }") + "string", "int main() { return 0; }") # JSON-like strings self.make_success_test("String JSON Like", - '"{{\\"key\\": \\"value\\"}}"', - "String", '{"key": "value"}') + '"{{\\\\"key\\\\": \\\\"value\\\\"}}"', + "string", '{\\"key\\": \\"value\\"}') # URL self.make_success_test("String URL", '"https://example.com/path?query=value"', - "String", "https://example.com/path?query=value") + "string", "https://example.com/path?query=value") # Email self.make_success_test("String Email", - '"user@example.com"', "String", "user@example.com") + '"user@example.com"', "string", "user@example.com") # File path (Unix) self.make_success_test("String Unix Path", '"/home/user/file.txt"', - "String", "/home/user/file.txt") + "string", "/home/user/file.txt") # File path (Windows) self.make_success_test("String Windows Path", '"C:\\\\Users\\\\file.txt"', - "String", "C:\\Users\\file.txt") + "string", "C:\\\\Users\\\\file.txt") # SQL-like self.make_success_test("String SQL Like", '"SELECT * FROM users WHERE id = 1"', - "String", "SELECT * FROM users WHERE id = 1") + "string", "SELECT * FROM users WHERE id = 1") # Regular expression self.make_success_test("String Regex Like", - '"[a-zA-Z0-9]+"', "String", "[a-zA-Z0-9]+") + '"[a-zA-Z0-9]+"', "string", "[a-zA-Z0-9]+") def generate_error_tests(self): """Generate error test cases.""" @@ -324,13 +324,13 @@ class StringTestGenerator(BaseTestGenerator): # Unescaped newline self.make_error_test("String Unescaped Newline", - '"hello\nworld"', + '"hello\\nworld"', "Invalid string literal: unescaped newline in string literal.") # Invalid escape sequence self.make_error_test("String Invalid Escape", - '"hello\\qworld"', - "Invalid string literal: unknown escape sequence '\\q'.") + '"hello\\\\qworld"', + "Invalid string literal: unknown escape sequence '\\\\q'.") # Hex escape too short self.make_error_test("String Hex Too Short", @@ -339,48 +339,49 @@ class StringTestGenerator(BaseTestGenerator): # Hex escape too long self.make_error_test("String Hex Too Long", - '"\\x414"', + '"\\\\x414"', "Invalid string literal: hexadecimal escape must have exactly 2 digits.") # Invalid hex digits self.make_error_test("String Hex Invalid Digit", - '"\\xGG"', + '"\\\\xGG"', "Invalid string literal: invalid hexadecimal digit 'G'.") - # Unicode no braces - self.make_error_test("String Unicode No Braces", - '"\\u1F600"', - "Invalid string literal: Unicode escape must use braces \\u{...}.") - - # Unicode empty - self.make_error_test("String Unicode Empty", - '"\\u{}"', - "Invalid string literal: empty Unicode escape sequence.") - - # Unicode too long - self.make_error_test("String Unicode Too Long", - '"\\u{1234567}"', - "Invalid string literal: Unicode escape sequence too long (max 6 hex digits).") - - # Unicode invalid code point (surrogate) - self.make_error_test("String Unicode Surrogate", - '"\\u{D800}"', - "Invalid string literal: invalid Unicode code point (surrogate range).") - - # Unicode out of range - self.make_error_test("String Unicode Out Of Range", - '"\\u{110000}"', - "Invalid string literal: Unicode code point out of range (max 0x10FFFF).") - - # Unicode invalid hex - self.make_error_test("String Unicode Invalid Hex", - '"\\u{GGGG}"', - "Invalid string literal: invalid hexadecimal digit 'G' in Unicode escape.") - - # Unclosed Unicode escape - self.make_error_test("String Unicode Unclosed", - '"\\u{1F600"', - "Invalid string literal: unclosed Unicode escape sequence.") + if self.ENABLE_UNICODE: + # Unicode no braces + self.make_error_test("String Unicode No Braces", + '"\\u1F600"', + "Invalid string literal: Unicode escape must use braces \\u{...}.") + + # Unicode empty + self.make_error_test("String Unicode Empty", + '"\\u{}"', + "Invalid string literal: empty Unicode escape sequence.") + + # Unicode too long + self.make_error_test("String Unicode Too Long", + '"\\u{1234567}"', + "Invalid string literal: Unicode escape sequence too long (max 6 hex digits).") + + # Unicode invalid code point (surrogate) + self.make_error_test("String Unicode Surrogate", + '"\\u{D800}"', + "Invalid string literal: invalid Unicode code point (surrogate range).") + + # Unicode out of range + self.make_error_test("String Unicode Out Of Range", + '"\\u{110000}"', + "Invalid string literal: Unicode code point out of range (max 0x10FFFF).") + + # Unicode invalid hex + self.make_error_test("String Unicode Invalid Hex", + '"\\u{GGGG}"', + "Invalid string literal: invalid hexadecimal digit 'G' in Unicode escape.") + + # Unclosed Unicode escape + self.make_error_test("String Unicode Unclosed", + '"\\u{1F600"', + "Invalid string literal: unclosed Unicode escape sequence.") # Single quotes instead of double self.make_error_test("String Single Quotes", @@ -389,48 +390,49 @@ class StringTestGenerator(BaseTestGenerator): # Backslash at end self.make_error_test("String Backslash At End", - '"hello\\"', + '"hello\\\\"', "Invalid string literal: incomplete escape sequence at end.") def generate_edge_case_tests(self): """Generate edge case tests.""" # String with only escape sequences self.make_success_test("String Only Escapes", - '"\\n\\t\\r"', "String", "\n\t\r") + '"\\n\\t\\r"', "string", "\\n\\t\\r") # String with null characters self.make_success_test("String With Nulls", - '"a\\0b\\0c"', "String", "a\0b\0c") + '"a\\0b\\0c"', "string", "a\\0b\\0c") # Very long escape sequence self.make_success_test("String Many Escapes", '"\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n"', - "String", "\n\n\n\n\n\n\n\n\n\n") + "string", "\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n") - # Mixed escape types - self.make_success_test("String All Escape Types", - '"\\n\\x41\\u{42}test"', - "String", "\nABtest") - - # Zero-width characters - self.make_success_test("String Zero Width", - '"hello\\u{200B}world"', - "String", "hello\u200Bworld") - - # Combining characters - self.make_success_test("String Combining", - '"e\\u{0301}"', # é as e + combining acute - "String", "e\u0301") - - # Right-to-left - self.make_success_test("String RTL Mark", - '"\\u{200F}hello"', - "String", "\u200Fhello") - - # Byte order mark - self.make_success_test("String BOM", - '"\\u{FEFF}hello"', - "String", "\uFEFFhello") + if self.ENABLE_UNICODE: + # Mixed escape types + self.make_success_test("String All Escape Types", + '"\\n\\x41\\u{42}test"', + "string", "\nABtest") + + # Zero-width characters + self.make_success_test("String Zero Width", + '"hello\\u{200B}world"', + "string", "hello\u200Bworld") + + # Combining characters + self.make_success_test("String Combining", + '"e\\u{0301}"', # é as e + combining acute + "string", "e\u0301") + + # Right-to-left + self.make_success_test("String RTL Mark", + '"\\u{200F}hello"', + "string", "\u200Fhello") + + # Byte order mark + self.make_success_test("String BOM", + '"\\u{FEFF}hello"', + "string", "\uFEFFhello") def generate_all_tests(self) -> List[Dict[str, Any]]: """Generate all string literal test cases.""" @@ -443,11 +445,12 @@ class StringTestGenerator(BaseTestGenerator): # Hexadecimal escapes self.generate_hexadecimal_escape_tests() - # Unicode escapes - self.generate_unicode_escape_tests() - - # Direct Unicode - self.generate_direct_unicode_tests() + if self.ENABLE_UNICODE: + # Unicode escapes + self.generate_unicode_escape_tests() + + # Direct Unicode + self.generate_direct_unicode_tests() # Multiline strings self.generate_multiline_tests() diff --git a/SLS_Tests/yaml_to_c_tests.py b/SLS_Tests/yaml_to_c_tests.py index 79acc50..444bd0a 100644 --- a/SLS_Tests/yaml_to_c_tests.py +++ b/SLS_Tests/yaml_to_c_tests.py @@ -74,6 +74,8 @@ def _token_to_c_call(token: dict, idx_var="i") -> str: return f'test_float_value(&test, result, {idx_var}++, &(float){{{value}}})' elif ttype == "char": return f'test_character_value(&test, result, {idx_var}++, &(uint8_t){{{ord(value)}}})' # type: ignore + elif ttype == "string": + return f'test_string_value(&test, result, {idx_var}++, &SLS_STR("{value}"))' # type: ignore elif ttype == "identifier": return f'test_identifier_value(&test, result, {idx_var}++, &(TestIdentifierValue){{FALSE, {len(value)}, "{value}"}})' # type: ignore elif ttype == "identifier_literal": @@ -89,12 +91,13 @@ def token_to_c_call(token: dict, idx_var="i") -> str: def generate_c_test(test: dict) -> str: """Convert a single YAML test entry to a C test function.""" - name = sanitize_name(test["name"]) + name = test["name"] + c_name = sanitize_name(name) code = c_string_literal(test["code"]) tokens = test.get("tokens", []) # Function header - c_code = [f"static TestResult {name}() {{", + c_code = [f"static TestResult {c_name}() {{", f' LexerTest test = start_up_test(SLS_STR("{name}"), SLS_STR("{code}"));', " LexerResult result = lexical_analysis(&test.lexer_info);", " if (result.type == SLS_ERROR) return error_fail_test(&test, result, result.error);",