Skip to content

Commit

Permalink
fix some tests
Browse files Browse the repository at this point in the history
  • Loading branch information
housengw committed Jan 24, 2022
1 parent 16437f8 commit 7269930
Showing 1 changed file with 15 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -674,15 +674,15 @@ public void detectCausalityLoop() throws Exception {
"target C;",
"",
"reactor X {",
" input x:int",
" input x:int;",
" output y:int;",
" reaction(x) -> y {=",
" =}",
"}",
"",
"main reactor {",
" a = new X()",
" a = new X()",
" b = new X()",
" a.y -> b.x",
" b.y -> a.x",
"}"
Expand Down Expand Up @@ -880,7 +880,7 @@ public void nonZeroTimeValueWithoutUnits() throws Exception {
// main reactor {
// timer t(42, 1 sec);
// reaction(t) {=
// printf("Hello World.\n");
// printf("Hello World.\\n");
// =}
// }
// """
Expand All @@ -890,7 +890,7 @@ public void nonZeroTimeValueWithoutUnits() throws Exception {
"main reactor {",
" timer t(42, 1 sec);",
" reaction(t) {=",
" printf(\"Hello World.\n\");",
" printf(\"Hello World.\\n\");",
" =}",
"}");
validator.assertError(parseWithoutError(testCase), LfPackage.eINSTANCE.getValue(), null, "Missing time unit.");
Expand All @@ -907,7 +907,7 @@ public void parameterTypeMismatch() throws Exception {
// main reactor (p:int(0)) {
// timer t(p, 1 sec);
// reaction(t) {=
// printf("Hello World.\n");
// printf("Hello World.\\n");
// =}
// }
// """
Expand All @@ -917,7 +917,7 @@ public void parameterTypeMismatch() throws Exception {
"main reactor (p:int(0)) {",
" timer t(p, 1 sec);",
" reaction(t) {=",
" printf(\"Hello World.\n\");",
" printf(\"Hello World.\\n\");",
" =}",
"}");
validator.assertError(parseWithoutError(testCase), LfPackage.eINSTANCE.getValue(),
Expand All @@ -935,7 +935,7 @@ public void targetCodeInTimeArgument() throws Exception {
// main reactor {
// timer t({=foo()=}, 1 sec);
// reaction(t) {=
// printf("Hello World.\n");
// printf("Hello World.\\n");
// =}
// }
// """
Expand All @@ -945,7 +945,7 @@ public void targetCodeInTimeArgument() throws Exception {
"main reactor {",
" timer t({=foo()=}, 1 sec);",
" reaction(t) {=",
" printf(\"Hello World.\n\");",
" printf(\"Hello World.\\n\");",
" =}",
"}");
validator.assertError(parseWithoutError(testCase), LfPackage.eINSTANCE.getValue(),
Expand All @@ -964,7 +964,7 @@ public void overflowingDeadlineC() throws Exception {
// main reactor {
// timer t;
// reaction(t) {=
// printf("Hello World.\n");
// printf("Hello World.\\n");
// =} deadline (40 hours) {=
// =}
// }
Expand All @@ -975,7 +975,7 @@ public void overflowingDeadlineC() throws Exception {
"main reactor {",
"timer t;",
" reaction(t) {=",
" printf(\"Hello World.\n\");",
" printf(\"Hello World.\\n\");",
" =} deadline (40 hours) {=",
" =}",
"}");
Expand All @@ -996,8 +996,7 @@ public void overflowingParameterC() throws Exception {
// main reactor(d:time(40 hours)) {
// timer t;
// reaction(t) {=
// printf("Hello World.
// ");
// printf("Hello World.\\n");
// =} deadline (d) {=
// =}
// }
Expand All @@ -1008,8 +1007,7 @@ public void overflowingParameterC() throws Exception {
"main reactor(d:time(40 hours)) {",
"timer t;",
" reaction(t) {=",
" printf(\"Hello World.",
"\");",
" printf(\"Hello World.\\n\");",
" =} deadline (d) {=",
" =}",
"}");
Expand All @@ -1030,7 +1028,7 @@ public void overflowingAssignmentC() throws Exception {
// reactor Print(d:time(39 hours)) {
// timer t;
// reaction(t) {=
// printf("Hello World.\n");
// printf("Hello World.\\n");
// =} deadline (d) {=
// =}
// }
Expand All @@ -1044,7 +1042,7 @@ public void overflowingAssignmentC() throws Exception {
"reactor Print(d:time(39 hours)) {",
" timer t;",
" reaction(t) {=",
" printf(\"Hello World.\n\");",
" printf(\"Hello World.\\n\");",
" =} deadline (d) {=",
" =}",
"}",
Expand Down Expand Up @@ -1333,7 +1331,7 @@ public void recognizeIPV6() throws Exception {
String.join(System.getProperty("line.separator"),
"target C;",
"reactor Y {}",
String.format("federated reactor X at [foo@%s]:4242 {", addr),
String.format("federated reactor at [foo@%s]:4242 {", addr),
String.format(" y = new Y() at [%s]:2424; ", addr),
"}")
);
Expand Down

0 comments on commit 7269930

Please sign in to comment.