Skip to content

Commit

Permalink
Added a couple more tests for table-from-row brownplt#1758
Browse files Browse the repository at this point in the history
- a (second) test that checks all values are raw-rows
- one that checks that the raw-rows contain only tuples
  • Loading branch information
ds26gte committed Sep 10, 2024
1 parent 2813a30 commit 83a2c13
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/pyret/tests/test-tables.arr
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,17 @@ check "table-from-rows":
[raw-row: {"A"; 5}, {"B"; 7}, {"C"; 8}],
[raw-row: {"A"; 1}, {"B"; 2}, {"C"; 3}]]]
raises "is-raw-array-of-rows"

[table-from-rows:
1, [raw-row: {"A"; 1}, {"B"; 2}],
false, [raw-row: {"A"; 3}, {"B"; 4}],
"non-row string", [raw-row: {"A"; 5}, {"B"; 6}]]
raises "is-raw-array-of-rows"

[table-from-rows:
[raw-row: 5, {"B"; 7}, {"C"; 8}],
[raw-row: {"A"; 1}, {"B"; 2}, {"C"; 3}]]
raises "KeyValPair"
end

table-from-column = TS.table-from-column
Expand Down

0 comments on commit 83a2c13

Please sign in to comment.