diff options
Diffstat (limited to 'tests/i')
| -rw-r--r-- | tests/i/input-targets/input.txt | 4 | ||||
| -rw-r--r-- | tests/i/input-targets/notes.md | 4 | ||||
| -rw-r--r-- | tests/i/stdin/input.txt | 2 | ||||
| -rw-r--r-- | tests/i/stdin/notes.md | 2 |
4 files changed, 7 insertions, 5 deletions
diff --git a/tests/i/input-targets/input.txt b/tests/i/input-targets/input.txt index dc0af77..8d0376e 100644 --- a/tests/i/input-targets/input.txt +++ b/tests/i/input-targets/input.txt @@ -1,2 +1,4 @@ 10 20 30 -40 50 Ada 1 A 2.5 -7 60 70 80 90 100 +40 50 +Ada +TRUE A 2.5 -7 60 70 80 90 100 diff --git a/tests/i/input-targets/notes.md b/tests/i/input-targets/notes.md index dded40c..57c7db4 100644 --- a/tests/i/input-targets/notes.md +++ b/tests/i/input-targets/notes.md @@ -2,6 +2,6 @@ Human review: pending. Expected output was independently traced by AI, not captured from cpsc. -Basis: CIE guide p. 15 section 5.1 allows individual data-structure elements. Native C input, numeric BOOLEAN input, whitespace-delimited STRING input and exceptions follow project behavior. +Basis: CIE guide p. 15 section 5.1 allows individual data-structure elements. Native C input, token-based scalar input, rest-of-line STRING input and exceptions follow project behavior. -Trace: the loop stores 10, 20, 30; the grid receives 40. Student 2 receives 50, Ada, true, A, 2.5 and -7, then its score becomes 80 through P. The class fields receive 60 and 70. NextIndex prints once and selects Scores[1], which receives 90. Bounds and null-pointer failures occur before reading input, leaving 100 for the final valid input. +Trace: the loop stores 10, 20, 30; the grid receives 40. Student 2 receives 50, the line Ada, true, A, 2.5 and -7, then its score becomes 80 through P. The class fields receive 60 and 70. NextIndex prints once and selects Scores[1], which receives 90. Bounds and null-pointer failures occur before reading input, leaving 100 for the final valid input. diff --git a/tests/i/stdin/input.txt b/tests/i/stdin/input.txt index 604b657..4ac051f 100644 --- a/tests/i/stdin/input.txt +++ b/tests/i/stdin/input.txt @@ -1,4 +1,4 @@ -7 -1 +TRUE Z hello diff --git a/tests/i/stdin/notes.md b/tests/i/stdin/notes.md index 62f8727..63f1a22 100644 --- a/tests/i/stdin/notes.md +++ b/tests/i/stdin/notes.md @@ -2,4 +2,4 @@ Human review: pending. Expected output was independently traced by AI, not captured from cpsc. -Basis and trace: CIE p. 15; the project INPUT contract reads BOOLEAN as an integer (nonzero is true) and STRING as a whitespace-delimited token. +Basis and trace: CIE p. 15; the project INPUT contract reads BOOLEAN as TRUE or FALSE in any case, other scalars as whitespace-delimited tokens, and STRING as the rest of the line. |
