MCPcopy Index your code
hub / github.com/endbasic/endbasic / test_dim_errors

Function test_dim_errors

core/src/parser.rs:2781–2797  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2779
2780 #[test]
2781 fn test_dim_errors() {
2782 do_error_test("DIM", "1:4: Expected variable name after DIM");
2783 do_error_test("DIM 3", "1:5: Expected variable name after DIM");
2784 do_error_test("DIM AS", "1:5: Expected variable name after DIM");
2785 do_error_test("DIM foo 3", "1:9: Expected AS or end of statement");
2786 do_error_test("DIM a AS", "1:9: Invalid type name <<EOF>> in AS type definition");
2787 do_error_test("DIM a$ AS", "1:5: Type annotation not allowed in a$");
2788 do_error_test("DIM a AS 3", "1:10: Invalid type name 3 in AS type definition");
2789 do_error_test("DIM a AS INTEGER 3", "1:18: Unexpected 3 in DIM statement");
2790
2791 do_error_test("DIM a()", "1:6: Arrays require at least one dimension");
2792 do_error_test("DIM a(,)", "1:7: Missing expression");
2793 do_error_test("DIM a(, 3)", "1:7: Missing expression");
2794 do_error_test("DIM a(3, )", "1:10: Missing expression");
2795 do_error_test("DIM a(3, , 4)", "1:10: Missing expression");
2796 do_error_test("DIM a(1) AS INTEGER 3", "1:21: Unexpected 3 in DIM statement");
2797 }
2798
2799 #[test]
2800 fn test_do_until_empty() {

Callers

nothing calls this directly

Calls 1

do_error_testFunction · 0.85

Tested by

no test coverage detected