Libraryless. Click here for Pure Java version (6898L/38K).
1 | srecord TestFunctionValues<A, B>(IF1<A, B> function) { |
2 | new LPair<A, B> pairs; |
3 | |
4 | selfType io(A input, B output) { |
5 | pairs.add(pair(input, output)); |
6 | this; |
7 | } |
8 | |
9 | void clear { pairs.clear(); } |
10 | |
11 | run { |
12 | for (p : pairs) |
13 | testFunctionValue(function, p.a, p.b); |
14 | |
15 | print(nTests(pairs) + " OK"); |
16 | } |
17 | |
18 | void runAndClear { |
19 | run(); |
20 | clear(); |
21 | } |
22 | } |
Began life as a copy of #1018444
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1034762 |
Snippet name: | TestFunctionValues |
Eternal ID of this version: | #1034762/5 |
Text MD5: | e947c7bfb007511e58d9eea591f24aa7 |
Transpilation MD5: | 966e65ad9ec30a8eb2bf4f6fd87f19a0 |
Author: | stefan |
Category: | javax / testing |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-03-08 07:54:25 |
Source code size: | 400 bytes / 22 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 159 / 259 |
Version history: | 4 change(s) |
Referenced in: | [show references] |