Libraryless. Click here for Pure Java version (968L/7K/24K).
1 | !752 |
2 | |
3 | p {
|
4 | test("{[(a)]}", true); // ok
|
5 | test("[(a)"); // not closed
|
6 | test("a)"); // not opened
|
7 | test("(a)}"); // not opened
|
8 | test("(a]"); // mismatch
|
9 | print("\nALL TESTS OK");
|
10 | } |
11 | |
12 | static void test(S s) {
|
13 | test(s, false); |
14 | } |
15 | |
16 | static void test(S s, bool ok) {
|
17 | new Var<S> msg; |
18 | assertEquals(s, ok, testBracketHygiene(s, msg)); |
19 | print(msg.get()); |
20 | print("ok");
|
21 | } |
Began life as a copy of #1003920
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1003923 |
| Snippet name: | Test testBracketHygiene |
| Eternal ID of this version: | #1003923/1 |
| Text MD5: | d01d7ffad74ebc178d5bc6f018953215 |
| Transpilation MD5: | 83deb8bd0cddc016975d7506df4b2b29 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX source code |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2016-07-30 18:36:34 |
| Source code size: | 389 bytes / 21 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 841 / 968 |
| Referenced in: | [show references] |