1
1
{
2
2
"exercise" : " bracket-push" ,
3
- "version" : " 1.1 .0" ,
3
+ "version" : " 1.2 .0" ,
4
4
"cases" : [
5
5
{
6
6
"description" : " paired square brackets" ,
7
7
"property" : " isPaired" ,
8
- "input" : " []" ,
8
+ "input" : {
9
+ "value" : " []"
10
+ },
9
11
"expected" : true
10
12
},
11
13
{
12
14
"description" : " empty string" ,
13
15
"property" : " isPaired" ,
14
- "input" : " " ,
16
+ "input" : {
17
+ "value" : " "
18
+ },
15
19
"expected" : true
16
20
},
17
21
{
18
22
"description" : " unpaired brackets" ,
19
23
"property" : " isPaired" ,
20
- "input" : " [[" ,
24
+ "input" : {
25
+ "value" : " [["
26
+ },
21
27
"expected" : false
22
28
},
23
29
{
24
30
"description" : " wrong ordered brackets" ,
25
31
"property" : " isPaired" ,
26
- "input" : " }{" ,
32
+ "input" : {
33
+ "value" : " }{"
34
+ },
27
35
"expected" : false
28
36
},
29
37
{
30
38
"description" : " wrong closing bracket" ,
31
39
"property" : " isPaired" ,
32
- "input" : " {]" ,
40
+ "input" : {
41
+ "value" : " {]"
42
+ },
33
43
"expected" : false
34
44
},
35
45
{
36
46
"description" : " paired with whitespace" ,
37
47
"property" : " isPaired" ,
38
- "input" : " { }" ,
48
+ "input" : {
49
+ "value" : " { }"
50
+ },
39
51
"expected" : true
40
52
},
41
53
{
42
54
"description" : " simple nested brackets" ,
43
55
"property" : " isPaired" ,
44
- "input" : " {[]}" ,
56
+ "input" : {
57
+ "value" : " {[]}"
58
+ },
45
59
"expected" : true
46
60
},
47
61
{
48
62
"description" : " several paired brackets" ,
49
63
"property" : " isPaired" ,
50
- "input" : " {}[]" ,
64
+ "input" : {
65
+ "value" : " {}[]"
66
+ },
51
67
"expected" : true
52
68
},
53
69
{
54
70
"description" : " paired and nested brackets" ,
55
71
"property" : " isPaired" ,
56
- "input" : " ([{}({}[])])" ,
72
+ "input" : {
73
+ "value" : " ([{}({}[])])"
74
+ },
57
75
"expected" : true
58
76
},
59
77
{
60
78
"description" : " unopened closing brackets" ,
61
79
"property" : " isPaired" ,
62
- "input" : " {[)][]}" ,
80
+ "input" : {
81
+ "value" : " {[)][]}"
82
+ },
63
83
"expected" : false
64
84
},
65
85
{
66
86
"description" : " unpaired and nested brackets" ,
67
87
"property" : " isPaired" ,
68
- "input" : " ([{])" ,
88
+ "input" : {
89
+ "value" : " ([{])"
90
+ },
69
91
"expected" : false
70
92
},
71
93
{
72
94
"description" : " paired and wrong nested brackets" ,
73
95
"property" : " isPaired" ,
74
- "input" : " [({]})" ,
96
+ "input" : {
97
+ "value" : " [({]})"
98
+ },
75
99
"expected" : false
76
100
},
77
101
{
78
102
"description" : " math expression" ,
79
103
"property" : " isPaired" ,
80
- "input" : " (((185 + 223.85) * 15) - 543)/2" ,
104
+ "input" : {
105
+ "value" : " (((185 + 223.85) * 15) - 543)/2"
106
+ },
81
107
"expected" : true
82
108
},
83
109
{
84
110
"description" : " complex latex expression" ,
85
111
"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
+ },
87
115
"expected" : true
88
116
}
89
117
]
90
- }
118
+ }
0 commit comments