blob: 33387d9895cea9cfd3783f23ee339c6e12bc3464 [file] [log] [blame]
/*
* Copyright (c) 2011, 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.
*/
/**
* @assertion Returns true if the value represented by this int object is negative.
* @description Checks that this method returns correct value.
* @author vasya
* @reviewer msyabro
* @reviewer rodionov
*/
import "../../../Utils/expect.dart";
main() {
Expect.isFalse(0.isNegative);
for (var i = -100; i < 0; i++) {
Expect.isTrue(i.isNegative);
}
for (var i = 0; i <= 100; i++){
Expect.isFalse(i.isNegative);
}
Expect.isFalse(9223372036854775808.isNegative);
Expect.isTrue((-9223372036854775808).isNegative);
Expect.isFalse(21332142137489273849723146271467234672164712364701264072347213640214702647263407264.isNegative);
Expect.isTrue((-21332142137489273849723146271467234672164712364701264072347213640214702647263407264).isNegative);
}