diff --git a/progs/incorrect/set_hierarchical.sched b/progs/incorrect/set_hierarchical.sched new file mode 100644 index 0000000..4a72008 --- /dev/null +++ b/progs/incorrect/set_hierarchical.sched @@ -0,0 +1,5 @@ +classes A, B; + +combined = rr[union[A, B]]; + +return combined \ No newline at end of file diff --git a/progs/incorrect/set_multiple.sched b/progs/incorrect/set_multiple.sched new file mode 100644 index 0000000..b1a083b --- /dev/null +++ b/progs/incorrect/set_multiple.sched @@ -0,0 +1,5 @@ +classes A, B; + +combined = fifo[A, B]; + +return combined \ No newline at end of file diff --git a/rio/tests/parsing.ml b/rio/tests/parsing.ml index 9616c28..545e54b 100644 --- a/rio/tests/parsing.ml +++ b/rio/tests/parsing.ml @@ -71,6 +71,12 @@ let error_tests = "progs/incorrect/duplicate_classes.sched" (Policy.DuplicateClass "B"); make_error_test "class used twice in one fifo" "progs/incorrect/duplicate_samepol.sched" (Policy.DuplicateClass "A"); + make_error_test "fifo for multiple classes without union" + "progs/incorrect/set_multiple.sched" + (Parser.ParserError "Syntax error at line 3, character 17"); + make_error_test "rr for classes without fifo'ing first" + "progs/incorrect/set_hierarchical.sched" + (Parser.ParserError "Syntax error at line 3, character 14"); ] let suite = "parsing tests" >::: wc_tests @ error_tests (* @ nwc_tests *)