mirror of
https://github.com/dart-lang/sdk
synced 2024-09-21 01:13:31 +00:00
062cd60ee2
Change-Id: Ie2bdcec491603f231a762ad211ba1d087a4c5c94 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150000 Auto-Submit: Bob Nystrom <rnystrom@google.com> Reviewed-by: Nicholas Shahan <nshahan@google.com> Commit-Queue: Bob Nystrom <rnystrom@google.com>
41 lines
856 B
Dart
41 lines
856 B
Dart
// TODO(multitest): This was automatically migrated from a multitest and may
|
|
// contain strange or dead code.
|
|
|
|
// Copyright (c) 2018, 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';
|
|
|
|
const String realMaxInt64Value = '9223372036854775807';
|
|
const String realMinInt64Value = '-9223372036854775808';
|
|
|
|
const int i21 = 2097152;
|
|
|
|
main() {
|
|
int minInt64Value = -1 * i21 * i21 * i21;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Expect.equals('$minInt64Value', realMinInt64Value);
|
|
Expect.equals('${minInt64Value - 1}', realMaxInt64Value);
|
|
|
|
int maxInt64Value = 1 * i21 * i21 * i21 - 1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Expect.equals('$maxInt64Value', realMaxInt64Value);
|
|
Expect.equals('${maxInt64Value + 1}', realMinInt64Value);
|
|
}
|