Skip to content

Commit

Permalink
Allow different kind of errors when the bigint would be too large.
Browse files Browse the repository at this point in the history
Fixes #31661.

Bug: http://dartbug.com/31661
Change-Id: I3ea4ac51f84e50f63e8fdee1364637b91a6ef610
Reviewed-on: https://dart-review.googlesource.com/29800
Reviewed-by: Florian Loitsch <floitsch@google.com>
  • Loading branch information
floitschG committed Dec 15, 2017
1 parent 863609b commit 11eda99
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/corelib_2/bigint_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -629,8 +629,9 @@ testShiftAmount() {
var a = BigInt.one << 0x7FFFFFFFFFFFFFFF;
} on OutOfMemoryError catch (e) {
exceptionCaught = true;
} on ArgumentError catch (e) {
// In JavaScript the allocation of the internal array throws a range error.
} catch (e) {
// In JavaScript the allocation of the internal array throws different
// kind of errors. Just assume it's the right one.
exceptionCaught = true;
}
Expect.equals(true, exceptionCaught);
Expand Down

0 comments on commit 11eda99

Please sign in to comment.