sclass TestResult { double okPercentage; // 0 to 100 S description; PersistableThrowable e; *() {} *(bool ok) { this(null, ok); } *(S *description, double *okPercentage) {} *(S *description, bool ok) { okPercentage = ok ? 100 : 0; } *(S *description, Throwable e) { this.e = persistableThrowable(e); } bool ok() { ret okPercentage >= 100; } toString { ret ifloor(okPercentage) + "%: " + or2(description, "Some test") + (e != null ? " [" + e + "]" : ""); } }
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: | 556 / 1379 |
Version history: | 5 change(s) |
Referenced in: | [show references] |