-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
area-testCross-cutting test issues (use area- labels for specific failures; not used for package:test).Cross-cutting test issues (use area- labels for specific failures; not used for package:test).area-web-jsIssues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.Issues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.
Milestone
Description
The following expectations in this test need to be rewritten. Currently we are losing coverage on the expectations because of the web number semantics. They should probably be rewritten without the loop and possibly in separate tests for VM and web platforms because the number semantics differ.
sdk/tests/corelib/unsigned_shift_test.dart
Lines 55 to 64 in 5eceb35
void testNonIntegerShifts() { | |
double n = 0.0; | |
n >>> 1; //# 01: compile-time error | |
for (dynamic number in [0.0, 1.0, 2.4, -2.4, double.infinity, double.nan]) { | |
if (number is! int) { | |
Expect.throws(() => number >>> 1); //# 07: ok | |
Expect.throws(() => 1 >>> number); //# 08: ok | |
} | |
} | |
} |
On the web
value | value is! int |
---|---|
0.0 | false |
1.0 | false |
2.4 | true |
-2.4 | true |
double.infinity | false |
double.nan | true |
Metadata
Metadata
Assignees
Labels
area-testCross-cutting test issues (use area- labels for specific failures; not used for package:test).Cross-cutting test issues (use area- labels for specific failures; not used for package:test).area-web-jsIssues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.Issues related to JavaScript support for Dart Web, including DDC, dart2js, and JS interop.