Libraryless. Click here for Pure Java version (9882L/55K).
1 | svoid test_StructureStringIndenter() {
|
2 | S expected = unindentMLS([[ |
3 | X( |
4 | i=[C(name="something short")], |
5 | j=array{
|
6 | "something longer than 40 chars?", |
7 | e, |
8 | f, |
9 | g, |
10 | 123 |
11 | }, |
12 | o=u |
13 | ) |
14 | ]]; |
15 | var indenter = new StructureStringIndenter().verbose(true); |
16 | |
17 | S s = [[X(i=[C(name="something short")], j=array{"something longer than 40 chars?", e, f, g, 123}, o=u)]];
|
18 | assertEquals(rtrim(expected), rtrim(print(indenter.get(s)))); |
19 | |
20 | s = expected = [[intarray{1, 2}]];
|
21 | assertEquals(rtrim(expected), rtrim(print(indenter.get(s)))); |
22 | } |
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj, wnsclhtenguj
No comments. add comment
| Snippet ID: | #1035338 |
| Snippet name: | test_StructureStringIndenter (OK) |
| Eternal ID of this version: | #1035338/11 |
| Text MD5: | cd563b283274317928d9e7ba2bfbb2b8 |
| Transpilation MD5: | 22ab59fc9df77efa0d006b589558c70c |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2022-08-21 06:14:15 |
| Source code size: | 611 bytes / 22 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 375 / 522 |
| Version history: | 10 change(s) |
| Referenced in: | [show references] |