mirror of
https://github.com/dart-lang/sdk
synced 2024-10-03 13:22:01 +00:00
06115b867c
Add regression test. R=iposva@google.com Review URL: https://codereview.chromium.org//991373003 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44388 260f80e4-7a28-3924-810f-c04153c831b5
26 lines
587 B
Dart
26 lines
587 B
Dart
// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
import 'package:expect/expect.dart';
|
|
|
|
bool assertsChecked() {
|
|
bool checked = false;
|
|
try {
|
|
assert(false);
|
|
} on AssertionError catch (error) {
|
|
checked = true;
|
|
}
|
|
return checked;
|
|
}
|
|
|
|
main() async {
|
|
bool fault = false;
|
|
try {
|
|
assert(await false);
|
|
} on AssertionError catch (error) {
|
|
fault = true;
|
|
}
|
|
Expect.equals(assertsChecked(), fault);
|
|
}
|