0a2141b134
Change-Id: I6911a4b6e9d253c94257ccfed3d5d7451e812521 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332491 Commit-Queue: Stephen Adams <sra@google.com> Reviewed-by: Mark Zhou <markzipan@google.com>
16 lines
483 B
Dart
16 lines
483 B
Dart
// 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() {
|
|
for (int i = 0; i < 80; i++) {
|
|
var a = -1 << i;
|
|
// web shifts produce a 32-bit unsigned result. Make it signed.
|
|
if (webNumbers) a = a.toSigned(32);
|
|
var b = -1;
|
|
Expect.equals(1 << i, a ~/ b);
|
|
}
|
|
}
|