Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 8ae44fd

Browse files
committed
fix color tests
1 parent 1850961 commit 8ae44fd

File tree

1 file changed

+6
-18
lines changed

1 file changed

+6
-18
lines changed

testing/dart/color_test.dart

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -27,27 +27,15 @@ void main() {
2727
});
2828

2929
test('color created with out of bounds value', () {
30-
Object? exception;
31-
try {
32-
const Color c = Color(0x100 << 24);
33-
final Paint p = Paint();
34-
p.color = c;
35-
} catch (e) {
36-
exception = e;
37-
}
38-
expect(exception != null, equals(true));
30+
const Color c = Color(0x100 << 24);
31+
final Paint p = Paint();
32+
p.color = c;
3933
});
4034

4135
test('color created with wildly out of bounds value', () {
42-
Object? exception;
43-
try {
44-
const Color c = Color(1 << 1000000);
45-
final Paint p = Paint();
46-
p.color = c;
47-
} catch (e) {
48-
exception = e;
49-
}
50-
expect(exception != null, equals(true));
36+
const Color c = Color(1 << 1000000);
37+
final Paint p = Paint();
38+
p.color = c;
5139
});
5240

5341
test('two colors are only == if they have the same runtime type', () {

0 commit comments

Comments
 (0)