// TODO(b/32608089): jsunit_test does not report number of tests correctly
private void assertTestSummary() {
    int fails = testResult.fails().size();
    int errors = testResult.errors().size();
    int succeeds = testResult.succeeds().size();
    int testCount = fails + errors + succeeds;
    if (testMode.isJ2cl()) {
      // Like Junit4, J2CL always counts errors as failures
      fails += errors;
      errors = 0;
      // TODO(b/32608089): jsunit_test does not report number of tests correctly
      testCount = 1;
      // Since total number of tests cannot be asserted; ensure nummber of succeeds is correct.
      assertThat(consoleLogs.stream().filter(x -> x.contains(": PASSED"))).hasSize(succeeds);
    }
    if (fails + errors > 0) {
      assertTestSummaryForFailure(fails, errors, testCount);
    } else {
      assertTestSummaryForSuccess(testCount);
    }
  }
fails += errors;
errors = 0;
// TODO(b/32608089): jsunit_test does not report number of tests correctly
testCount = 1;
// Since total number of tests cannot be asserted; ensure nummber of succeeds is correct.
private void assertTestSummary() {
int fails = testResult.fails().size();
int errors = testResult.errors().size();
int succeeds = testResult.succeeds().size();
int testCount = fails + errors + succeeds;
if (testMode.isJ2cl()) {
// Like Junit4, J2CL always counts errors as failures
fails += errors;
errors = 0;
// TODO(b/32608089): jsunit_test does not report number of tests correctly
testCount = 1;
// Since total number of tests cannot be asserted; ensure nummber of succeeds is correct.
assertThat(consoleLogs.stream().filter(x -> x.contains(": PASSED"))).hasSize(succeeds);
}
if (fails + errors > 0) {
assertTestSummaryForFailure(fails, errors, testCount);
} else {
assertTestSummaryForSuccess(testCount);
}
}
private void assertTestSummary() {
int fails = testResult.fails().size();
int errors = testResult.errors().size();
int succeeds = testResult.succeeds().size();
int testCount = fails + errors + succeeds;
if (testMode.isJ2cl()) {
// Like Junit4, J2CL always counts errors as failures
fails += errors;
errors = 0;
// TODO(b/32608089): jsunit_test does not report number of tests correctly
testCount = 1;
// Since total number of tests cannot be asserted; ensure nummber of succeeds is correct.
assertThat(consoleLogs.stream().filter(x -> x.contains(": PASSED"))).hasSize(succeeds);
}
if (fails + errors > 0) {
assertTestSummaryForFailure(fails, errors, testCount);
} else {
assertTestSummaryForSuccess(testCount);
}
}