Skip to content
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