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

Function test_declare_callable_errors

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

Source from the content-addressed store, hash-verified

2582
2583 #[test]
2584 fn test_declare_callable_errors() {
2585 do_error_test("DECLARE", "1:8: Expected FUNCTION or SUB after DECLARE");
2586 do_error_test("DECLARE foo", "1:9: Expected FUNCTION or SUB after DECLARE");
2587
2588 do_error_test("DECLARE FUNCTION", "1:17: Expected a name after FUNCTION");
2589 do_error_test("DECLARE SUB", "1:12: Expected a name after SUB");
2590
2591 do_error_test("DECLARE FUNCTION foo()", "1:22: Expected a parameter name");
2592 do_error_test("DECLARE SUB foo()", "1:17: Expected a parameter name");
2593
2594 do_error_test(
2595 "DECLARE SUB foo%",
2596 "1:13: SUBs cannot return a value so type annotations are not allowed",
2597 );
2598 }
2599
2600 #[test]
2601 fn test_dim_default_type() {

Callers

nothing calls this directly

Calls 1

do_error_testFunction · 0.85

Tested by

no test coverage detected