Skip to content

Commit d024fed

Browse files
Merge pull request #1058 from ErikSchierboom/bracket-push-input
bracket-push: Apply new "input" policy
2 parents 70d4d64 + 5c16d05 commit d024fed

File tree

1 file changed

+44
-16
lines changed

1 file changed

+44
-16
lines changed
Lines changed: 44 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,118 @@
11
{
22
"exercise": "bracket-push",
3-
"version": "1.1.0",
3+
"version": "1.2.0",
44
"cases": [
55
{
66
"description": "paired square brackets",
77
"property": "isPaired",
8-
"input": "[]",
8+
"input": {
9+
"value": "[]"
10+
},
911
"expected": true
1012
},
1113
{
1214
"description": "empty string",
1315
"property": "isPaired",
14-
"input": "",
16+
"input": {
17+
"value": ""
18+
},
1519
"expected": true
1620
},
1721
{
1822
"description": "unpaired brackets",
1923
"property": "isPaired",
20-
"input": "[[",
24+
"input": {
25+
"value": "[["
26+
},
2127
"expected": false
2228
},
2329
{
2430
"description": "wrong ordered brackets",
2531
"property": "isPaired",
26-
"input": "}{",
32+
"input": {
33+
"value": "}{"
34+
},
2735
"expected": false
2836
},
2937
{
3038
"description": "wrong closing bracket",
3139
"property": "isPaired",
32-
"input": "{]",
40+
"input": {
41+
"value": "{]"
42+
},
3343
"expected": false
3444
},
3545
{
3646
"description": "paired with whitespace",
3747
"property": "isPaired",
38-
"input": "{ }",
48+
"input": {
49+
"value": "{ }"
50+
},
3951
"expected": true
4052
},
4153
{
4254
"description": "simple nested brackets",
4355
"property": "isPaired",
44-
"input": "{[]}",
56+
"input": {
57+
"value": "{[]}"
58+
},
4559
"expected": true
4660
},
4761
{
4862
"description": "several paired brackets",
4963
"property": "isPaired",
50-
"input": "{}[]",
64+
"input": {
65+
"value": "{}[]"
66+
},
5167
"expected": true
5268
},
5369
{
5470
"description": "paired and nested brackets",
5571
"property": "isPaired",
56-
"input": "([{}({}[])])",
72+
"input": {
73+
"value": "([{}({}[])])"
74+
},
5775
"expected": true
5876
},
5977
{
6078
"description": "unopened closing brackets",
6179
"property": "isPaired",
62-
"input": "{[)][]}",
80+
"input": {
81+
"value": "{[)][]}"
82+
},
6383
"expected": false
6484
},
6585
{
6686
"description": "unpaired and nested brackets",
6787
"property": "isPaired",
68-
"input": "([{])",
88+
"input": {
89+
"value": "([{])"
90+
},
6991
"expected": false
7092
},
7193
{
7294
"description": "paired and wrong nested brackets",
7395
"property": "isPaired",
74-
"input": "[({]})",
96+
"input": {
97+
"value": "[({]})"
98+
},
7599
"expected": false
76100
},
77101
{
78102
"description": "math expression",
79103
"property": "isPaired",
80-
"input": "(((185 + 223.85) * 15) - 543)/2",
104+
"input": {
105+
"value": "(((185 + 223.85) * 15) - 543)/2"
106+
},
81107
"expected": true
82108
},
83109
{
84110
"description": "complex latex expression",
85111
"property": "isPaired",
86-
"input": "\\left(\\begin{array}{cc} \\frac{1}{3} & x\\\\ \\mathrm{e}^{x} &... x^2 \\end{array}\\right)",
112+
"input": {
113+
"value": "\\left(\\begin{array}{cc} \\frac{1}{3} & x\\\\ \\mathrm{e}^{x} &... x^2 \\end{array}\\right)"
114+
},
87115
"expected": true
88116
}
89117
]
90-
}
118+
}

0 commit comments

Comments
 (0)