Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Matrix: Add test case for non-square matrix #1576

Merged
merged 2 commits into from
Aug 31, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions exercises/matrix/canonical-data.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"exercise": "matrix",
"version": "1.1.0",
"version": "1.2.0",
"cases": [
{
"description": "extract row from one number matrix",
Expand Down Expand Up @@ -30,13 +30,13 @@
"expected": [10, 20]
},
{
"description": "can extract row from non-square matrix",
"description": "can extract row from non-square matrix with no corresponding column",
"property": "row",
"input": {
"string": "1 2 3\n4 5 6\n7 8 9\n8 7 6",
"index": 3
"index": 4
},
"expected": [7, 8, 9]
"expected": [8, 7, 6]
},
{
"description": "extract column from one number matrix",
Expand All @@ -57,13 +57,13 @@
"expected": [3, 6, 9]
},
{
"description": "can extract column from non-square matrix",
"description": "can extract column from non-square matrix with no corresponding row",
"property": "column",
"input": {
"string": "1 2 3\n4 5 6\n7 8 9\n8 7 6",
"index": 3
"string": "1 2 3 4\n 5 6 7 8\n 9 8 7 6",
"index": 4
},
"expected": [3, 6, 9, 6]
"expected": [4, 8, 6]
},
{
"description": "extract column where numbers have different widths",
Expand Down