Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unittest reports wrong result if group setup fails #2933

Closed
jmesserly opened this issue May 7, 2012 · 4 comments
Closed

unittest reports wrong result if group setup fails #2933

jmesserly opened this issue May 7, 2012 · 4 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. P1 A high priority bug; for example, a single project is unusable or has many test failures

Comments

@jmesserly
Copy link

unittest will happily report "PASS" even if the group setup failed. I know this happens in the html configuration (see example below), not sure if it happens in other configurations.

I expect a failure, but this is the result. Note that only 1/1 tests ran:


PASS
1 PASS Expectation: Color first.
All 1 tests passed


Here's the code:


library('bug_example');

import('../dart/dart/lib/unittest/html_config.dart');

import('../dart/dart/lib/unittest/unittest.dart');

main() {
  useHtmlConfiguration();
  group('Color', () {
    test('first', () {
      Expect.isTrue(true);
    });

    throw new Exception('foobar');

    test('second', () {
      Expect.isTrue(true);
    });
  });
}

@jmesserly
Copy link
Author

Removed the owner.

@jmesserly
Copy link
Author

btw, this still reproduces on current builds

@gramster
Copy link

gramster commented Sep 5, 2012

Set owner to @gramster.

@gramster
Copy link

Added Fixed label.

@jmesserly jmesserly added Type-Defect P1 A high priority bug; for example, a single project is unusable or has many test failures area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. labels Sep 12, 2012
dart-bot pushed a commit that referenced this issue Sep 13, 2021
New commits in this version:

git -C third_party/pkg/pub log --oneline cd7a43f2109f7e5eb22e73c7f4e15d25fd57598e..d95c5713dda518ed53ada70e00789e6aadbfbe48
d95c5713 (HEAD, origin/master, origin/HEAD) Remove duplicate global invocation on Windows (#3055)
4c5198df master->main (#3101)
e793fd52 More tool/test.dart tweaks (#3097)
1b228edd Report retracted packages (#3093)
4fedb6c5 Tweak strict dependencies error message for `_validateBenchmarkTestTool` (#3087)
e608ab6e Improve test script (#3091)
abf702c4 Detect potential leaks in `dart pub publish`. (#3049)
9941c1f9 Fix broken simplification of prerelease constraints (#3078)
f0cdfa27 format (#3086)
5a1242c6 Fix unicode terminal detection windows (#2933)
58e2296d Dart format (#3084)
1426601c use incremental compilation in the tool/test.dart script (#3075)
9954f851 Fix a typo (#3062)
44489b31 Use relative import for path.dart (#2959)
77702ab1 Always precompile scripts before running them (#3074)

Change-Id: I913ab9e3b5bc7181d483a2de96ec4ad917028b75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213262
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. P1 A high priority bug; for example, a single project is unusable or has many test failures
Projects
None yet
Development

No branches or pull requests

2 participants