Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

17
LINES

< > BotCompany Repo | #1020469 // TestResults

JavaX fragment (include)

1  
sclass TestResults extends TestResult {
2  
  new L<TestResult> results;
3  
  double scoreSum;
4  
  
5  
  void add(TestResult r) {
6  
    scoreSum += r.okPercentage;
7  
    results.add(r);
8  
    okPercentage = doubleRatio(scoreSum, l(results));
9  
  }
10  
  
11  
  toString {
12  
    S s = super.toString() + " (" + n2(results, "test") + ")";
13  
    TestResult worst = lowestByField(results, 'okPercentage);
14  
    if (worst != null) s += "\n  Worst result: " + worst;
15  
    ret s;
16  
  }
17  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1020469
Snippet name: TestResults
Eternal ID of this version: #1020469/7
Text MD5: ea9e8a4d2bc900f0b5bc5ca513c0950c
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:50:35
Source code size: 459 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 353 / 851
Version history: 6 change(s)
Referenced in: [show references]