Skip to content

bracket-push: Make exercise schema-compliant #680

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

Merged
merged 1 commit into from
Mar 10, 2017
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
15 changes: 15 additions & 0 deletions exercises/bracket-push/canonical-data.json
Original file line number Diff line number Diff line change
@@ -1,67 +1,82 @@
{
"exercise": "bracket-push",
"version": "1.0.0",
"cases": [
{
"description": "paired square brackets",
"property": "isPaired",
"input": "[]",
"expected": true
},
{
"description": "empty string",
"property": "isPaired",
"input": "",
"expected": true
},
{
"description": "unpaired brackets",
"property": "isPaired",
"input": "[[",
"expected": false
},
{
"description": "wrong ordered brackets",
"property": "isPaired",
"input": "}{",
"expected": false
},
{
"description": "paired with whitespace",
"property": "isPaired",
"input": "{ }",
"expected": true
},
{
"description": "simple nested brackets",
"property": "isPaired",
"input": "{[]}",
"expected": true
},
{
"description": "several paired brackets",
"property": "isPaired",
"input": "{}[]",
"expected": true
},
{
"description": "paired and nested brackets",
"property": "isPaired",
"input": "([{}({}[])])",
"expected": true
},
{
"description": "unopened closing brackets",
"property": "isPaired",
"input": "{[)][]}",
"expected": false
},
{
"description": "unpaired and nested brackets",
"property": "isPaired",
"input": "([{])",
"expected": false
},
{
"description": "paired and wrong nested brackets",
"property": "isPaired",
"input": "[({]})",
"expected": false
},
{
"description": "math expression",
"property": "isPaired",
"input": "(((185 + 223.85) * 15) - 543)/2",
"expected": true
},
{
"description": "complex latex expression",
"property": "isPaired",
"input": "\\left(\\begin{array}{cc} \\frac{1}{3} & x\\\\ \\mathrm{e}^{x} &... x^2 \\end{array}\\right)",
"expected": true
}
Expand Down