diff --git a/src/protocol/tests/parser_validation.rs b/src/protocol/tests/parser_validation.rs index a3fc6900e3388a8fff3c4f2dc2fa6d2c91b93097..b1d30a38873182dc12dc8d480f57ff36828efd4a 100644 --- a/src/protocol/tests/parser_validation.rs +++ b/src/protocol/tests/parser_validation.rs @@ -596,7 +596,7 @@ fn test_correct_select_statement() { Tester::new_single_source_expect_ok( "guard variable decl", " - primitive f() { + comp f() { channel unused -> input; u32 outer_value = 0; @@ -612,12 +612,12 @@ fn test_correct_select_statement() { Tester::new_single_source_expect_ok( "empty select", - "primitive f() { sync select {} }" + "comp f() { sync select {} }" ); Tester::new_single_source_expect_ok( "mixed uses", " - primitive f() { + comp f() { channel unused_output -> input; u32 outer_value = 0; sync select { @@ -644,7 +644,7 @@ fn test_correct_select_statement() { fn test_incorrect_select_statement() { Tester::new_single_source_expect_err( "outside sync", - "primitive f() { select {} }" + "comp f() { select {} }" ).error(|e| { e .assert_num(1) .assert_occurs_at(0, "select") @@ -653,7 +653,7 @@ fn test_incorrect_select_statement() { Tester::new_single_source_expect_err( "variable in previous block", - "primitive f() { + "comp f() { channel tx -> rx; u32 a = 0; // this one will be shadowed sync select { auto a = get(rx) -> {} } @@ -666,7 +666,7 @@ fn test_incorrect_select_statement() { Tester::new_single_source_expect_err( "put inside arm", - "primitive f() { + "comp f() { channel a -> b; sync select { put(a) -> {} } }" @@ -725,7 +725,7 @@ fn test_incorrect_goto_statement() { Tester::new_single_source_expect_err( "goto jumping outside sync", - "primitive f() { + "comp f() { sync { goto exit; } exit: u32 v = 0; }" @@ -738,7 +738,7 @@ fn test_incorrect_goto_statement() { Tester::new_single_source_expect_err( "goto jumping to select case", - "primitive f(in i) { + "comp f(in i) { sync select { hello: auto a = get(i) -> i += 1 } @@ -750,7 +750,7 @@ fn test_incorrect_goto_statement() { Tester::new_single_source_expect_err( "goto jumping into select case skipping variable", - "primitive f(in i) { + "comp f(in i) { goto waza; sync select { auto a = get(i) -> { @@ -797,7 +797,7 @@ fn test_incorrect_while_statement() { Tester::new_single_source_expect_err( "break outside of sync", - "primitive f() { + "comp f() { outer: while (true) { //mark sync while(true) { break outer; } }