OLD | NEW |
1 // Copyright 2013 Google Inc. All Rights Reserved. | 1 // Copyright 2013 Google Inc. All Rights Reserved. |
2 // | 2 // |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
6 // | 6 // |
7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
8 // | 8 // |
9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 test('containsAll', () { | 56 test('containsAll', () { |
57 expect(delegatingSet.containsAll(['a', 'cc']), isTrue); | 57 expect(delegatingSet.containsAll(['a', 'cc']), isTrue); |
58 expect(delegatingSet.containsAll(['a', 'c']), isFalse); | 58 expect(delegatingSet.containsAll(['a', 'c']), isFalse); |
59 }); | 59 }); |
60 | 60 |
61 test('difference', () { | 61 test('difference', () { |
62 expect(delegatingSet.difference(new Set<String>.from(['a', 'cc'])), | 62 expect(delegatingSet.difference(new Set<String>.from(['a', 'cc'])), |
63 equals(['b'])); | 63 equals(['b'])); |
64 expect(delegatingSet.difference(new Set<String>.from(['cc'])), | 64 expect(delegatingSet.difference(new Set<String>.from(['cc'])), |
65 equals(['a', 'b'])); | 65 equals(['a', 'b'])); |
66 }, skip: "Test failing: Caught type 'LinkedHashSet<String>' is not a subtype
of type 'HashSet<String>' of 'result'."); | 66 }); |
67 | 67 |
68 test('intersection', () { | 68 test('intersection', () { |
69 expect(delegatingSet.intersection(new Set<String>.from(['a', 'dd'])), | 69 expect(delegatingSet.intersection(new Set<String>.from(['a', 'dd'])), |
70 equals(['a'])); | 70 equals(['a'])); |
71 expect( | 71 expect( |
72 delegatingSet.intersection(new Set<String>.from(['e'])), equals([])); | 72 delegatingSet.intersection(new Set<String>.from(['e'])), equals([])); |
73 }); | 73 }); |
74 | 74 |
75 test('remove', () { | 75 test('remove', () { |
76 expect(delegatingSet.remove('b'), isTrue); | 76 expect(delegatingSet.remove('b'), isTrue); |
(...skipping 20 matching lines...) Expand all Loading... |
97 expect(delegatingSet, equals(['a', 'b'])); | 97 expect(delegatingSet, equals(['a', 'b'])); |
98 }); | 98 }); |
99 | 99 |
100 test('union', () { | 100 test('union', () { |
101 expect( | 101 expect( |
102 delegatingSet.union(new LinkedHashSet<String>.from(['a', 'cc', 'd'])), | 102 delegatingSet.union(new LinkedHashSet<String>.from(['a', 'cc', 'd'])), |
103 equals(['a', 'b', 'cc', 'd'])); | 103 equals(['a', 'b', 'cc', 'd'])); |
104 }); | 104 }); |
105 }); | 105 }); |
106 } | 106 } |
OLD | NEW |