Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(917)

Unified Diff: tests/corelib/hash_set_type_check_test.dart

Issue 969393002: Change test to detect checked mode. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add dartanalyzer suppression. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/corelib/corelib.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/corelib/hash_set_type_check_test.dart
diff --git a/tests/corelib/hash_set_type_check_test.dart b/tests/corelib/hash_set_type_check_test.dart
index 7c39d3416baa9c19a26ce47082538117511ce3e0..1e21c95087f13830c600c75a6500c0220c9fca5e 100644
--- a/tests/corelib/hash_set_type_check_test.dart
+++ b/tests/corelib/hash_set_type_check_test.dart
@@ -1,8 +1,6 @@
// 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=--enable_type_checks
// Tests of hash set type checking.
@@ -24,7 +22,20 @@ void testIdentitySet(Set create()) {
}
+bool get inCheckedMode {
+ try {
+ var i = 1;
+ String j = i;
+ } catch (_) {
+ return true;
+ }
+ return false;
+}
+
+
void main() {
+ if (!inCheckedMode) return;
+
testSet(() => new Set<String>());
testSet(() => new HashSet<String>());
testSet(() => new LinkedHashSet<String>());
« no previous file with comments | « tests/corelib/corelib.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698