Libraryless. Click here for Pure Java version (2582L/16K).
1 | svoid test_AllOnAll() { |
2 | for (bool variation : falseTrue()) { |
3 | new AllOnAll<S, Int> aoa; |
4 | aoa.newA("one"); |
5 | assertNullVerbose(aoa.next()); |
6 | aoa.newB(1); |
7 | assertEqualsVerbose(pair("one", 1), aoa.next()); |
8 | assertNullVerbose(aoa.next()); |
9 | aoa.newB(2); |
10 | if (!variation) aoa.newA("two"); |
11 | assertEqualsVerbose(pair("one", 2), aoa.next()); |
12 | if (variation) { |
13 | assertNullVerbose(aoa.next()); |
14 | aoa.newA("two"); |
15 | } |
16 | assertEqualsVerbose(pair("two", 1), aoa.next()); |
17 | assertEqualsVerbose(pair("two", 2), aoa.next()); |
18 | assertNullVerbose(aoa.next()); |
19 | } |
20 | |
21 | new AllOnAll<S, Int> aoa; |
22 | aoa.newA("one"); |
23 | aoa.newB(1); |
24 | aoa.newA("two"); |
25 | aoa.newB(2); |
26 | assertEqualsVerbose(pair("one", 1), aoa.next()); |
27 | assertEqualsVerbose(pair("two", 1), aoa.next()); |
28 | assertEqualsVerbose(pair("one", 2), aoa.next()); |
29 | assertEqualsVerbose(pair("two", 2), aoa.next()); |
30 | assertNullVerbose(aoa.next()); |
31 | } |
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1023898 |
Snippet name: | test_AllOnAll |
Eternal ID of this version: | #1023898/5 |
Text MD5: | 9169d0f8335c6780aecea524905e7ec5 |
Transpilation MD5: | 8cacdd31a2ee33922ca1ef4e43c3a6db |
Author: | stefan |
Category: | jaax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-07-11 23:01:32 |
Source code size: | 960 bytes / 31 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 218 / 297 |
Version history: | 4 change(s) |
Referenced in: | [show references] |