Libraryless. Click here for Pure Java version (2963L/19K).
svoid test_indentedStringsToForest() { L<Tree<S>> forest = print(indentedStringsToForest(ll(" bla", " hello", " blu"))); assertEqualsVerbose(2, l(forest)); Tree<S> tree = forest.get(0); assertEqualsVerbose("bla", tree!); assertEqualsVerbose(1, l(tree.children)); tree = tree.children.get(0); assertEqualsVerbose("hello", tree!); assertEqualsVerbose(0, l(tree.children)); tree = forest.get(1); assertEqualsVerbose("blu", tree!); assertEqualsVerbose(0, l(tree.children)); }
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1030349 |
| Snippet name: | test_indentedStringsToForest (OK) |
| Eternal ID of this version: | #1030349/6 |
| Text MD5: | 3da032a3abd8705c435993c8412af387 |
| Transpilation MD5: | 92a571d9429d52ca8be21643e53b2872 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2020-12-05 21:05:18 |
| Source code size: | 510 bytes / 13 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 400 / 519 |
| Version history: | 5 change(s) |
| Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |