Libraryless. Click here for Pure Java version (2963L/19K).
1 | svoid test_indentedStringsToForest() { |
2 | L<Tree<S>> forest = print(indentedStringsToForest(ll(" bla", " hello", " blu"))); |
3 | assertEqualsVerbose(2, l(forest)); |
4 | Tree<S> tree = forest.get(0); |
5 | assertEqualsVerbose("bla", tree!); |
6 | assertEqualsVerbose(1, l(tree.children)); |
7 | tree = tree.children.get(0); |
8 | assertEqualsVerbose("hello", tree!); |
9 | assertEqualsVerbose(0, l(tree.children)); |
10 | tree = forest.get(1); |
11 | assertEqualsVerbose("blu", tree!); |
12 | assertEqualsVerbose(0, l(tree.children)); |
13 | } |
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: | 205 / 278 |
Version history: | 5 change(s) |
Referenced in: | [show references] |