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

Unified Diff: tests/corelib/iterable_to_set_test.dart

Issue 2996513002: Migrated test block 12 to Dart 2.0. (Closed)
Patch Set: Created 3 years, 4 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/iterable_to_list_test.dart ('k') | tests/corelib/iterable_tostring_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/corelib/iterable_to_set_test.dart
diff --git a/tests/corelib/iterable_to_set_test.dart b/tests/corelib/iterable_to_set_test.dart
deleted file mode 100644
index 628ddb89b1ee0cd0d070c58ba9474232f4be3438..0000000000000000000000000000000000000000
--- a/tests/corelib/iterable_to_set_test.dart
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (c) 2012, 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";
-
-main() {
- List<int> list1 = <int>[1, 2, 3];
- List<int> list2 = const <int>[4, 4];
- List<String> list3 = <String>[];
- Set<int> set1 = new Set<int>();
- set1..add(11)..add(12)..add(13);
- Set<String> set2 = new Set<String>();
- set2..add("foo")..add("bar")..add("toto");
- Set set3 = new Set();
-
- var setCopy = list1.toSet();
- Expect.equals(3, setCopy.length);
- Expect.isTrue(setCopy.contains(1));
- Expect.isTrue(setCopy.contains(2));
- Expect.isTrue(setCopy.contains(3));
- Expect.isTrue(setCopy is Set<int>);
- Expect.isFalse(setCopy is Set<String>);
-
- setCopy = list2.toSet();
- Expect.equals(1, setCopy.length);
- Expect.isTrue(setCopy.contains(4));
- Expect.isTrue(setCopy is Set<int>);
- Expect.isFalse(setCopy is Set<String>);
-
- setCopy = list3.toSet();
- Expect.isTrue(setCopy.isEmpty);
- Expect.isTrue(setCopy is Set<String>);
- Expect.isFalse(setCopy is Set<int>);
-
- setCopy = set1.toSet();
- Expect.setEquals(set1, setCopy);
- Expect.isTrue(setCopy is Set<int>);
- Expect.isFalse(setCopy is Set<String>);
- Expect.isFalse(identical(setCopy, set1));
-
- setCopy = set2.toSet();
- Expect.setEquals(set2, setCopy);
- Expect.isTrue(setCopy is Set<String>);
- Expect.isFalse(setCopy is Set<int>);
- Expect.isFalse(identical(setCopy, set2));
-
- setCopy = set3.toSet();
- Expect.setEquals(set3, setCopy);
- Expect.isTrue(setCopy is Set<String>);
- Expect.isTrue(setCopy is Set<int>);
- Expect.isFalse(identical(setCopy, set3));
-}
« no previous file with comments | « tests/corelib/iterable_to_list_test.dart ('k') | tests/corelib/iterable_tostring_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698