dart-sdk/tests/standalone/no_assert_test.dart
Rico Wind 2e22f41612 This is a fixed up version of:
https://codereview.chromium.org/1305183010/

- Reorder the priority of flags in the test harness when passed to the VM:
  default flags, file flags, command line flags
- Ensure to not enable assertions when not being requested.

Peter, any reason to not move the flags in to the
configuration file?  Why don't we actually have all of them in there? (not
that I want to move them, I am just currious why we don't add them in
there, it seems more logical to me)

BUG=
R=iposva@google.com, whesse@google.com

Committed: dd7767d95e

Review URL: https://codereview.chromium.org//1330643003 .
2015-09-14 07:58:18 +02:00

16 lines
478 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.
// VMOptions=--no-enable_asserts --enable_type_checks
// Ensure that enabling of type checks does not automatically enable asserts.
main() {
assert(false);
try {
int i = "String";
throw "FAIL";
} on TypeError catch (e) {
print("PASS");
}
}