1 | sclass TestResult { |
2 | double okPercentage; // 0 to 100 |
3 | S description; |
4 | PersistableThrowable e; |
5 | |
6 | *() {} |
7 | *(bool ok) { this(null, ok); } |
8 | *(S *description, double *okPercentage) {} |
9 | *(S *description, bool ok) { okPercentage = ok ? 100 : 0; } |
10 | *(S *description, Throwable e) { this.e = persistableThrowable(e); } |
11 | |
12 | bool ok() { ret okPercentage >= 100; } |
13 | |
14 | toString { |
15 | ret ifloor(okPercentage) + "%: " + or2(description, "Some test") + (e != null ? " [" + e + "]" : ""); |
16 | } |
17 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1008968 |
Snippet name: | class TestResult |
Eternal ID of this version: | #1008968/6 |
Text MD5: | 8abea920b7014b761630f0956c5269e1 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-12-23 19:13:37 |
Source code size: | 506 bytes / 17 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 558 / 1383 |
Version history: | 5 change(s) |
Referenced in: | [show references] |