Skip to content

Commit

Permalink
Merge pull request #680 from rbasso/bracket-push-schema
Browse files Browse the repository at this point in the history
bracket-push: Make exercise schema-compliant
  • Loading branch information
rbasso authored Mar 10, 2017
2 parents 083daeb + 851240d commit c7967aa
Showing 1 changed file with 15 additions and 0 deletions.
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

0 comments on commit c7967aa

Please sign in to comment.