Skip to content

Commit f3b5fe9

Browse files
committed
test: update fixtures
1 parent ac62499 commit f3b5fe9

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

internal/test_helpers/fixtures/pass_control_flow

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ Debug = true
33
[stage-9] Running tests for Stage #9: ne3
44
[stage-9] [test-1] Running test case: 1
55
[stage-9] [test-1] Writing contents to ./test.lox:
6-
[stage-9] [test-1] [test.lox] // This program should print the string, if the if condition evaluates to True
6+
[stage-9] [test-1] [test.lox] // This should print the string if the condition evaluates to True
77
[stage-9] [test-1] [test.lox] if (false) print "foo";
88
[stage-9] [test-1] $ ./your_program.sh run test.lox
99
[stage-9] [test-1] ✓ 1 line(s) match on stdout
1010
[stage-9] [test-1] ✓ Received exit code 0.
1111
[stage-9] [test-2] Running test case: 2
1212
[stage-9] [test-2] Writing contents to ./test.lox:
13-
[stage-9] [test-2] [test.lox] // This program should execute the block body and print "block body", if the if condition evaluates to True
13+
[stage-9] [test-2] [test.lox] // This should print "block body" if the condition evaluates to True
1414
[stage-9] [test-2] [test.lox] if (false) {
1515
[stage-9] [test-2] [test.lox] print "block body";
1616
[stage-9] [test-2] [test.lox] }
@@ -19,7 +19,8 @@ Debug = true
1919
[stage-9] [test-2] ✓ Received exit code 0.
2020
[stage-9] [test-3] Running test case: 3
2121
[stage-9] [test-3] Writing contents to ./test.lox:
22-
[stage-9] [test-3] [test.lox] // This program relies on the fact that the assignment operation returns the value assigned,
22+
[stage-9] [test-3] [test.lox] // This program tests whether the assignment operation returns the value assigned.
23+
[stage-9] [test-3] [test.lox] // The if condition should evaluate to true and the inner boolean expression must be printed.
2324
[stage-9] [test-3] [test.lox] // So, in this case the if condition evaluates to true and prints the inner boolean expression
2425
[stage-9] [test-3] [test.lox] var a = false;
2526
[stage-9] [test-3] [test.lox] if (a = true) {
@@ -31,7 +32,7 @@ Debug = true
3132
[stage-9] [test-3] ✓ Received exit code 0.
3233
[stage-9] [test-4] Running test case: 4
3334
[stage-9] [test-4] Writing contents to ./test.lox:
34-
[stage-9] [test-4] [test.lox] // This program initializes age with random integer and then prints the stage of life based on the age
35+
[stage-9] [test-4] [test.lox] // This program should print a different string based on the value of age
3536
[stage-9] [test-4] [test.lox] var stage = "unknown";
3637
[stage-9] [test-4] [test.lox] var age = 73;
3738
[stage-9] [test-4] [test.lox] if (age < 18) { stage = "child"; }

internal/test_helpers/fixtures/pass_control_flow_final

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ Debug = true
33
[stage-9] Running tests for Stage #9: ne3
44
[stage-9] [test-1] Running test case: 1
55
[stage-9] [test-1] Writing contents to ./test.lox:
6-
[stage-9] [test-1] [test.lox] // This program should print the string, if the if condition evaluates to True
6+
[stage-9] [test-1] [test.lox] // This should print the string if the condition evaluates to True
77
[stage-9] [test-1] [test.lox] if (false) print "foo";
88
[stage-9] [test-1] $ ./your_program.sh run test.lox
99
[stage-9] [test-1] ✓ 1 line(s) match on stdout
1010
[stage-9] [test-1] ✓ Received exit code 0.
1111
[stage-9] [test-2] Running test case: 2
1212
[stage-9] [test-2] Writing contents to ./test.lox:
13-
[stage-9] [test-2] [test.lox] // This program should execute the block body and print "block body", if the if condition evaluates to True
13+
[stage-9] [test-2] [test.lox] // This should print "block body" if the condition evaluates to True
1414
[stage-9] [test-2] [test.lox] if (false) {
1515
[stage-9] [test-2] [test.lox] print "block body";
1616
[stage-9] [test-2] [test.lox] }
@@ -19,7 +19,8 @@ Debug = true
1919
[stage-9] [test-2] ✓ Received exit code 0.
2020
[stage-9] [test-3] Running test case: 3
2121
[stage-9] [test-3] Writing contents to ./test.lox:
22-
[stage-9] [test-3] [test.lox] // This program relies on the fact that the assignment operation returns the value assigned,
22+
[stage-9] [test-3] [test.lox] // This program tests whether the assignment operation returns the value assigned.
23+
[stage-9] [test-3] [test.lox] // The if condition should evaluate to true and the inner boolean expression must be printed.
2324
[stage-9] [test-3] [test.lox] // So, in this case the if condition evaluates to true and prints the inner boolean expression
2425
[stage-9] [test-3] [test.lox] var a = false;
2526
[stage-9] [test-3] [test.lox] if (a = true) {
@@ -31,7 +32,7 @@ Debug = true
3132
[stage-9] [test-3] ✓ Received exit code 0.
3233
[stage-9] [test-4] Running test case: 4
3334
[stage-9] [test-4] Writing contents to ./test.lox:
34-
[stage-9] [test-4] [test.lox] // This program initializes age with random integer and then prints the stage of life based on the age
35+
[stage-9] [test-4] [test.lox] // This program should print a different string based on the value of age
3536
[stage-9] [test-4] [test.lox] var stage = "unknown";
3637
[stage-9] [test-4] [test.lox] var age = 73;
3738
[stage-9] [test-4] [test.lox] if (age < 18) { stage = "child"; }

0 commit comments

Comments
 (0)