Remove the Dart 1 tests.
This deletes: tests/co19 tests/corelib tests/html tests/isolate tests/language tests/lib It does not delete tests/standalone because apparently there are tests in there that are not in standalone_2. (I assume they were added after the test migration. I don't know why they were added there.) I have tried to remove references to the old tests from various scripts and tools but may have missed some. (As you can imagine, grepping for "lib" does not have the best signal-to-noise ratio.) "It was a pleasure to burn. It was a special pleasure to see things eaten, to see things blackened and changed. With the brass nozzle in his fists, with this great python spitting its venomous kerosene upon the world, the blood pounded in his head, and his hands were the hands of some amazing conductor playing all the symphonies of blazing and burning to bring down the tatters and charcoal ruins of history." - Ray Bradbury, Fahrenheit 451 Change-Id: If3db4a50e7a5ee25aff8058b1483e2ce8e68424e Reviewed-on: https://dart-review.googlesource.com/c/75420 Commit-Queue: Bob Nystrom <rnystrom@google.com> Auto-Submit: Bob Nystrom <rnystrom@google.com> Reviewed-by: William Hesse <whesse@google.com> Reviewed-by: Terry Lucas <terry@google.com> Reviewed-by: Sigmund Cherem <sigmund@google.com>
This commit is contained in:
committed by
commit-bot@chromium.org
parent
9f98f5f44c
commit
f6ca2c1d8f
+1
-19
@@ -18,36 +18,18 @@ tests/compiler/dart2js_extra/eof_line_ending_test.dart -text
|
||||
tests/compiler/dart2js_extra/string_interpolation_test.dart -text
|
||||
tests/compiler/dart2js_extra/string_interpolation_dynamic_test.dart -text
|
||||
tests/compiler/dart2js_extra/literal_string_juxtaposition_test.dart -text
|
||||
tests/language/raw_string_test.dart -text
|
||||
tests/language/multiline_strings_test.dart -text
|
||||
tests/language/multiline_newline_cr.dart -text
|
||||
tests/language/multiline_newline_crlf.dart -text
|
||||
tests/language/multiline_newline_lf.dart -text
|
||||
tests/language_2/raw_string_test.dart -text
|
||||
tests/language_2/multiline_strings_test.dart -text
|
||||
tests/language_2/multiline_newline_cr.dart -text
|
||||
tests/language_2/multiline_newline_crlf.dart -text
|
||||
tests/language_2/multiline_newline_lf.dart -text
|
||||
tests/lib/convert/json_pretty_test.dart -text
|
||||
tests/lib_2/convert/json_pretty_test.dart -text
|
||||
tests/lib/mirrors/method_mirror_source_line_ending_test.dart -text
|
||||
tests/lib/mirrors/method_mirror_source_line_ending_cr.dart -text
|
||||
tests/lib/mirrors/method_mirror_source_line_ending_crlf.dart -text
|
||||
tests/lib/mirrors/method_mirror_source_line_ending_lf.dart -text
|
||||
tests/lib/mirrors/method_mirror_source_test.dart -text
|
||||
tests/lib/mirrors/method_mirror_source_other.dart -text
|
||||
tests/lib_2/mirrors/method_mirror_source_line_ending_test.dart -text
|
||||
tests/lib_2/mirrors/method_mirror_source_line_ending_cr.dart -text
|
||||
tests/lib_2/mirrors/method_mirror_source_line_ending_crlf.dart -text
|
||||
tests/lib_2/mirrors/method_mirror_source_line_ending_lf.dart -text
|
||||
tests/lib_2/mirrors/method_mirror_source_test.dart -text
|
||||
tests/lib_2/mirrors/method_mirror_source_other.dart -text
|
||||
tests/lib_2/mirrors/method_mirror_source_line_ending_test.dart -text
|
||||
tests/lib_2/mirrors/method_mirror_source_line_ending_cr.dart -text
|
||||
tests/lib_2/mirrors/method_mirror_source_line_ending_crlf.dart -text
|
||||
tests/lib_2/mirrors/method_mirror_source_line_ending_lf.dart -text
|
||||
tests/lib_2/mirrors/method_mirror_source_test.dart -text
|
||||
tests/lib_2/mirrors/method_mirror_source_other.dart -text
|
||||
tests/lib_2/mirrors/method_mirror_source_test.dart -text
|
||||
|
||||
# Files to leave alone and not diff.
|
||||
*.png binary
|
||||
|
||||
@@ -36,7 +36,6 @@ vars = {
|
||||
"chromium_git": "https://chromium.googlesource.com",
|
||||
"fuchsia_git": "https://fuchsia.googlesource.com",
|
||||
|
||||
"co19_rev": "9858ee7d79cf09b50d6b5bc13fb950ae5f357954",
|
||||
"co19_2_rev": "9484b81650d8c5bedf72abc541960dd1c90b2329",
|
||||
|
||||
# As Flutter does, we pull buildtools, including the clang toolchain, from
|
||||
@@ -175,9 +174,6 @@ deps = {
|
||||
"dep_type": "cipd",
|
||||
},
|
||||
|
||||
Var("dart_root") + "/tests/co19/src":
|
||||
Var("dart_git") + "co19.git" + "@" + Var("co19_rev"),
|
||||
|
||||
Var("dart_root") + "/tests/co19_2/src":
|
||||
Var("chromium_git") + "/external/github.com/dart-lang/co19.git" +
|
||||
"@" + Var("co19_2_rev"),
|
||||
|
||||
@@ -107,78 +107,6 @@ def _CheckDartFormat(input_api, output_api):
|
||||
return []
|
||||
|
||||
|
||||
def _CheckNewTests(input_api, output_api):
|
||||
testsDirectories = [
|
||||
# Dart 1 tests Dart 2.0 tests
|
||||
# ================= ==========================
|
||||
("tests/language/", "tests/language_2/"),
|
||||
("tests/corelib/", "tests/corelib_2/"),
|
||||
("tests/lib/", "tests/lib_2/"),
|
||||
("tests/html/", "tests/lib_2/html/"),
|
||||
("tests/isolate/", "tests/lib_2/isolate/")
|
||||
]
|
||||
|
||||
result = []
|
||||
# Tuples of (new Dart 1 test path, expected Dart 2.0 test path)
|
||||
dart1TestsAdded = []
|
||||
# Tuples of (original Dart test path, expected Dart 2.0 test path)
|
||||
dart2TestsExists = []
|
||||
for f in input_api.AffectedTextFiles():
|
||||
localpath = f.LocalPath()
|
||||
if not(localpath.endswith('.status')):
|
||||
for oldPath, newPath in testsDirectories:
|
||||
if localpath.startswith(oldPath):
|
||||
if f.Action() == 'A':
|
||||
# Compute where the new test should live.
|
||||
dart2TestPath = localpath.replace(oldPath, newPath)
|
||||
dart1TestsAdded.append((localpath, dart2TestPath))
|
||||
elif f.Action() == 'M':
|
||||
# Find all modified tests in Dart 1.0
|
||||
for oldPath, newPath in testsDirectories:
|
||||
if localpath.find(oldPath) == 0:
|
||||
dart2TestFilePathAbs = "%s" % \
|
||||
f.AbsoluteLocalPath().replace(oldPath, newPath)
|
||||
if os.path.isfile(dart2TestFilePathAbs):
|
||||
#originalDart1Test.append(localpath)
|
||||
dart2TestsExists.append((localpath,
|
||||
localpath.replace(oldPath, newPath)))
|
||||
|
||||
# Does a Dart 2.0 test exist if so it must be changed too.
|
||||
missingDart2TestsChange = []
|
||||
for (dartTest, dart2Test) in dart2TestsExists:
|
||||
foundDart2TestModified = False
|
||||
for f in input_api.AffectedFiles():
|
||||
if f.LocalPath() == dart2Test:
|
||||
# Found corresponding Dart 2 test - great.
|
||||
foundDart2TestModified = True
|
||||
break
|
||||
if not foundDart2TestModified:
|
||||
# Add the tuple (dart 1 test path, Dart 2.0 test path)
|
||||
missingDart2TestsChange.append((dartTest, dart2Test))
|
||||
|
||||
if missingDart2TestsChange:
|
||||
errorList = []
|
||||
for idx, (orginalTest, dart2Test) in enumerate(missingDart2TestsChange):
|
||||
errorList.append(
|
||||
'%s. Dart 1.0 test changed: %s\n%s. Only the Dart 2.0 test can '\
|
||||
'change: %s\n' % (idx + 1, orginalTest, idx + 1, dart2Test))
|
||||
result.append(output_api.PresubmitError(
|
||||
'Error: Changed Dart 1.0 test detected - only 1.0 status files can '\
|
||||
'change. Migrate test to Dart 2.0 tests:\n%s' % ''.join(errorList)))
|
||||
|
||||
if dart1TestsAdded:
|
||||
errorList = []
|
||||
for idx, (oldTestPath, newTestPath) in enumerate(dart1TestsAdded):
|
||||
errorList.append('%s. New Dart 1.0 test: %s\n'
|
||||
'%s. Should be Dart 2.0 test: %s\n' % \
|
||||
(idx + 1, oldTestPath, idx + 1, newTestPath))
|
||||
result.append(output_api.PresubmitError(
|
||||
'Error: New Dart 1.0 test can not be added the test must be added '\
|
||||
'as a Dart 2.0 test:\nFix tests:\n%s' % ''.join(errorList)))
|
||||
|
||||
return result
|
||||
|
||||
|
||||
def _CheckStatusFiles(input_api, output_api):
|
||||
local_root = input_api.change.RepositoryRoot()
|
||||
upstream = input_api.change._upstream
|
||||
@@ -244,13 +172,11 @@ def _CheckValidHostsInDEPS(input_api, output_api):
|
||||
def CheckChangeOnCommit(input_api, output_api):
|
||||
return (_CheckValidHostsInDEPS(input_api, output_api) +
|
||||
_CheckBuildStatus(input_api, output_api) +
|
||||
_CheckNewTests(input_api, output_api) +
|
||||
_CheckDartFormat(input_api, output_api) +
|
||||
_CheckStatusFiles(input_api, output_api))
|
||||
|
||||
|
||||
def CheckChangeOnUpload(input_api, output_api):
|
||||
return (_CheckValidHostsInDEPS(input_api, output_api) +
|
||||
_CheckNewTests(input_api, output_api) +
|
||||
_CheckDartFormat(input_api, output_api) +
|
||||
_CheckStatusFiles(input_api, output_api))
|
||||
|
||||
@@ -17,9 +17,6 @@ const List<String> strongSuites = const <String>[
|
||||
const List<String> nonStrongSuites = const <String>[
|
||||
'dart2js_native',
|
||||
'dart2js_extra',
|
||||
'language',
|
||||
'corelib',
|
||||
'html',
|
||||
];
|
||||
|
||||
main(List<String> args) {
|
||||
|
||||
@@ -45,15 +45,12 @@ final dart2jsConfigurations = {
|
||||
};
|
||||
|
||||
final dart2jsStatusFiles = {
|
||||
'language': 'tests/language/language_dart2js.status',
|
||||
'corelib': 'tests/corelib/corelib.status',
|
||||
'language_2': 'tests/language_2/language_2_dart2js.status',
|
||||
// TODO(sigmund,rnystrom): update when corelib_2 gets split into multiple
|
||||
// status files.
|
||||
'corelib_2': 'tests/corelib_2/corelib_2.status',
|
||||
'dart2js_extra': 'tests/compiler/dart2js_extra/dart2js_extra.status',
|
||||
'dart2js_native': 'tests/compiler/dart2js_native/dart2js_native.status',
|
||||
'html': 'tests/html/html.status',
|
||||
};
|
||||
|
||||
main(args) {
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
/src
|
||||
@@ -1,6 +0,0 @@
|
||||
# Copyright (c) 2013, 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.
|
||||
|
||||
[ $compiler == dart2analyzer ]
|
||||
*: Skip
|
||||
@@ -1,989 +0,0 @@
|
||||
# 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.
|
||||
# This file contains the tests that have been identified as broken and
|
||||
# have been filed on the co19 issue tracker at
|
||||
# https://code.google.com/p/co19/issues/list (read-only).
|
||||
# https://github.com/dart-lang/co19/issues .
|
||||
|
||||
# In order to qualify here these tests need to fail both on the VM and dart2js.
|
||||
|
||||
# Tests that produce compile-time errors even in legacy mode.
|
||||
[ $runtime == none ]
|
||||
Language/Expressions/Bitwise_Expressions/syntax_t01/02: Skip
|
||||
Language/Variables/constant_initialization_t03: CompileTimeError # Uppercase constants removed
|
||||
Language/Variables/constant_variable_t09: CompileTimeError # Uppercase constants removed
|
||||
LibTest/core/double/operator_GE_A01_t03: CompileTimeError # Uppercase constants removed
|
||||
LibTest/core/double/operator_GE_A02_t01: CompileTimeError # Uppercase constants removed
|
||||
LibTest/core/double/operator_GT_A01_t03: CompileTimeError # Uppercase constants removed
|
||||
LibTest/core/double/operator_GT_A02_t01: CompileTimeError # Uppercase constants removed
|
||||
LibTest/core/double/operator_LE_A01_t03: CompileTimeError # Uppercase constants removed
|
||||
LibTest/core/double/operator_LE_A02_t01: CompileTimeError # Uppercase constants removed
|
||||
LibTest/core/double/operator_LT_A01_t03: CompileTimeError # Uppercase constants removed
|
||||
LibTest/core/double/operator_LT_A02_t01: CompileTimeError # Uppercase constants removed
|
||||
LibTest/core/double/operator_addition_A01_t01: CompileTimeError # Uppercase constants removed
|
||||
LibTest/core/double/operator_addition_A02_t01: CompileTimeError # Uppercase constants removed
|
||||
LibTest/core/double/operator_division_A01_t01: CompileTimeError # Uppercase constants removed
|
||||
LibTest/core/double/operator_division_A02_t01: CompileTimeError # Uppercase constants removed
|
||||
LibTest/core/double/operator_multiplication_A01_t01: CompileTimeError # Uppercase constants removed
|
||||
LibTest/core/double/operator_multiplication_A02_t01: CompileTimeError # Uppercase constants removed
|
||||
LibTest/core/double/operator_subtraction_A01_t01: CompileTimeError # Uppercase constants removed
|
||||
LibTest/core/double/operator_truncating_division_A01_t01: CompileTimeError # Uppercase constants removed
|
||||
LibTest/core/double/operator_truncating_division_A02_t01: CompileTimeError # Uppercase constants removed
|
||||
LibTest/isolate/SendPort/send_A01_t01: CompileTimeError # Uppercase constants removed
|
||||
LibTest/isolate/SendPort/send_A01_t02: CompileTimeError # Uppercase constants removed
|
||||
LibTest/isolate/SendPort/send_A01_t03: CompileTimeError # Uppercase constants removed
|
||||
LibTest/isolate/SendPort/send_A01_t04: CompileTimeError # Uppercase constants removed
|
||||
LibTest/math/MutableRectangle/operator_equality_A02_t01: CompileTimeError # Uppercase constants removed
|
||||
LibTest/math/MutableRectangle/operator_equality_A04_t01: CompileTimeError # Uppercase constants removed
|
||||
LibTest/math/Point/operator_equality_A02_t01: CompileTimeError # Uppercase constants removed
|
||||
LibTest/math/Point/operator_equality_A04_t01: CompileTimeError # Uppercase constants removed
|
||||
LibTest/math/Rectangle/operator_equality_A02_t01: CompileTimeError # Uppercase constants removed
|
||||
LibTest/math/Rectangle/operator_equality_A04_t01: CompileTimeError # Uppercase constants removed
|
||||
|
||||
# Tests that fail either at compile-time or at runtime.
|
||||
[ $runtime != none ]
|
||||
Language/Expressions/Bitwise_Expressions/syntax_t01/02: Skip
|
||||
Language/Expressions/Numbers/static_type_of_double_t01: RuntimeError # Uppercase constants removed
|
||||
Language/Expressions/Object_Identity/constant_objects_t01: RuntimeError # Uppercase constants removed
|
||||
Language/Expressions/Object_Identity/double_t02: RuntimeError # Uppercase constants removed
|
||||
Language/Expressions/Type_Cast/syntax_t01: RuntimeError # Uppercase constants removed
|
||||
Language/Statements/Assert/syntax_t04: Pass, Fail # assert now has an optional second parameter.
|
||||
Language/Variables/constant_initialization_t03: CompileTimeError # Uppercase constants removed
|
||||
Language/Variables/constant_variable_t09: CompileTimeError # Uppercase constants removed
|
||||
LibTest/async/Future/Future.delayed_A02_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/async/Zone/ROOT_A01_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/async/Zone/bindBinaryCallback_A01_t02: Fail # co19 issue 126
|
||||
LibTest/async/Zone/bindCallback_A01_t02: Fail # co19 issue 126
|
||||
LibTest/async/Zone/bindUnaryCallback_A01_t02: Fail # co19 issue 126
|
||||
LibTest/async/Zone/parent_A01_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/DateTime/month_A01_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/DateTime/weekday_A01_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/Duration/HOURS_PER_DAY_A01_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/Duration/MILLISECONDS_PER_DAY_A01_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/Duration/MILLISECONDS_PER_HOUR_A01_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/Duration/MILLISECONDS_PER_MINUTE_A01_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/Duration/MILLISECONDS_PER_SECOND_A01_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/Duration/MINUTES_PER_DAY_A01_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/Duration/MINUTES_PER_HOUR_A01_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/Duration/SECONDS_PER_DAY_A01_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/Duration/SECONDS_PER_HOUR_A01_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/Duration/SECONDS_PER_MINUTE_A01_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/Duration/static_properties_A01_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/RegExp/firstMatch_A01_t01: Fail # co19 issue 742
|
||||
LibTest/core/Uri/Uri_A06_t02: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/Uri/Uri_A06_t03: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/Uri/decodeComponent_A01_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/Uri/decodeFull_A01_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/Uri/decodeQueryComponent_A01_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/Uri/encodeComponent_A01_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/Uri/encodeFull_A01_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/Uri/encodeQueryComponent_A01_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/Uri/encodeQueryComponent_A01_t02: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/double/INFINITY_A01_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/double/INFINITY_A01_t02: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/double/INFINITY_A01_t03: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/double/INFINITY_A01_t04: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/double/NAN_A01_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/double/NAN_A01_t02: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/double/NAN_A01_t03: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/double/NAN_A01_t04: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/double/NEGATIVE_INFINITY_A01_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/double/NEGATIVE_INFINITY_A01_t02: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/double/NEGATIVE_INFINITY_A01_t03: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/double/NEGATIVE_INFINITY_A01_t04: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/double/ceilToDouble_A02_t02: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/double/ceil_A02_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/double/ceil_A02_t02: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/double/floorToDouble_A02_t02: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/double/floor_A02_t02: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/double/operator_GE_A01_t03: CompileTimeError # Uppercase constants removed
|
||||
LibTest/core/double/operator_GE_A02_t01: CompileTimeError # Uppercase constants removed
|
||||
LibTest/core/double/operator_GT_A01_t03: CompileTimeError # Uppercase constants removed
|
||||
LibTest/core/double/operator_GT_A02_t01: CompileTimeError # Uppercase constants removed
|
||||
LibTest/core/double/operator_LE_A01_t03: CompileTimeError # Uppercase constants removed
|
||||
LibTest/core/double/operator_LE_A02_t01: CompileTimeError # Uppercase constants removed
|
||||
LibTest/core/double/operator_LT_A01_t03: CompileTimeError # Uppercase constants removed
|
||||
LibTest/core/double/operator_LT_A02_t01: CompileTimeError # Uppercase constants removed
|
||||
LibTest/core/double/operator_addition_A01_t01: CompileTimeError # Uppercase constants removed
|
||||
LibTest/core/double/operator_addition_A02_t01: CompileTimeError # Uppercase constants removed
|
||||
LibTest/core/double/operator_division_A01_t01: CompileTimeError # Uppercase constants removed
|
||||
LibTest/core/double/operator_division_A01_t09: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/double/operator_division_A02_t01: CompileTimeError # Uppercase constants removed
|
||||
LibTest/core/double/operator_multiplication_A01_t01: CompileTimeError # Uppercase constants removed
|
||||
LibTest/core/double/operator_multiplication_A02_t01: CompileTimeError # Uppercase constants removed
|
||||
LibTest/core/double/operator_remainder_A01_t04: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/double/operator_subtraction_A01_t01: CompileTimeError # Uppercase constants removed
|
||||
LibTest/core/double/operator_truncating_division_A01_t01: CompileTimeError # Uppercase constants removed
|
||||
LibTest/core/double/operator_truncating_division_A02_t01: CompileTimeError # Uppercase constants removed
|
||||
LibTest/core/double/operator_unary_minus_A01_t02: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/double/operator_unary_minus_A01_t03: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/double/parse_A01_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/double/roundToDouble_A02_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/double/roundToDouble_A02_t02: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/double/round_A02_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/double/round_A02_t02: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/double/toStringAsExponential_A01_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/double/toStringAsExponential_A01_t02: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/double/toStringAsPrecision_A01_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/double/toStringAsPrecision_A01_t02: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/int/compareTo_A01_t02: RuntimeError # Uppercase constants removed
|
||||
LibTest/core/int/operator_division_A01_t02: RuntimeError # Uppercase constants removed
|
||||
LibTest/isolate/RawReceivePort/handler_A01_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/isolate/SendPort/send_A01_t01: CompileTimeError, Timeout # Uppercase constants removed
|
||||
LibTest/isolate/SendPort/send_A01_t02: CompileTimeError # Uppercase constants removed
|
||||
LibTest/isolate/SendPort/send_A01_t03: CompileTimeError # Uppercase constants removed
|
||||
LibTest/math/MutableRectangle/operator_equality_A02_t01: CompileTimeError # Uppercase constants removed
|
||||
LibTest/math/MutableRectangle/operator_equality_A03_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/math/MutableRectangle/operator_equality_A04_t01: CompileTimeError # Uppercase constants removed
|
||||
LibTest/math/Point/Point_A01_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/math/Point/magnitude_A01_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/math/Point/operator_equality_A02_t01: CompileTimeError # Uppercase constants removed
|
||||
LibTest/math/Point/operator_equality_A03_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/math/Point/operator_equality_A04_t01: CompileTimeError # Uppercase constants removed
|
||||
LibTest/math/Rectangle/operator_equality_A02_t01: CompileTimeError # Uppercase constants removed
|
||||
LibTest/math/Rectangle/operator_equality_A03_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/math/Rectangle/operator_equality_A04_t01: CompileTimeError # Uppercase constants removed
|
||||
LibTest/math/acos_A02_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/math/asin_A02_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/math/atan2_A01_t02: RuntimeError # Uppercase constants removed
|
||||
LibTest/math/atan2_A02_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/math/atan2_A03_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/math/atan2_A04_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/math/atan2_A05_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/math/atan_A01_t02: RuntimeError # Uppercase constants removed
|
||||
LibTest/math/atan_A02_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/math/cos_A02_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/math/exp_A01_t02: RuntimeError # Uppercase constants removed
|
||||
LibTest/math/exp_A02_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/math/log_A03_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/math/max_A01_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/math/max_A02_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/math/min_A01_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/math/min_A02_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/math/pow_A03_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/math/pow_A04_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/math/pow_A05_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/math/pow_A07_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/math/pow_A08_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/math/pow_A09_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/math/pow_A11_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/math/pow_A12_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/math/pow_A13_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/math/pow_A14_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/math/pow_A15_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/math/pow_A16_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/math/pow_A17_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/math/sin_A02_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/math/sqrt_A01_t02: RuntimeError # Uppercase constants removed
|
||||
LibTest/math/sqrt_A02_t02: RuntimeError # Uppercase constants removed
|
||||
LibTest/math/sqrt_A02_t03: RuntimeError # Uppercase constants removed
|
||||
LibTest/math/tan_A02_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/typed_data/ByteData/ByteData.view_A01_t02: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/ByteData/buffer_A01_t01: Fail # co19 r736 bug - sent comment.
|
||||
LibTest/typed_data/ByteData/getFloat32_A01_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/typed_data/ByteData/getFloat64_A01_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/typed_data/ByteData/getInt16_A01_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/typed_data/ByteData/getInt32_A01_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/typed_data/ByteData/getInt64_A01_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/typed_data/ByteData/getInt8_A01_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/ByteData/getUint16_A01_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/typed_data/ByteData/getUint32_A01_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/typed_data/ByteData/getUint8_A01_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/ByteData/setFloat32_A01_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/typed_data/ByteData/setFloat64_A01_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/typed_data/ByteData/setInt16_A01_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/typed_data/ByteData/setInt32_A01_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/typed_data/ByteData/setInt64_A01_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/typed_data/ByteData/setInt8_A01_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/ByteData/setUint16_A01_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/typed_data/ByteData/setUint32_A01_t01: RuntimeError # Uppercase constants removed
|
||||
LibTest/typed_data/ByteData/setUint8_A01_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Float32List/Float32List.view_A01_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Float32List/Float32List.view_A01_t02: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Float32List/Float32List.view_A06_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Float32List/buffer_A01_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Float32List/first_A01_t02: RuntimeError # co19 issue 130
|
||||
LibTest/typed_data/Float32List/last_A01_t02: RuntimeError # co19 issue 130
|
||||
LibTest/typed_data/Float32List/lengthInBytes_A01_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Float32List/offsetInBytes_A01_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Float32x4List/Float32x4List.view_A01_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Float32x4List/Float32x4List.view_A01_t02: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Float32x4List/Float32x4List.view_A06_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Float32x4List/buffer_A01_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Float32x4List/lengthInBytes_A01_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Float32x4List/offsetInBytes_A01_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Float64List/Float64List.view_A01_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Float64List/Float64List.view_A01_t02: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Float64List/Float64List.view_A06_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Float64List/buffer_A01_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Float64List/first_A01_t02: RuntimeError # co19 issue 130
|
||||
LibTest/typed_data/Float64List/last_A01_t02: RuntimeError # co19 issue 130
|
||||
LibTest/typed_data/Float64List/lengthInBytes_A01_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Float64List/offsetInBytes_A01_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Int16List/Int16List.view_A01_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Int16List/Int16List.view_A01_t02: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Int16List/Int16List.view_A06_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Int16List/buffer_A01_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Int16List/first_A01_t02: RuntimeError # co19 issue 130
|
||||
LibTest/typed_data/Int16List/last_A01_t02: RuntimeError # co19 issue 130
|
||||
LibTest/typed_data/Int16List/lengthInBytes_A01_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Int16List/offsetInBytes_A01_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Int32List/Int32List.view_A01_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Int32List/Int32List.view_A01_t02: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Int32List/Int32List.view_A06_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Int32List/buffer_A01_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Int32List/first_A01_t02: RuntimeError # co19 issue 130
|
||||
LibTest/typed_data/Int32List/last_A01_t02: RuntimeError # co19 issue 130
|
||||
LibTest/typed_data/Int32List/lengthInBytes_A01_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Int32List/offsetInBytes_A01_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Int32x4/Int32x4.fromFloat32x4Bits_A01_t02: RuntimeError # Uppercase constants removed
|
||||
LibTest/typed_data/Int64List/Int64List.view_A01_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Int64List/Int64List.view_A01_t02: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Int64List/Int64List.view_A06_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Int64List/buffer_A01_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Int64List/first_A01_t02: RuntimeError # co19 issue 130
|
||||
LibTest/typed_data/Int64List/last_A01_t02: RuntimeError # co19 issue 130
|
||||
LibTest/typed_data/Int64List/lengthInBytes_A01_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Int64List/offsetInBytes_A01_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Int8List/Int8List.view_A01_t02: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Int8List/first_A01_t02: RuntimeError # co19 issue 130
|
||||
LibTest/typed_data/Int8List/last_A01_t02: RuntimeError # co19 issue 130
|
||||
LibTest/typed_data/Int8List/lengthInBytes_A01_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Uint16List/Uint16List.view_A01_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Uint16List/Uint16List.view_A01_t02: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Uint16List/Uint16List.view_A06_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Uint16List/buffer_A01_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Uint16List/first_A01_t02: RuntimeError # co19 issue 130
|
||||
LibTest/typed_data/Uint16List/last_A01_t02: RuntimeError # co19 issue 130
|
||||
LibTest/typed_data/Uint16List/lengthInBytes_A01_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Uint16List/offsetInBytes_A01_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Uint32List/Uint32List.view_A01_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Uint32List/Uint32List.view_A01_t02: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Uint32List/Uint32List.view_A06_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Uint32List/buffer_A01_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Uint32List/first_A01_t02: RuntimeError # co19 issue 130
|
||||
LibTest/typed_data/Uint32List/last_A01_t02: RuntimeError # co19 issue 130
|
||||
LibTest/typed_data/Uint32List/lengthInBytes_A01_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Uint32List/offsetInBytes_A01_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Uint64List/Uint64List.view_A06_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Uint64List/buffer_A01_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Uint64List/first_A01_t02: RuntimeError # co19 issue 130
|
||||
LibTest/typed_data/Uint64List/last_A01_t02: RuntimeError # co19 issue 130
|
||||
LibTest/typed_data/Uint64List/lengthInBytes_A01_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Uint64List/offsetInBytes_A01_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Uint8ClampedList/Uint8ClampedList.view_A01_t02: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Uint8ClampedList/first_A01_t02: RuntimeError # co19 issue 130
|
||||
LibTest/typed_data/Uint8ClampedList/last_A01_t02: RuntimeError # co19 issue 130
|
||||
LibTest/typed_data/Uint8ClampedList/lengthInBytes_A01_t01: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Uint8List/Uint8List.view_A01_t02: RuntimeError # Uppercase constants removed.
|
||||
LibTest/typed_data/Uint8List/first_A01_t02: RuntimeError # co19 issue 130
|
||||
LibTest/typed_data/Uint8List/last_A01_t02: RuntimeError # co19 issue 130
|
||||
LibTest/typed_data/Uint8List/lengthInBytes_A01_t01: RuntimeError # Uppercase constants removed.
|
||||
Utils/tests/Expect/approxEquals_A01_t01: RuntimeError # Uppercase constants removed
|
||||
Utils/tests/Expect/approxEquals_A01_t02: RuntimeError # Uppercase constants removed
|
||||
Utils/tests/Expect/approxEquals_A01_t03: RuntimeError # Uppercase constants removed
|
||||
Utils/tests/Expect/approxEquals_A01_t04: RuntimeError # Uppercase constants removed
|
||||
Utils/tests/Expect/approxEquals_A02_t01: RuntimeError # Uppercase constants removed
|
||||
Utils/tests/Expect/approxEquals_A04_t01: RuntimeError # Uppercase constants removed
|
||||
Utils/tests/Expect/equals_A01_t04: RuntimeError # Uppercase constants removed
|
||||
Utils/tests/Expect/identical_A01_t01: RuntimeError # Uppercase constants removed
|
||||
Utils/tests/Expect/setEquals_A01_t02: RuntimeError # Uppercase constants removed
|
||||
|
||||
# Tests that fail everywhere, including the analyzer.
|
||||
[ $strong ]
|
||||
Language/Expressions/Additive_Expressions/syntax_t01/07: CompileTimeError
|
||||
Language/Expressions/Await_Expressions/evaluation_throws_t01: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Expressions/Await_Expressions/evaluation_throws_t02: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Expressions/Await_Expressions/evaluation_throws_t03: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Expressions/Await_Expressions/evaluation_throws_t04: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Expressions/Await_Expressions/evaluation_throws_t06: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Expressions/Await_Expressions/evaluation_throws_t07: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Expressions/Await_Expressions/execution_t01: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Expressions/Await_Expressions/execution_t02: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Expressions/Await_Expressions/execution_t03: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Expressions/Await_Expressions/execution_t04: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Expressions/Await_Expressions/execution_t05: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Expressions/Await_Expressions/execution_t06: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Expressions/Await_Expressions/no_static_warning_t01: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Expressions/Await_Expressions/static_type_t01: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Expressions/Await_Expressions/static_type_t03: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Expressions/Await_Expressions/syntax_t01: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Expressions/Await_Expressions/syntax_t02: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Expressions/Await_Expressions/syntax_t10: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Expressions/Await_Expressions/value_t01: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Expressions/Await_Expressions/value_t02: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Expressions/Await_Expressions/value_t03: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Expressions/Await_Expressions/value_t04: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Expressions/Function_Invocation/async_generator_invokation_t03: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Expressions/Function_Invocation/async_generator_invokation_t04: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Expressions/Function_Invocation/async_generator_invokation_t05: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Expressions/Function_Invocation/async_generator_invokation_t06: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Expressions/Function_Invocation/async_generator_invokation_t07: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Expressions/Function_Invocation/async_generator_invokation_t08: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Expressions/Function_Invocation/async_generator_invokation_t09: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Expressions/Function_Invocation/async_generator_invokation_t10: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Expressions/Function_Invocation/async_invokation_t03: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Expressions/Function_Invocation/async_invokation_t04: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Expressions/Function_Invocation/async_invokation_t05: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Expressions/Function_Invocation/async_invokation_t06: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Expressions/Numbers/static_type_of_double_t01: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Expressions/Object_Identity/constant_objects_t01: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Expressions/Object_Identity/double_t02: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Expressions/Spawning_an_Isolate/new_isolate_t01: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Expressions/Type_Cast/syntax_t01: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Functions/function_body_short_syntax_t02: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Functions/implicit_return_t02: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Break/async_loop_t01: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Break/async_loop_t02: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Break/async_loops_t01: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Break/async_loops_t02: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Break/async_loops_t03: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Break/async_loops_t04: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Break/async_loops_t05: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Break/async_loops_t06: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Break/async_loops_t07: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Break/async_loops_t08: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Break/async_loops_t09: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Break/async_loops_t10: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/For/Asynchronous_For_in/enclosing_loop_t01: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/For/Asynchronous_For_in/execution_t04: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/For/syntax_t18: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Rethrow/execution_t01: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Rethrow/execution_t02: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Rethrow/execution_t03: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Rethrow/execution_t04: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Return/runtime_type_t05: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Return/runtime_type_t06: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Return/runtime_type_t07: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Return/syntax_t06: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Return/syntax_t07: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Return/syntax_t08: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Return/syntax_t09: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Return/syntax_t10: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Return/syntax_t11: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Return/syntax_t12: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Return/syntax_t13: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Yield_and_Yield_Each/Yield/execution_async_t01: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Yield_and_Yield_Each/Yield/execution_async_t02: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Yield_and_Yield_Each/Yield/execution_async_t03: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Yield_and_Yield_Each/Yield/execution_async_t04: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Yield_and_Yield_Each/Yield/execution_async_t05: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Yield_and_Yield_Each/Yield/execution_async_t06: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Yield_and_Yield_Each/Yield/execution_async_t07: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Yield_and_Yield_Each/Yield/execution_async_t08: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Yield_and_Yield_Each/Yield/execution_sync_t01: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Yield_and_Yield_Each/Yield/execution_sync_t02: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Yield_and_Yield_Each/Yield/execution_sync_t03: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Yield_and_Yield_Each/Yield/syntax_t04: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Yield_and_Yield_Each/Yield/syntax_t05: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Yield_and_Yield_Each/Yield/syntax_t06: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Yield_and_Yield_Each/Yield_Each/execution_async_t02: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Yield_and_Yield_Each/Yield_Each/execution_async_t03: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Yield_and_Yield_Each/Yield_Each/execution_async_t04: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Yield_and_Yield_Each/Yield_Each/execution_async_t05: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Yield_and_Yield_Each/Yield_Each/execution_async_t06: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Yield_and_Yield_Each/Yield_Each/execution_async_t07: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Yield_and_Yield_Each/Yield_Each/execution_async_t08: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Yield_and_Yield_Each/Yield_Each/execution_async_t09: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Yield_and_Yield_Each/Yield_Each/execution_async_t10: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Yield_and_Yield_Each/Yield_Each/execution_async_t11: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Yield_and_Yield_Each/Yield_Each/syntax_t04: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Yield_and_Yield_Each/Yield_Each/syntax_t05: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Statements/Yield_and_Yield_Each/Yield_Each/syntax_t06: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Variables/constant_initialization_t03: CompileTimeError # Uses Dart 1 constants
|
||||
Language/Variables/constant_variable_t09: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Completer/completeError_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Completer/completeError_A01_t03: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Completer/completeError_A01_t04: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Completer/complete_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Completer/complete_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Completer/complete_A01_t03: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Completer/complete_A01_t05: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Completer/complete_A01_t06: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/DeferredLibrary/DeferredLibrary_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/Future.delayed_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/Future.delayed_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/Future.delayed_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/Future.delayed_A03_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/Future.error_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/Future.error_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/Future.microtask_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/Future.microtask_A01_t03: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/Future.microtask_A01_t04: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/Future.sync_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/Future.sync_A01_t03: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/Future.sync_A01_t04: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/Future.value_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/Future.value_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/Future_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/Future_A01_t03: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/Future_A01_t04: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/any_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/any_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/any_A01_t03: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/any_A01_t04: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/asStream_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/asStream_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/asStream_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/asStream_A02_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/catchError_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/catchError_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/catchError_A03_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/catchError_A03_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/catchError_A03_t03: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/catchError_A03_t04: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/doWhile_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/doWhile_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/then_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/then_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/then_A01_t03: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/then_A01_t04: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/then_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/then_A02_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/then_A03_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/then_A05_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/then_A05_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/then_A05_t03: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/timeout_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/timeout_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/timeout_A02_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/timeout_A02_t03: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/timeout_A03_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/wait_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/wait_A01_t03: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/wait_A01_t04: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/wait_A01_t05: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/wait_A01_t06: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/wait_A01_t07: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/wait_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/wait_A02_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/wait_A03_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/wait_A04_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/wait_A04_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/whenComplete_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/whenComplete_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/whenComplete_A03_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/whenComplete_A04_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Future/whenComplete_A04_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/Stream.empty_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/Stream.eventTransformed_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/Stream.eventTransformed_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/Stream.fromIterable_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/Stream.periodic_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/Stream.periodic_A03_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/any_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/any_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/any_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/asBroadcastStream_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/asBroadcastStream_A01_t03: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/asBroadcastStream_A01_t04: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/asBroadcastStream_A03_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/asBroadcastStream_A03_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/asBroadcastStream_A03_t03: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/asBroadcastStream_A04_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/asBroadcastStream_A04_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/asBroadcastStream_A04_t03: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/asyncExpand_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/asyncExpand_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/asyncMap_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/asyncMap_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/asyncMap_A01_t03: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/contains_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/contains_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/contains_A03_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/distinct_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/drain_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/drain_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/drain_A02_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/elementAt_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/elementAt_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/elementAt_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/elementAt_A03_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/every_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/every_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/expand_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/firstWhere_A01_t01: CompileTimeError # co19 issue 137
|
||||
LibTest/async/Stream/firstWhere_A02_t01: CompileTimeError # co19 issue 137
|
||||
LibTest/async/Stream/firstWhere_A03_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/firstWhere_A03_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/first_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/first_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/first_A02_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/first_A03_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/fold_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/handleError_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/handleError_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/handleError_A03_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/handleError_A04_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/handleError_A04_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/handleError_A04_t03: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/isEmpty_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/join_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/join_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/join_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/join_A02_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/lastWhere_A01_t01: CompileTimeError # co19 issue 137
|
||||
LibTest/async/Stream/lastWhere_A02_t01: CompileTimeError # co19 issue 137
|
||||
LibTest/async/Stream/lastWhere_A03_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/lastWhere_A04_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/last_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/last_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/last_A03_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/length_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/listen_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/listen_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/listen_A03_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/listen_A04_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/listen_A05_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/listen_A05_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/listen_A05_t03: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/listen_A06_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/map_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/reduce_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/reduce_A01_t03: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/singleWhere_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/single_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/single_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/single_A03_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/skipWhile_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/skip_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/takeWhile_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/take_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/take_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/take_A01_t03: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/timeout_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/timeout_A03_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/timeout_A04_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/toList_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Stream/transform_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/StreamController/StreamController.broadcast_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/StreamController/StreamController.broadcast_A03_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/StreamController/StreamController.broadcast_A04_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/StreamController/StreamController.broadcast_A05_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/StreamController/StreamController.broadcast_A06_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/StreamController/StreamController.broadcast_A07_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/StreamController/StreamController.broadcast_A07_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/StreamController/StreamController.broadcast_A08_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/StreamController/StreamController_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/StreamController/StreamController_A03_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/StreamController/StreamController_A05_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/StreamController/StreamController_A06_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/StreamController/StreamController_A06_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/StreamController/addError_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/StreamController/addError_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/StreamController/addError_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/StreamController/addStream_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/StreamController/addStream_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/StreamController/addStream_A02_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/StreamController/addStream_A03_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/StreamController/addStream_A03_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/StreamController/add_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/StreamController/close_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/StreamController/done_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/StreamIterator/cancel_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/StreamIterator/current_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/StreamIterator/current_A01_t03: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/StreamIterator/moveNext_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/StreamIterator/moveNext_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/StreamSink/addError_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/StreamSink/addStream_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/StreamSink/addStream_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/StreamSink/addStream_A01_t03: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/StreamSink/addStream_A01_t05: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/StreamSink/add_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/StreamSink/close_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/StreamSink/done_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/StreamTransformer/StreamTransformer.fromHandlers_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/StreamTransformer/StreamTransformer.fromHandlers_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/StreamTransformer/StreamTransformer.fromHandlers_A01_t04: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/StreamTransformer/StreamTransformer_A01_t03: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/StreamTransformer/StreamTransformer_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/StreamTransformer/StreamTransformer_A03_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/StreamTransformer/StreamTransformer_A03_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/StreamTransformer/bind_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Timer/Timer.periodic_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Timer/Timer.periodic_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Timer/Timer_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Timer/Timer_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Timer/cancel_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Timer/isActive_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Timer/isActive_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Timer/run_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Timer/run_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Zone/createPeriodicTimer_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Zone/createTimer_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Zone/current_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Zone/handleUncaughtError_A01_t04: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Zone/inSameErrorZone_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Zone/inSameErrorZone_A01_t03: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Zone/inSameErrorZone_A01_t04: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Zone/inSameErrorZone_A01_t05: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Zone/parent_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Zone/scheduleMicrotask_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/async/Zone/scheduleMicrotask_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/DateTime/month_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/DateTime/weekday_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/Duration/HOURS_PER_DAY_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/Duration/MILLISECONDS_PER_DAY_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/Duration/MILLISECONDS_PER_HOUR_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/Duration/MILLISECONDS_PER_MINUTE_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/Duration/MILLISECONDS_PER_SECOND_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/Duration/MINUTES_PER_DAY_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/Duration/MINUTES_PER_HOUR_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/Duration/SECONDS_PER_DAY_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/Duration/SECONDS_PER_HOUR_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/Duration/SECONDS_PER_MINUTE_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/Duration/static_properties_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/Stopwatch/elapsedInMs_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/Stopwatch/elapsedInUs_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/Stopwatch/elapsedTicks_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/Stopwatch/elapsedTicks_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/Stopwatch/elapsedTicks_A01_t03: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/Stopwatch/elapsed_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/Stopwatch/elapsed_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/Stopwatch/elapsed_A01_t03: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/Stopwatch/start_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/Stopwatch/start_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/Stopwatch/start_A01_t03: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/Stopwatch/stop_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/Uri/Uri_A06_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/Uri/Uri_A06_t03: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/Uri/decodeComponent_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/Uri/decodeFull_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/Uri/decodeQueryComponent_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/Uri/encodeComponent_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/Uri/encodeFull_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/Uri/encodeQueryComponent_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/Uri/encodeQueryComponent_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/double/INFINITY_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/double/INFINITY_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/double/INFINITY_A01_t03: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/double/INFINITY_A01_t04: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/double/NAN_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/double/NAN_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/double/NAN_A01_t03: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/double/NAN_A01_t04: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/double/NEGATIVE_INFINITY_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/double/NEGATIVE_INFINITY_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/double/NEGATIVE_INFINITY_A01_t03: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/double/NEGATIVE_INFINITY_A01_t04: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/double/ceilToDouble_A02_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/double/ceil_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/double/ceil_A02_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/double/floorToDouble_A02_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/double/floor_A02_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/double/operator_addition_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/double/operator_division_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/double/operator_division_A01_t09: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/double/operator_multiplication_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/double/operator_subtraction_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/double/operator_truncating_division_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/double/operator_unary_minus_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/double/operator_unary_minus_A01_t03: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/double/parse_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/double/roundToDouble_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/double/roundToDouble_A02_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/double/round_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/double/round_A02_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/double/toStringAsExponential_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/double/toStringAsExponential_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/double/toStringAsPrecision_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/double/toStringAsPrecision_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/int/compareTo_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/core/int/operator_division_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/Isolate/spawnUri_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/Isolate/spawnUri_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/Isolate/spawnUri_A01_t03: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/Isolate/spawnUri_A01_t04: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/Isolate/spawnUri_A01_t06: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/Isolate/spawnUri_A01_t07: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/Isolate/spawnUri_A02_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/Isolate/spawnUri_A02_t03: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/Isolate/spawnUri_A02_t04: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/Isolate/spawnUri_A02_t05: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/Isolate/spawn_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/Isolate/spawn_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/Isolate/spawn_A01_t04: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/Isolate/spawn_A01_t05: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/Isolate/spawn_A01_t06: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/Isolate/spawn_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/Isolate/spawn_A02_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/Isolate/spawn_A02_t03: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/Isolate/spawn_A03_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/Isolate/spawn_A03_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/Isolate/spawn_A03_t03: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/Isolate/spawn_A03_t04: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/Isolate/spawn_A05_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/Isolate/spawn_A05_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/RawReceivePort/RawReceivePort_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/RawReceivePort/RawReceivePort_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/RawReceivePort/close_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/RawReceivePort/handler_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/RawReceivePort/sendPort_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/any_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/asBroadcastStream_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/asBroadcastStream_A01_t03: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/asBroadcastStream_A01_t04: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/asBroadcastStream_A03_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/asBroadcastStream_A03_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/asBroadcastStream_A03_t03: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/asBroadcastStream_A04_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/asBroadcastStream_A04_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/asBroadcastStream_A04_t03: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/close_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/close_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/contains_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/distinct_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/drain_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/drain_A02_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/elementAt_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/elementAt_A03_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/every_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/expand_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/firstWhere_A01_t01: CompileTimeError # co19 issue 137
|
||||
LibTest/isolate/ReceivePort/firstWhere_A02_t01: CompileTimeError # co19 issue 137
|
||||
LibTest/isolate/ReceivePort/firstWhere_A03_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/first_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/first_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/first_A02_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/fold_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/isEmpty_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/join_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/join_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/lastWhere_A01_t01: CompileTimeError # co19 issue 137
|
||||
LibTest/isolate/ReceivePort/lastWhere_A02_t01: CompileTimeError # co19 issue 137
|
||||
LibTest/isolate/ReceivePort/lastWhere_A04_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/last_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/last_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/length_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/listen_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/map_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/pipe_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/reduce_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/reduce_A01_t03: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/singleWhere_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/single_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/single_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/skipWhile_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/skip_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/takeWhile_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/take_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/take_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/take_A01_t03: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/toList_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/ReceivePort/transform_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/SendPort/send_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/SendPort/send_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/SendPort/send_A01_t03: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/SendPort/send_A01_t04: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/SendPort/send_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/isolate/SendPort/send_A02_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/math/MutableRectangle/operator_equality_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/math/MutableRectangle/operator_equality_A03_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/math/MutableRectangle/operator_equality_A04_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/math/Point/Point_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/math/Point/magnitude_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/math/Point/operator_equality_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/math/Point/operator_equality_A03_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/math/Point/operator_equality_A04_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/math/Rectangle/operator_equality_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/math/Rectangle/operator_equality_A03_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/math/Rectangle/operator_equality_A04_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/math/acos_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/math/asin_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/math/atan2_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/math/atan2_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/math/atan2_A03_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/math/atan2_A04_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/math/atan2_A05_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/math/atan_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/math/atan_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/math/cos_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/math/exp_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/math/exp_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/math/log_A03_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/math/pow_A03_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/math/pow_A04_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/math/pow_A05_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/math/pow_A07_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/math/pow_A08_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/math/pow_A09_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/math/pow_A11_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/math/pow_A12_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/math/pow_A13_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/math/pow_A14_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/math/pow_A15_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/math/pow_A16_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/math/pow_A17_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/math/sin_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/math/sqrt_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/math/sqrt_A02_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/math/sqrt_A02_t03: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/math/tan_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/ByteData/getFloat32_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/ByteData/getFloat64_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/ByteData/getInt16_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/ByteData/getInt32_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/ByteData/getInt64_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/ByteData/getInt8_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/ByteData/getUint16_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/ByteData/getUint32_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/ByteData/getUint8_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/ByteData/setFloat32_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/ByteData/setFloat64_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/ByteData/setInt16_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/ByteData/setInt32_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/ByteData/setInt64_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/ByteData/setInt8_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/ByteData/setUint16_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/ByteData/setUint32_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/ByteData/setUint8_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Float32List/Float32List.view_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Float32List/Float32List.view_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Float32List/Float32List.view_A06_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Float32List/buffer_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Float32List/lengthInBytes_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Float32List/offsetInBytes_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Float32x4List/Float32x4List.view_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Float32x4List/Float32x4List.view_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Float32x4List/Float32x4List.view_A06_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Float32x4List/buffer_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Float32x4List/lengthInBytes_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Float32x4List/offsetInBytes_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Float64List/Float64List.view_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Float64List/Float64List.view_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Float64List/Float64List.view_A06_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Float64List/buffer_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Float64List/lengthInBytes_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Float64List/offsetInBytes_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Int16List/Int16List.view_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Int16List/Int16List.view_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Int16List/Int16List.view_A06_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Int16List/buffer_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Int16List/lengthInBytes_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Int16List/offsetInBytes_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Int32List/Int32List.view_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Int32List/Int32List.view_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Int32List/Int32List.view_A06_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Int32List/buffer_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Int32List/lengthInBytes_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Int32List/offsetInBytes_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Int32x4/Int32x4.fromFloat32x4Bits_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Int64List/Int64List.view_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Int64List/Int64List.view_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Int64List/Int64List.view_A06_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Int64List/buffer_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Int64List/lengthInBytes_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Int64List/offsetInBytes_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Int8List/Int8List.view_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Int8List/lengthInBytes_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Uint16List/Uint16List.view_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Uint16List/Uint16List.view_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Uint16List/Uint16List.view_A06_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Uint16List/buffer_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Uint16List/lengthInBytes_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Uint16List/offsetInBytes_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Uint32List/Uint32List.view_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Uint32List/Uint32List.view_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Uint32List/Uint32List.view_A06_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Uint32List/buffer_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Uint32List/lengthInBytes_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Uint32List/offsetInBytes_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Uint64List/Uint64List.view_A06_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Uint64List/buffer_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Uint64List/lengthInBytes_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Uint64List/offsetInBytes_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Uint8ClampedList/Uint8ClampedList.view_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Uint8ClampedList/lengthInBytes_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Uint8List/Uint8List.view_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
LibTest/typed_data/Uint8List/lengthInBytes_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
Utils/tests/Expect/approxEquals_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
Utils/tests/Expect/approxEquals_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
Utils/tests/Expect/approxEquals_A01_t03: CompileTimeError # Uses Dart 1 constants
|
||||
Utils/tests/Expect/approxEquals_A01_t04: CompileTimeError # Uses Dart 1 constants
|
||||
Utils/tests/Expect/approxEquals_A02_t01: CompileTimeError # Uses Dart 1 constants
|
||||
Utils/tests/Expect/approxEquals_A04_t01: CompileTimeError # Uses Dart 1 constants
|
||||
Utils/tests/Expect/equals_A01_t04: CompileTimeError # Uses Dart 1 constants
|
||||
Utils/tests/Expect/identical_A01_t01: CompileTimeError # Uses Dart 1 constants
|
||||
Utils/tests/Expect/setEquals_A01_t02: CompileTimeError # Uses Dart 1 constants
|
||||
|
||||
[ !$strong ]
|
||||
Language/Libraries_and_Scripts/Exports/reexport_t01: MissingCompileTimeError
|
||||
Language/Libraries_and_Scripts/Exports/reexport_t02: MissingCompileTimeError
|
||||
LibTest/async/Stream/Stream.fromIterable_A02_t01: RuntimeError # Assumes no close after error.
|
||||
LibTest/async/Stream/firstWhere_A01_t01: RuntimeError # co19 issue 137
|
||||
LibTest/async/Stream/firstWhere_A02_t01: RuntimeError # co19 issue 137
|
||||
LibTest/async/Stream/lastWhere_A01_t01: RuntimeError # co19 issue 137
|
||||
LibTest/async/Stream/lastWhere_A02_t01: RuntimeError # co19 issue 137
|
||||
LibTest/isolate/ReceivePort/firstWhere_A01_t01: RuntimeError # co19 issue 137
|
||||
LibTest/isolate/ReceivePort/firstWhere_A02_t01: RuntimeError # co19 issue 137
|
||||
LibTest/isolate/ReceivePort/lastWhere_A01_t01: RuntimeError # co19 issue 137
|
||||
LibTest/isolate/ReceivePort/lastWhere_A02_t01: RuntimeError # co19 issue 137
|
||||
|
||||
# Tests that fail on every runtime, but not on the analyzer.
|
||||
[ $compiler != dart2analyzer && $compiler != fasta ]
|
||||
Language/Classes/same_name_type_variable_t04: Pass, MissingCompileTimeError, Fail # Issue 14513,25525
|
||||
Language/Classes/same_name_type_variable_t07: Pass, MissingCompileTimeError, Fail # Issue 14513,25525
|
||||
Language/Expressions/Instance_Creation/Const/abstract_class_t01: Pass, Fail # co19 issue 66
|
||||
Language/Expressions/Instance_Creation/Const/abstract_class_t03: Pass, Fail # co19 issue 66
|
||||
LibTest/async/Stream/asBroadcastStream_A02_t01: Fail # co19 issue 687
|
||||
LibTest/async/StreamController/addStream_A03_t01: RuntimeError # Issue <TODO>
|
||||
LibTest/async/StreamSink/addStream_A01_t02: RuntimeError # Issue <TODO>
|
||||
LibTest/async/Zone/runBinaryGuarded_A01_t01: Fail # co19 issue 126
|
||||
LibTest/async/Zone/runGuarded_A01_t01: Fail # co19 issue 126
|
||||
LibTest/async/Zone/runUnaryGuarded_A01_t01: Fail # co19 issue 126
|
||||
LibTest/core/Expando/Expando_A03_t01: RuntimeError # Issue 17735
|
||||
LibTest/core/Expando/Expando_A03_t03: RuntimeError # Issue 17735
|
||||
LibTest/core/Expando/Expando_A03_t04: RuntimeError # Issue 17735
|
||||
LibTest/core/Expando/Expando_A03_t05: RuntimeError # Issue 17735
|
||||
LibTest/core/RegExp/Pattern_semantics/firstMatch_CharacterEscape_A06_t02: RuntimeError # co19 issue 741
|
||||
LibTest/core/RegExp/Pattern_semantics/firstMatch_DecimalEscape_A01_t02: Fail # co19 issue 740
|
||||
LibTest/core/Symbol/Symbol_A01_t04: RuntimeError # Issue 25804
|
||||
LibTest/isolate/IsolateStream/any_A01_t01: Fail # Co19 issue 639 (Fixed in r674)
|
||||
LibTest/isolate/IsolateStream/asBroadcastStream_A01_t01: Fail # Co19 issue 639
|
||||
LibTest/isolate/IsolateStream/contains_A01_t01: Fail # Co19 issue 639
|
||||
LibTest/isolate/IsolateStream/first_A01_t01: Fail # Co19 issue 639
|
||||
LibTest/isolate/IsolateStream/first_A02_t01: Fail # Co19 issue 639
|
||||
LibTest/isolate/IsolateStream/first_A02_t02: Fail # Co19 issue 639
|
||||
LibTest/isolate/IsolateStream/isBroadcast_A01_t01: Fail # Co19 issue 639
|
||||
LibTest/isolate/IsolateStream/isBroadcast_A01_t02: Fail # Co19 issue 639
|
||||
LibTest/isolate/IsolateStream/isEmpty_A01_t01: Fail # Co19 issue 639
|
||||
LibTest/isolate/IsolateStream/last_A01_t01: Fail # Co19 issue 639
|
||||
LibTest/isolate/IsolateStream/last_A02_t01: Fail # Co19 issue 639
|
||||
LibTest/isolate/IsolateStream/length_A01_t01: Fail # Co19 issue 639
|
||||
LibTest/isolate/IsolateStream/single_A01_t01: Fail # Co19 issue 639
|
||||
LibTest/isolate/IsolateStream/single_A02_t01: Fail # Co19 issue 639
|
||||
LibTest/isolate/ReceivePort/asBroadcastStream_A02_t01: Fail # co19 issue 687
|
||||
LibTest/isolate/ReceivePort/receive_A01_t01: Fail # Co19 issue 639
|
||||
LibTest/isolate/ReceivePort/receive_A01_t03: Fail # Co19 issue 639
|
||||
LibTest/isolate/ReceivePort/sendPort_A01_t01: Fail # Co19 issue 639
|
||||
LibTest/isolate/SendPort/call_A01_t01: Fail # Co19 issue 639
|
||||
LibTest/isolate/SendPort/send_A02_t02: Skip # co19 issue 493 (not fixed in r672)
|
||||
LibTest/isolate/SendPort/send_A02_t03: Skip # co19 issue 495 (not fixed in r672)
|
||||
LibTest/isolate/SendPort/send_A02_t04: Fail # Co19 issue 639
|
||||
LibTest/isolate/SendPort/send_A02_t05: Fail # Co19 issue 639
|
||||
LibTest/isolate/SendPort/send_A02_t06: Fail # Co19 issue 639
|
||||
LibTest/isolate/SendPort/send_A03_t01: Fail # Co19 issue 639
|
||||
LibTest/isolate/SendPort/send_A03_t02: Fail # Co19 issue 639
|
||||
LibTest/math/acos_A01_t01: Pass, Fail, OK # Issue 26261
|
||||
LibTest/math/asin_A01_t01: Pass, Fail, OK # Issue 26261
|
||||
LibTest/math/atan_A01_t01: Pass, Fail, OK # Issue 26261
|
||||
LibTest/math/cos_A01_t01: Pass, Fail, OK # Issue 26261
|
||||
LibTest/math/log_A01_t01: Pass, Fail, OK # Issue 26261
|
||||
LibTest/math/tan_A01_t01: Pass, Fail, OK # Issue 26261
|
||||
|
||||
[ $compiler != fasta && !$checked && !$strong ]
|
||||
Language/Expressions/Additive_Expressions/syntax_t01/07: MissingRuntimeError # Unchecked mode allows List + anything-with-a-zero-length
|
||||
|
||||
[ $compiler != fasta && $strong ]
|
||||
Language/Expressions/Additive_Expressions/syntax_t01/07: CompileTimeError
|
||||
LibTest/typed_data/Float32x4List/first_A01_t02: CompileTimeError # co19 issue 130 + type error
|
||||
LibTest/typed_data/Float32x4List/last_A01_t02: CompileTimeError # co19 issue 130 + type error
|
||||
|
||||
[ $runtime != none && !$checked ]
|
||||
LibTest/async/Future/catchError_A03_t05: RuntimeError
|
||||
|
||||
[ $runtime != none && !$strong ]
|
||||
LibTest/typed_data/Float32x4List/first_A01_t02: RuntimeError # co19 issue 130
|
||||
LibTest/typed_data/Float32x4List/last_A01_t02: RuntimeError # co19 issue 130
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,5 +0,0 @@
|
||||
# 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.
|
||||
|
||||
*: SkipByDesign # Deprecating Dart1 tests.
|
||||
@@ -6,7 +6,7 @@
|
||||
// literal might become an int at runtime.
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
import '../../language/compiler_annotations.dart';
|
||||
import '../../language_2/compiler_annotations.dart';
|
||||
|
||||
@DontInline()
|
||||
callWithStringAndDouble(value) {
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
// 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";
|
||||
|
||||
apply(Function function, List positional, Map<Symbol, dynamic> named) {
|
||||
return Function.apply(function, positional, named);
|
||||
}
|
||||
|
||||
void throwsNSME(function, positional, named) {
|
||||
Expect.throws(
|
||||
() => apply(function, positional, named), (e) => e is NoSuchMethodError);
|
||||
}
|
||||
|
||||
main() {
|
||||
var c1 = () => 'c1';
|
||||
var c2 = (a) => 'c2 $a';
|
||||
var c3 = ([a = 1]) => 'c3 $a';
|
||||
var c4 = ({a: 1}) => 'c4 $a';
|
||||
var c5 = ({a: 1, b: 2}) => 'c5 $a $b';
|
||||
var c6 = ({b: 1, a: 2}) => 'c6 $a $b';
|
||||
var c7 = (x, {b: 1, a: 2}) => 'c7 $x $a $b';
|
||||
var c8 = (x, y, [a = 2, b = 3]) => 'c8 $x $y $a $b';
|
||||
|
||||
Expect.equals('c1', apply(c1, null, null));
|
||||
Expect.equals('c1', apply(c1, [], null));
|
||||
Expect.equals('c1', apply(c1, [], {}));
|
||||
Expect.equals('c1', apply(c1, null, {}));
|
||||
throwsNSME(c1, [1], null);
|
||||
throwsNSME(c1, [1], {#a: 2});
|
||||
throwsNSME(c1, null, {#a: 2});
|
||||
|
||||
Expect.equals('c2 1', apply(c2, [1], null));
|
||||
Expect.equals('c2 1', apply(c2, [1], {}));
|
||||
throwsNSME(c2, null, null);
|
||||
throwsNSME(c2, [], null);
|
||||
throwsNSME(c2, null, {});
|
||||
throwsNSME(c2, null, {#a: 1});
|
||||
throwsNSME(c2, [2], {#a: 1});
|
||||
|
||||
Expect.equals('c3 1', apply(c3, null, null));
|
||||
Expect.equals('c3 1', apply(c3, [], null));
|
||||
Expect.equals('c3 2', apply(c3, [2], {}));
|
||||
throwsNSME(c3, [1, 2], null);
|
||||
throwsNSME(c3, null, {#a: 1});
|
||||
|
||||
Expect.equals('c4 1', apply(c4, [], null));
|
||||
Expect.equals('c4 2', apply(c4, [], {#a: 2}));
|
||||
Expect.equals('c4 1', apply(c4, null, null));
|
||||
Expect.equals('c4 1', apply(c4, [], {}));
|
||||
throwsNSME(c4, [1], {#a: 1});
|
||||
throwsNSME(c4, [1], {});
|
||||
throwsNSME(c4, [], {#a: 1, #b: 2});
|
||||
|
||||
Expect.equals('c5 1 2', apply(c5, [], null));
|
||||
Expect.equals('c5 3 2', apply(c5, [], {#a: 3}));
|
||||
Expect.equals('c5 1 2', apply(c5, null, null));
|
||||
Expect.equals('c5 1 2', apply(c5, [], {}));
|
||||
Expect.equals('c5 3 4', apply(c5, [], {#a: 3, #b: 4}));
|
||||
Expect.equals('c5 4 3', apply(c5, [], {#b: 3, #a: 4}));
|
||||
Expect.equals('c5 1 3', apply(c5, [], {#b: 3}));
|
||||
throwsNSME(c5, [1], {#a: 1});
|
||||
throwsNSME(c5, [1], {});
|
||||
throwsNSME(c5, [], {#a: 1, #b: 2, #c: 3});
|
||||
|
||||
Expect.equals('c6 2 1', apply(c6, [], null));
|
||||
Expect.equals('c6 3 1', apply(c6, [], {#a: 3}));
|
||||
Expect.equals('c6 2 1', apply(c6, null, null));
|
||||
Expect.equals('c6 2 1', apply(c6, [], {}));
|
||||
Expect.equals('c6 3 4', apply(c6, [], {#a: 3, #b: 4}));
|
||||
Expect.equals('c6 4 3', apply(c6, [], {#b: 3, #a: 4}));
|
||||
Expect.equals('c6 2 3', apply(c6, [], {#b: 3}));
|
||||
throwsNSME(c6, [1], {#a: 1});
|
||||
throwsNSME(c6, [1], {});
|
||||
throwsNSME(c6, [], {#a: 1, #b: 2, #c: 3});
|
||||
|
||||
Expect.equals('c7 7 2 1', apply(c7, [7], null));
|
||||
Expect.equals('c7 7 3 1', apply(c7, [7], {#a: 3}));
|
||||
Expect.equals('c7 7 2 1', apply(c7, [7], {}));
|
||||
Expect.equals('c7 7 3 4', apply(c7, [7], {#a: 3, #b: 4}));
|
||||
Expect.equals('c7 7 4 3', apply(c7, [7], {#b: 3, #a: 4}));
|
||||
Expect.equals('c7 7 2 3', apply(c7, [7], {#b: 3}));
|
||||
throwsNSME(c7, [], {#a: 1});
|
||||
throwsNSME(c7, [], {});
|
||||
throwsNSME(c7, [7], {#a: 1, #b: 2, #c: 3});
|
||||
|
||||
Expect.equals('c8 7 8 2 3', apply(c8, [7, 8], null));
|
||||
Expect.equals('c8 7 8 2 3', apply(c8, [7, 8], {}));
|
||||
Expect.equals('c8 7 8 3 3', apply(c8, [7, 8, 3], null));
|
||||
Expect.equals('c8 7 8 3 4', apply(c8, [7, 8, 3, 4], null));
|
||||
throwsNSME(c8, [], null);
|
||||
throwsNSME(c8, [], {});
|
||||
throwsNSME(c8, [1], null);
|
||||
throwsNSME(c8, [7, 8, 9, 10, 11], null);
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
// Copyright (c) 2013, 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.
|
||||
|
||||
// Test [Function.apply] on user-defined classes that implement [noSuchMethod].
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
import 'dart:mirrors';
|
||||
|
||||
class F {
|
||||
call([p1]) => "call";
|
||||
noSuchMethod(Invocation invocation) => "NSM";
|
||||
}
|
||||
|
||||
class G {
|
||||
call() => '42';
|
||||
noSuchMethod(Invocation invocation) => invocation;
|
||||
}
|
||||
|
||||
class H {
|
||||
call(required, {a}) => required + a;
|
||||
}
|
||||
|
||||
main() {
|
||||
Expect.equals('call', Function.apply(new F(), []));
|
||||
Expect.equals('call', Function.apply(new F(), [1]));
|
||||
Expect.equals('NSM', Function.apply(new F(), [1, 2]));
|
||||
Expect.equals('NSM', Function.apply(new F(), [1, 2, 3]));
|
||||
|
||||
var symbol = const Symbol('a');
|
||||
var requiredParameters = [1];
|
||||
var optionalParameters = new Map()..[symbol] = 42;
|
||||
Invocation i =
|
||||
Function.apply(new G(), requiredParameters, optionalParameters);
|
||||
|
||||
Expect.equals(const Symbol('call'), i.memberName);
|
||||
Expect.listEquals(requiredParameters, i.positionalArguments);
|
||||
Expect.mapEquals(optionalParameters, i.namedArguments);
|
||||
Expect.isTrue(i.isMethod);
|
||||
Expect.isFalse(i.isGetter);
|
||||
Expect.isFalse(i.isSetter);
|
||||
Expect.isFalse(i.isAccessor);
|
||||
|
||||
// Check that changing the passed list and map for parameters does
|
||||
// not affect [i].
|
||||
requiredParameters[0] = 42;
|
||||
optionalParameters[symbol] = 12;
|
||||
Expect.listEquals([1], i.positionalArguments);
|
||||
Expect.mapEquals(new Map()..[symbol] = 42, i.namedArguments);
|
||||
|
||||
// Check that using [i] for invocation yields the same [Invocation]
|
||||
// object.
|
||||
var mirror = reflect(new G());
|
||||
Invocation other = mirror.delegate(i);
|
||||
Expect.equals(i.memberName, other.memberName);
|
||||
Expect.listEquals(i.positionalArguments, other.positionalArguments);
|
||||
Expect.mapEquals(i.namedArguments, other.namedArguments);
|
||||
Expect.equals(i.isMethod, other.isMethod);
|
||||
Expect.equals(i.isGetter, other.isGetter);
|
||||
Expect.equals(i.isSetter, other.isSetter);
|
||||
Expect.equals(i.isAccessor, other.isAccessor);
|
||||
|
||||
// Test that [i] can be used to hit an existing method.
|
||||
Expect.equals(43, new H().call(1, a: 42));
|
||||
Expect.equals(43, Function.apply(new H(), [1], new Map()..[symbol] = 42));
|
||||
mirror = reflect(new H());
|
||||
Expect.equals(43, mirror.delegate(i));
|
||||
Expect.equals(43, mirror.delegate(other));
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
// Copyright (c) 2015, 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";
|
||||
|
||||
// Testing Function.apply calls work correctly for arities that are not
|
||||
// otherwise present in the program (and thus might not have stubs
|
||||
// generated).
|
||||
|
||||
class A {
|
||||
foo(x, [y, z, a, b, c, d = 99, e, f, g, h, i, j]) => "$x $d";
|
||||
}
|
||||
|
||||
main() {
|
||||
var a = new A();
|
||||
var clos = a.foo;
|
||||
Expect.equals(Function.apply(clos, ["well"]), "well 99");
|
||||
Expect.equals(Function.apply(clos, ["well", 0, 2, 4, 3, 6, 9, 10]), "well 9");
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
// Copyright (c) 2016, 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";
|
||||
|
||||
// Testing that, when compiled to JS, Function.apply works correctly for
|
||||
// functions with that will be invoked directly vs using .apply().
|
||||
|
||||
class A {
|
||||
foo([a = 10, b = 20, c = 30, d = 40, e = 50]) => "$a $b $c $d $e";
|
||||
}
|
||||
|
||||
main() {
|
||||
var a = new A();
|
||||
var clos = a.foo;
|
||||
Expect.equals(Function.apply(clos, []), "10 20 30 40 50");
|
||||
Expect.equals(Function.apply(clos, [11]), "11 20 30 40 50");
|
||||
Expect.equals(Function.apply(clos, [11, 21]), "11 21 30 40 50");
|
||||
Expect.equals(Function.apply(clos, [11, 21, 31]), "11 21 31 40 50");
|
||||
Expect.equals(Function.apply(clos, [11, 21, 31, 41]), "11 21 31 41 50");
|
||||
Expect.equals(Function.apply(clos, [11, 21, 31, 41, 51]), "11 21 31 41 51");
|
||||
}
|
||||
@@ -1,76 +0,0 @@
|
||||
// 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";
|
||||
import "symbol_map_helper.dart";
|
||||
|
||||
// Testing Function.apply calls correctly.
|
||||
// This test is not testing error handling, only that correct parameters
|
||||
// cause a correct call.
|
||||
|
||||
int test0() => 42;
|
||||
int test0a({int a}) => 37 + a;
|
||||
int test1(int i) => i + 1;
|
||||
int test1a(int i, {int a}) => i + a;
|
||||
int test2(int i, int j) => i + j;
|
||||
int test2a(int i, int j, {int a}) => i + j + a;
|
||||
|
||||
class C {
|
||||
int x = 10;
|
||||
int foo(y) => this.x + y;
|
||||
}
|
||||
|
||||
class Callable {
|
||||
int call(int x, int y) => x + y;
|
||||
}
|
||||
|
||||
@NoInline()
|
||||
@AssumeDynamic()
|
||||
confuse(x) => x;
|
||||
|
||||
main() {
|
||||
testMap(res, func, map) {
|
||||
map = symbolMapToStringMap(map);
|
||||
Expect.equals(res, Function.apply(func, null, map));
|
||||
Expect.equals(res, Function.apply(func, [], map));
|
||||
}
|
||||
|
||||
testList(res, func, list) {
|
||||
Expect.equals(res, Function.apply(func, list));
|
||||
Expect.equals(res, Function.apply(func, list, null));
|
||||
Expect.equals(res, Function.apply(func, list, new Map<Symbol, dynamic>()));
|
||||
}
|
||||
|
||||
test(res, func, list, map) {
|
||||
map = symbolMapToStringMap(map);
|
||||
Expect.equals(res, Function.apply(func, list, map));
|
||||
}
|
||||
|
||||
testList(42, test0, null);
|
||||
testList(42, test0, []);
|
||||
testMap(42, test0a, {"a": 5});
|
||||
testList(42, test1, [41]);
|
||||
test(42, test1a, [20], {"a": 22});
|
||||
testList(42, test2, [20, 22]);
|
||||
test(42, test2a, [10, 15], {"a": 17});
|
||||
|
||||
// Test that "this" is correct when calling closurized functions.
|
||||
var cfoo = new C().foo;
|
||||
testList(42, cfoo, [32]);
|
||||
|
||||
// Test that apply works even with a different name.
|
||||
var app = confuse(Function.apply);
|
||||
Expect.equals(42, app(test2, [22, 20]));
|
||||
|
||||
// Test that apply can itself be applied.
|
||||
Expect.equals(
|
||||
42,
|
||||
Function.apply(Function.apply, [
|
||||
test2,
|
||||
[17, 25]
|
||||
]));
|
||||
|
||||
// Test that apply works on callable objects.
|
||||
testList(42, new Callable(), [13, 29]);
|
||||
}
|
||||
@@ -1,447 +0,0 @@
|
||||
// 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.
|
||||
|
||||
// Testing Bigints with and without intrinsics.
|
||||
// VMOptions=
|
||||
// VMOptions=--no_intrinsify
|
||||
// VMOptions=--no-background-compilation
|
||||
// VMOptions=--optimization_counter_threshold=10 --no-background_compilation
|
||||
|
||||
library big_integer_test;
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
|
||||
foo() => 1234567890123456789;
|
||||
bar() => 12345678901234567890;
|
||||
|
||||
testSmiOverflow() {
|
||||
var a = 1073741823;
|
||||
var b = 1073741822;
|
||||
Expect.equals(2147483645, a + b);
|
||||
a = -1000000000;
|
||||
b = 1000000001;
|
||||
Expect.equals(-2000000001, a - b);
|
||||
Expect.equals(-1000000001000000000, a * b);
|
||||
}
|
||||
|
||||
testBigintAdd() {
|
||||
// Bigint and Smi.
|
||||
var a = 12345678901234567890;
|
||||
var b = 2;
|
||||
Expect.equals(12345678901234567892, a + b);
|
||||
Expect.equals(12345678901234567892, b + a);
|
||||
// Bigint and Bigint.
|
||||
a = 10000000000000000001;
|
||||
Expect.equals(20000000000000000002, a + a);
|
||||
// Bigint and double.
|
||||
a = 100000000000000000000.0;
|
||||
b = 200000000000000000000;
|
||||
Expect.isTrue((a + b) is double);
|
||||
Expect.equals(300000000000000000000.0, a + b);
|
||||
Expect.isTrue((b + a) is double);
|
||||
Expect.equals(300000000000000000000.0, b + a);
|
||||
}
|
||||
|
||||
testBigintSub() {
|
||||
// Bigint and Smi.
|
||||
var a = 12345678901234567890;
|
||||
var b = 2;
|
||||
Expect.equals(12345678901234567888, a - b);
|
||||
Expect.equals(-12345678901234567888, b - a);
|
||||
// Bigint and Bigint.
|
||||
a = 10000000000000000001;
|
||||
Expect.equals(20000000000000000002, a + a);
|
||||
// Bigint and double.
|
||||
a = 100000000000000000000.0;
|
||||
b = 200000000000000000000;
|
||||
Expect.isTrue((a + b) is double);
|
||||
Expect.equals(-100000000000000000000.0, a - b);
|
||||
Expect.isTrue((b + a) is double);
|
||||
Expect.equals(100000000000000000000.0, b - a);
|
||||
Expect.equals(-1, 0xF00000000 - 0xF00000001);
|
||||
}
|
||||
|
||||
testBigintMul() {
|
||||
// Bigint and Smi.
|
||||
var a = 12345678901234567890;
|
||||
var b = 10;
|
||||
Expect.equals(123456789012345678900, a * b);
|
||||
Expect.equals(123456789012345678900, b * a);
|
||||
// Bigint and Bigint.
|
||||
a = 12345678901234567890;
|
||||
b = 10000000000000000;
|
||||
Expect.equals(123456789012345678900000000000000000, a * b);
|
||||
// Bigint and double.
|
||||
a = 2.0;
|
||||
b = 200000000000000000000;
|
||||
Expect.isTrue((a * b) is double);
|
||||
Expect.equals(400000000000000000000.0, a * b);
|
||||
Expect.isTrue((b * a) is double);
|
||||
Expect.equals(400000000000000000000.0, b * a);
|
||||
}
|
||||
|
||||
testBigintTruncDiv() {
|
||||
var a = 12345678901234567890;
|
||||
var b = 10;
|
||||
// Bigint and Smi.
|
||||
Expect.equals(1234567890123456789, a ~/ b);
|
||||
Expect.equals(0, b ~/ a);
|
||||
Expect.equals(123456789, 123456789012345678 ~/ 1000000000);
|
||||
// Bigint and Bigint.
|
||||
a = 12345678901234567890;
|
||||
b = 10000000000000000;
|
||||
Expect.equals(1234, a ~/ b);
|
||||
// Bigint and double.
|
||||
a = 100000000000000000000.0;
|
||||
b = 200000000000000000000;
|
||||
Expect.equals(0, a ~/ b);
|
||||
Expect.equals(2, b ~/ a);
|
||||
}
|
||||
|
||||
testBigintDiv() {
|
||||
// Bigint and Smi.
|
||||
Expect.equals(1234567890123456789.1, 12345678901234567891 / 10);
|
||||
Expect.equals(0.000000001234, 1234 / 1000000000000);
|
||||
Expect.equals(12345678901234000000.0, 123456789012340000000 / 10);
|
||||
// Bigint and Bigint.
|
||||
var a = 12345670000000000000;
|
||||
var b = 10000000000000000;
|
||||
Expect.equals(1234.567, a / b);
|
||||
// Bigint and double.
|
||||
a = 400000000000000000000.0;
|
||||
b = 200000000000000000000;
|
||||
Expect.equals(2.0, a / b);
|
||||
Expect.equals(0.5, b / a);
|
||||
}
|
||||
|
||||
testBigintModulo() {
|
||||
// Bigint and Smi.
|
||||
var a = 1000000000005;
|
||||
var b = 10;
|
||||
Expect.equals(5, a % b);
|
||||
Expect.equals(10, b % a);
|
||||
// Bigint & Bigint
|
||||
a = 10000000000000000001;
|
||||
b = 10000000000000000000;
|
||||
Expect.equals(1, a % b);
|
||||
Expect.equals(10000000000000000000, b % a);
|
||||
// Bigint & double.
|
||||
a = 10000000100000000.0;
|
||||
b = 10000000000000000;
|
||||
Expect.equals(100000000.0, a % b);
|
||||
Expect.equals(10000000000000000.0, b % a);
|
||||
// Transitioning from Mint to Bigint.
|
||||
var iStart = 4611686018427387900;
|
||||
var prevX = -23 % iStart;
|
||||
for (int i = iStart + 1; i < iStart + 10; i++) {
|
||||
var x = -23 % i;
|
||||
Expect.equals(1, x - prevX);
|
||||
Expect.isTrue(x > 0);
|
||||
prevX = x;
|
||||
}
|
||||
}
|
||||
|
||||
testBigintModPow() {
|
||||
var x, e, m;
|
||||
x = 1234567890;
|
||||
e = 1000000001;
|
||||
m = 19;
|
||||
Expect.equals(11, x.modPow(e, m));
|
||||
x = 1234567890;
|
||||
e = 19;
|
||||
m = 1000000001;
|
||||
Expect.equals(122998977, x.modPow(e, m));
|
||||
x = 19;
|
||||
e = 1234567890;
|
||||
m = 1000000001;
|
||||
Expect.equals(619059596, x.modPow(e, m));
|
||||
x = 19;
|
||||
e = 1000000001;
|
||||
m = 1234567890;
|
||||
Expect.equals(84910879, x.modPow(e, m));
|
||||
x = 1000000001;
|
||||
e = 19;
|
||||
m = 1234567890;
|
||||
Expect.equals(872984351, x.modPow(e, m));
|
||||
x = 1000000001;
|
||||
e = 1234567890;
|
||||
m = 19;
|
||||
Expect.equals(0, x.modPow(e, m));
|
||||
x = 12345678901234567890;
|
||||
e = 10000000000000000001;
|
||||
m = 19;
|
||||
Expect.equals(2, x.modPow(e, m));
|
||||
x = 12345678901234567890;
|
||||
e = 19;
|
||||
m = 10000000000000000001;
|
||||
Expect.equals(3239137215315834625, x.modPow(e, m));
|
||||
x = 19;
|
||||
e = 12345678901234567890;
|
||||
m = 10000000000000000001;
|
||||
Expect.equals(4544207837373941034, x.modPow(e, m));
|
||||
x = 19;
|
||||
e = 10000000000000000001;
|
||||
m = 12345678901234567890;
|
||||
Expect.equals(11135411705397624859, x.modPow(e, m));
|
||||
x = 10000000000000000001;
|
||||
e = 19;
|
||||
m = 12345678901234567890;
|
||||
Expect.equals(2034013733189773841, x.modPow(e, m));
|
||||
x = 10000000000000000001;
|
||||
e = 12345678901234567890;
|
||||
m = 19;
|
||||
Expect.equals(1, x.modPow(e, m));
|
||||
x = 12345678901234567890;
|
||||
e = 19;
|
||||
m = 10000000000000000001;
|
||||
Expect.equals(3239137215315834625, x.modPow(e, m));
|
||||
x = 12345678901234567890;
|
||||
e = 10000000000000000001;
|
||||
m = 19;
|
||||
Expect.equals(2, x.modPow(e, m));
|
||||
x = 123456789012345678901234567890;
|
||||
e = 123456789012345678901234567891;
|
||||
m = 123456789012345678901234567899;
|
||||
Expect.equals(116401406051033429924651549616, x.modPow(e, m));
|
||||
x = 123456789012345678901234567890;
|
||||
e = 123456789012345678901234567899;
|
||||
m = 123456789012345678901234567891;
|
||||
Expect.equals(123456789012345678901234567890, x.modPow(e, m));
|
||||
x = 123456789012345678901234567899;
|
||||
e = 123456789012345678901234567890;
|
||||
m = 123456789012345678901234567891;
|
||||
Expect.equals(35088523091000351053091545070, x.modPow(e, m));
|
||||
x = 123456789012345678901234567899;
|
||||
e = 123456789012345678901234567891;
|
||||
m = 123456789012345678901234567890;
|
||||
Expect.equals(18310047270234132455316941949, x.modPow(e, m));
|
||||
x = 123456789012345678901234567891;
|
||||
e = 123456789012345678901234567899;
|
||||
m = 123456789012345678901234567890;
|
||||
Expect.equals(1, x.modPow(e, m));
|
||||
x = 123456789012345678901234567891;
|
||||
e = 123456789012345678901234567890;
|
||||
m = 123456789012345678901234567899;
|
||||
Expect.equals(40128068573873018143207285483, x.modPow(e, m));
|
||||
}
|
||||
|
||||
testBigintModInverse() {
|
||||
var x, m;
|
||||
x = 1;
|
||||
m = 1;
|
||||
Expect.equals(0, x.modInverse(m));
|
||||
x = 0;
|
||||
m = 1000000001;
|
||||
Expect.throws(() => x.modInverse(m), (e) => e is Exception); // Not coprime.
|
||||
x = 1234567890;
|
||||
m = 19;
|
||||
Expect.equals(11, x.modInverse(m));
|
||||
x = 1234567890;
|
||||
m = 1000000001;
|
||||
Expect.equals(189108911, x.modInverse(m));
|
||||
x = 19;
|
||||
m = 1000000001;
|
||||
Expect.throws(() => x.modInverse(m), (e) => e is Exception); // Not coprime.
|
||||
x = 19;
|
||||
m = 1234567890;
|
||||
Expect.equals(519818059, x.modInverse(m));
|
||||
x = 1000000001;
|
||||
m = 1234567890;
|
||||
Expect.equals(1001100101, x.modInverse(m));
|
||||
x = 1000000001;
|
||||
m = 19;
|
||||
Expect.throws(() => x.modInverse(m), (e) => e is Exception); // Not coprime.
|
||||
x = 12345678901234567890;
|
||||
m = 19;
|
||||
Expect.equals(3, x.modInverse(m));
|
||||
x = 12345678901234567890;
|
||||
m = 10000000000000000001;
|
||||
Expect.equals(9736746307686209582, x.modInverse(m));
|
||||
x = 19;
|
||||
m = 10000000000000000001;
|
||||
Expect.equals(6315789473684210527, x.modInverse(m));
|
||||
x = 19;
|
||||
m = 12345678901234567890;
|
||||
Expect.equals(10396361179987004539, x.modInverse(m));
|
||||
x = 10000000000000000001;
|
||||
m = 12345678901234567890;
|
||||
Expect.equals(325004555487045911, x.modInverse(m));
|
||||
x = 10000000000000000001;
|
||||
m = 19;
|
||||
Expect.equals(7, x.modInverse(m));
|
||||
x = 12345678901234567890;
|
||||
m = 10000000000000000001;
|
||||
Expect.equals(9736746307686209582, x.modInverse(m));
|
||||
x = 12345678901234567890;
|
||||
m = 19;
|
||||
Expect.equals(3, x.modInverse(m));
|
||||
x = 123456789012345678901234567890;
|
||||
m = 123456789012345678901234567899;
|
||||
Expect.throws(() => x.modInverse(m), (e) => e is Exception); // Not coprime.
|
||||
x = 123456789012345678901234567890;
|
||||
m = 123456789012345678901234567891;
|
||||
Expect.equals(123456789012345678901234567890, x.modInverse(m));
|
||||
x = 123456789012345678901234567899;
|
||||
m = 123456789012345678901234567891;
|
||||
Expect.equals(77160493132716049313271604932, x.modInverse(m));
|
||||
x = 123456789012345678901234567899;
|
||||
m = 123456789012345678901234567890;
|
||||
Expect.throws(() => x.modInverse(m), (e) => e is Exception); // Not coprime.
|
||||
x = 123456789012345678901234567891;
|
||||
m = 123456789012345678901234567890;
|
||||
Expect.equals(1, x.modInverse(m));
|
||||
x = 123456789012345678901234567891;
|
||||
m = 123456789012345678901234567899;
|
||||
Expect.equals(46296295879629629587962962962, x.modInverse(m));
|
||||
}
|
||||
|
||||
testBigintGcd() {
|
||||
var x, m;
|
||||
x = 1;
|
||||
m = 1;
|
||||
Expect.equals(1, x.gcd(m));
|
||||
x = 693;
|
||||
m = 609;
|
||||
Expect.equals(21, x.gcd(m));
|
||||
x = 693 << 40;
|
||||
m = 609 << 40;
|
||||
Expect.equals(21 << 40, x.gcd(m));
|
||||
x = 609 << 40;
|
||||
;
|
||||
m = 693 << 40;
|
||||
;
|
||||
Expect.equals(21 << 40, x.gcd(m));
|
||||
x = 0;
|
||||
m = 1000000001;
|
||||
Expect.equals(m, x.gcd(m));
|
||||
x = 1000000001;
|
||||
m = 0;
|
||||
Expect.equals(x, x.gcd(m));
|
||||
x = 0;
|
||||
m = -1000000001;
|
||||
Expect.equals(-m, x.gcd(m));
|
||||
x = -1000000001;
|
||||
m = 0;
|
||||
Expect.equals(-x, x.gcd(m));
|
||||
x = 0;
|
||||
m = 0;
|
||||
Expect.equals(0, x.gcd(m));
|
||||
x = 0;
|
||||
m = 123456789012345678901234567890;
|
||||
Expect.equals(m, x.gcd(m));
|
||||
x = 123456789012345678901234567890;
|
||||
m = 0;
|
||||
Expect.equals(x, x.gcd(m));
|
||||
x = 0;
|
||||
m = -123456789012345678901234567890;
|
||||
Expect.equals(-m, x.gcd(m));
|
||||
x = -123456789012345678901234567890;
|
||||
m = 0;
|
||||
Expect.equals(-x, x.gcd(m));
|
||||
x = 1234567890;
|
||||
m = 19;
|
||||
Expect.equals(1, x.gcd(m));
|
||||
x = 1234567890;
|
||||
m = 1000000001;
|
||||
Expect.equals(1, x.gcd(m));
|
||||
x = 19;
|
||||
m = 1000000001;
|
||||
Expect.equals(19, x.gcd(m));
|
||||
x = 19;
|
||||
m = 1234567890;
|
||||
Expect.equals(1, x.gcd(m));
|
||||
x = 1000000001;
|
||||
m = 1234567890;
|
||||
Expect.equals(1, x.gcd(m));
|
||||
x = 1000000001;
|
||||
m = 19;
|
||||
Expect.equals(19, x.gcd(m));
|
||||
x = 12345678901234567890;
|
||||
m = 19;
|
||||
Expect.equals(1, x.gcd(m));
|
||||
x = 12345678901234567890;
|
||||
m = 10000000000000000001;
|
||||
Expect.equals(1, x.gcd(m));
|
||||
x = 19;
|
||||
m = 10000000000000000001;
|
||||
Expect.equals(1, x.gcd(m));
|
||||
x = 19;
|
||||
m = 12345678901234567890;
|
||||
Expect.equals(1, x.gcd(m));
|
||||
x = 10000000000000000001;
|
||||
m = 12345678901234567890;
|
||||
Expect.equals(1, x.gcd(m));
|
||||
x = 10000000000000000001;
|
||||
m = 19;
|
||||
Expect.equals(1, x.gcd(m));
|
||||
x = 12345678901234567890;
|
||||
m = 10000000000000000001;
|
||||
Expect.equals(1, x.gcd(m));
|
||||
x = 12345678901234567890;
|
||||
m = 19;
|
||||
Expect.equals(1, x.gcd(m));
|
||||
x = 123456789012345678901234567890;
|
||||
m = 123456789012345678901234567899;
|
||||
Expect.equals(9, x.gcd(m));
|
||||
x = 123456789012345678901234567890;
|
||||
m = 123456789012345678901234567891;
|
||||
Expect.equals(1, x.gcd(m));
|
||||
x = 123456789012345678901234567899;
|
||||
m = 123456789012345678901234567891;
|
||||
Expect.equals(1, x.gcd(m));
|
||||
x = 123456789012345678901234567899;
|
||||
m = 123456789012345678901234567890;
|
||||
Expect.equals(9, x.gcd(m));
|
||||
x = 123456789012345678901234567891;
|
||||
m = 123456789012345678901234567890;
|
||||
Expect.equals(1, x.gcd(m));
|
||||
x = 123456789012345678901234567891;
|
||||
m = 123456789012345678901234567899;
|
||||
Expect.equals(1, x.gcd(m));
|
||||
}
|
||||
|
||||
testBigintNegate() {
|
||||
var a = 0xF000000000000000F;
|
||||
var b = ~a; // negate.
|
||||
Expect.equals(-0xF0000000000000010, b);
|
||||
Expect.equals(0, a & b);
|
||||
Expect.equals(-1, a | b);
|
||||
}
|
||||
|
||||
testShiftAmount() {
|
||||
Expect.equals(0, 12 >> 111111111111111111111111111111);
|
||||
Expect.equals(-1, -12 >> 111111111111111111111111111111);
|
||||
bool exceptionCaught = false;
|
||||
try {
|
||||
var a = 1 << 1111111111111111111111111111;
|
||||
} on OutOfMemoryError catch (e) {
|
||||
exceptionCaught = true;
|
||||
}
|
||||
Expect.equals(true, exceptionCaught);
|
||||
}
|
||||
|
||||
main() {
|
||||
for (int i = 0; i < 10; i++) {
|
||||
Expect.equals(1234567890123456789, foo());
|
||||
Expect.equals(12345678901234567890, bar());
|
||||
testSmiOverflow(); // //# overflow: ok
|
||||
testBigintAdd(); // //# add: ok
|
||||
testBigintSub(); // //# sub: ok
|
||||
testBigintMul(); // //# mul: ok
|
||||
testBigintTruncDiv(); // //# trunDiv: ok
|
||||
testBigintDiv(); // //# div: ok
|
||||
testBigintModulo(); // //# mod: ok
|
||||
testBigintModPow(); // //# modPow: ok
|
||||
testBigintModInverse(); // //# modInv: ok
|
||||
testBigintGcd(); // //# gcd: ok
|
||||
testBigintNegate(); // //# negate: ok
|
||||
testShiftAmount(); // //# shift: ok
|
||||
Expect.equals(12345678901234567890, (12345678901234567890).abs());
|
||||
Expect.equals(12345678901234567890, (-12345678901234567890).abs());
|
||||
var a = 10000000000000000000;
|
||||
var b = 10000000000000000001;
|
||||
Expect.equals(false, a.hashCode == b.hashCode);
|
||||
Expect.equals(true, a.hashCode == (b - 1).hashCode);
|
||||
}
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
// 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.
|
||||
|
||||
// Testing Bigints with and without intrinsics.
|
||||
// VMOptions=
|
||||
// VMOptions=--no_intrinsify
|
||||
|
||||
library big_integer_test;
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
|
||||
testBigintHugeMul() {
|
||||
var bits = 65536;
|
||||
var a = 1 << bits;
|
||||
var a1 = a - 1; // all 1's
|
||||
var p1 = a1 * a1;
|
||||
var p2 = a * a - a - a + 1;
|
||||
// Use isTrue instead of equals to avoid trying to print such big numbers.
|
||||
Expect.isTrue(p1 == p2, 'products do not match');
|
||||
}
|
||||
|
||||
main() {
|
||||
testBigintHugeMul();
|
||||
}
|
||||
@@ -1,601 +0,0 @@
|
||||
// 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.
|
||||
|
||||
// Testing Bigints with and without intrinsics.
|
||||
// VMOptions=
|
||||
// VMOptions=--no_intrinsify
|
||||
|
||||
library big_integer_test;
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
|
||||
addSubParsed(String a, String b, String sum) {
|
||||
int int_a = int.parse(a);
|
||||
int int_b = int.parse(b);
|
||||
int int_sum = int.parse(sum);
|
||||
int computed_sum = int_a + int_b;
|
||||
Expect.equals(int_sum, computed_sum);
|
||||
String str_sum = computed_sum >= 0
|
||||
? "0x${computed_sum.toRadixString(16)}"
|
||||
: "-0x${(-computed_sum).toRadixString(16)}";
|
||||
Expect.equals(sum.toLowerCase(), str_sum);
|
||||
int computed_difference1 = int_sum - int_a;
|
||||
Expect.equals(int_b, computed_difference1);
|
||||
String str_difference1 = computed_difference1 >= 0
|
||||
? "0x${computed_difference1.toRadixString(16)}"
|
||||
: "-0x${(-computed_difference1).toRadixString(16)}";
|
||||
Expect.equals(b.toLowerCase(), str_difference1);
|
||||
int computed_difference2 = int_sum - int_b;
|
||||
Expect.equals(int_a, computed_difference2);
|
||||
String str_difference2 = computed_difference2 >= 0
|
||||
? "0x${computed_difference2.toRadixString(16)}"
|
||||
: "-0x${(-computed_difference2).toRadixString(16)}";
|
||||
Expect.equals(a.toLowerCase(), str_difference2);
|
||||
}
|
||||
|
||||
testBigintAddSub() {
|
||||
String zero = "0x0";
|
||||
String one = "0x1";
|
||||
String minus_one = "-0x1";
|
||||
|
||||
addSubParsed(zero, zero, zero);
|
||||
addSubParsed(zero, one, one);
|
||||
addSubParsed(one, zero, one);
|
||||
addSubParsed(one, one, "0x2");
|
||||
addSubParsed(minus_one, minus_one, "-0x2");
|
||||
addSubParsed("0x123", zero, "0x123");
|
||||
addSubParsed(zero, "0x123", "0x123");
|
||||
addSubParsed("0x123", one, "0x124");
|
||||
addSubParsed(one, "0x123", "0x124");
|
||||
addSubParsed(
|
||||
"0xFFFFFFF",
|
||||
one, // 28 bit overflow.
|
||||
"0x10000000");
|
||||
addSubParsed(
|
||||
"0xFFFFFFFF",
|
||||
one, // 32 bit overflow.
|
||||
"0x100000000");
|
||||
addSubParsed(
|
||||
"0xFFFFFFFFFFFFFF",
|
||||
one, // 56 bit overflow.
|
||||
"0x100000000000000");
|
||||
addSubParsed(
|
||||
"0xFFFFFFFFFFFFFFFF",
|
||||
one, // 64 bit overflow.
|
||||
"0x10000000000000000");
|
||||
addSubParsed(
|
||||
"0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", // 128 bit.
|
||||
one,
|
||||
"0x100000000000000000000000000000000");
|
||||
addSubParsed("0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", one,
|
||||
"0x10000000000000000000000000000000000000000000");
|
||||
addSubParsed(
|
||||
"0x8000000", // 28 bit overflow.
|
||||
"0x8000000",
|
||||
"0x10000000");
|
||||
addSubParsed(
|
||||
"0x80000000", // 32 bit overflow.
|
||||
"0x80000000",
|
||||
"0x100000000");
|
||||
addSubParsed(
|
||||
"0x80000000000000", // 56 bit overflow.
|
||||
"0x80000000000000",
|
||||
"0x100000000000000");
|
||||
addSubParsed(
|
||||
"0x8000000000000000", // 64 bit overflow.
|
||||
"0x8000000000000000",
|
||||
"0x10000000000000000");
|
||||
addSubParsed(
|
||||
"0x80000000000000000000000000000000", // 128 bit.
|
||||
"0x80000000000000000000000000000000",
|
||||
"0x100000000000000000000000000000000");
|
||||
addSubParsed(
|
||||
"0x8000000000000000000000000000000000000000000",
|
||||
"0x8000000000000000000000000000000000000000000",
|
||||
"0x10000000000000000000000000000000000000000000");
|
||||
|
||||
{
|
||||
String a = "0x123456789ABCDEF01234567890ABCDEF0123456789ABCDEF0";
|
||||
String sum1 = "0x123456789ABCDEF01234567890ABCDEF0123456789ABCDEF1";
|
||||
String times2 = "0x2468ACF13579BDE02468ACF121579BDE02468ACF13579BDE0";
|
||||
addSubParsed(a, zero, a);
|
||||
addSubParsed(a, one, sum1);
|
||||
addSubParsed(a, a, times2);
|
||||
}
|
||||
|
||||
addSubParsed("-0x123", minus_one, "-0x124");
|
||||
addSubParsed(minus_one, "-0x123", "-0x124");
|
||||
addSubParsed(
|
||||
"-0xFFFFFFF",
|
||||
minus_one, // 28 bit overflow.
|
||||
"-0x10000000");
|
||||
addSubParsed(
|
||||
"-0xFFFFFFFF",
|
||||
minus_one, // 32 bit overflow.
|
||||
"-0x100000000");
|
||||
addSubParsed(
|
||||
"-0xFFFFFFFFFFFFFF",
|
||||
minus_one, // 56 bit overflow.
|
||||
"-0x100000000000000");
|
||||
addSubParsed(
|
||||
"-0xFFFFFFFFFFFFFFFF",
|
||||
minus_one, // 64 bit overflow.
|
||||
"-0x10000000000000000");
|
||||
addSubParsed(
|
||||
"-0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", // 128 bit.
|
||||
minus_one,
|
||||
"-0x100000000000000000000000000000000");
|
||||
addSubParsed("-0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", minus_one,
|
||||
"-0x10000000000000000000000000000000000000000000");
|
||||
addSubParsed(
|
||||
"-0x8000000", // 28 bit overflow.
|
||||
"-0x8000000",
|
||||
"-0x10000000");
|
||||
addSubParsed(
|
||||
"-0x80000000", // 32 bit overflow.
|
||||
"-0x80000000",
|
||||
"-0x100000000");
|
||||
addSubParsed(
|
||||
"-0x80000000000000", // 56 bit overflow.
|
||||
"-0x80000000000000",
|
||||
"-0x100000000000000");
|
||||
addSubParsed(
|
||||
"-0x8000000000000000", // 64 bit overflow.
|
||||
"-0x8000000000000000",
|
||||
"-0x10000000000000000");
|
||||
addSubParsed(
|
||||
"-0x80000000000000000000000000000000", // 128 bit.
|
||||
"-0x80000000000000000000000000000000",
|
||||
"-0x100000000000000000000000000000000");
|
||||
addSubParsed(
|
||||
"-0x8000000000000000000000000000000000000000000",
|
||||
"-0x8000000000000000000000000000000000000000000",
|
||||
"-0x10000000000000000000000000000000000000000000");
|
||||
|
||||
{
|
||||
String a = "-0x123456789ABCDEF01234567890ABCDEF0123456789ABCDEF0";
|
||||
String sum1 = "-0x123456789ABCDEF01234567890ABCDEF0123456789ABCDEF1";
|
||||
String times2 = "-0x2468ACF13579BDE02468ACF121579BDE02468ACF13579BDE0";
|
||||
addSubParsed(a, zero, a);
|
||||
addSubParsed(a, minus_one, sum1);
|
||||
addSubParsed(a, a, times2);
|
||||
}
|
||||
|
||||
addSubParsed("0x10000000000000000000000000000000000000000000", "0xFFFF",
|
||||
"0x1000000000000000000000000000000000000000FFFF");
|
||||
addSubParsed("0x10000000000000000000000000000000000000000000",
|
||||
"0xFFFF00000000", "0x10000000000000000000000000000000FFFF00000000");
|
||||
addSubParsed("0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", "0x100000000",
|
||||
"0x1000000000000000000000000000000000000FFFFFFFF");
|
||||
addSubParsed(
|
||||
"0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF",
|
||||
"0x10000000000000000000",
|
||||
"0x10000000000000000000000000FFFFFFFFFFFFFFFFFFF");
|
||||
|
||||
addSubParsed("0xB", "-0x7", "0x4");
|
||||
addSubParsed("-0xB", "-0x7", "-0x12");
|
||||
addSubParsed("0xB", "0x7", "0x12");
|
||||
addSubParsed("-0xB", "0x7", "-0x4");
|
||||
addSubParsed("-0x7", "0xB", "0x4");
|
||||
addSubParsed("-0x7", "-0xB", "-0x12");
|
||||
addSubParsed("0x7", "0xB", "0x12");
|
||||
addSubParsed("0x7", "-0xB", "-0x4");
|
||||
}
|
||||
|
||||
shiftLeftParsed(String a, int amount, String result) {
|
||||
int int_a = int.parse(a);
|
||||
int int_result = int.parse(result);
|
||||
int shifted = int_a << amount;
|
||||
Expect.equals(int_result, shifted);
|
||||
String str_shifted = shifted >= 0
|
||||
? "0x${shifted.toRadixString(16)}"
|
||||
: "-0x${(-shifted).toRadixString(16)}";
|
||||
Expect.equals(result.toLowerCase(), str_shifted);
|
||||
int back_shifted = shifted >> amount;
|
||||
Expect.equals(int_a, back_shifted);
|
||||
String str_back_shifted = back_shifted >= 0
|
||||
? "0x${back_shifted.toRadixString(16)}"
|
||||
: "-0x${(-back_shifted).toRadixString(16)}";
|
||||
Expect.equals(a.toLowerCase(), str_back_shifted);
|
||||
}
|
||||
|
||||
testBigintLeftShift() {
|
||||
String zero = "0x0";
|
||||
String one = "0x1";
|
||||
String minus_one = "-0x1";
|
||||
|
||||
shiftLeftParsed(zero, 0, zero);
|
||||
shiftLeftParsed(one, 0, one);
|
||||
shiftLeftParsed("0x1234", 0, "0x1234");
|
||||
shiftLeftParsed(zero, 100000, zero);
|
||||
shiftLeftParsed(one, 1, "0x2");
|
||||
shiftLeftParsed(one, 28, "0x10000000");
|
||||
shiftLeftParsed(one, 32, "0x100000000");
|
||||
shiftLeftParsed(one, 64, "0x10000000000000000");
|
||||
shiftLeftParsed("0x5", 28, "0x50000000");
|
||||
shiftLeftParsed("0x5", 32, "0x500000000");
|
||||
shiftLeftParsed("0x5", 56, "0x500000000000000");
|
||||
shiftLeftParsed("0x5", 64, "0x50000000000000000");
|
||||
shiftLeftParsed("0x5", 128, "0x500000000000000000000000000000000");
|
||||
shiftLeftParsed("0x5", 27, "0x28000000");
|
||||
shiftLeftParsed("0x5", 31, "0x280000000");
|
||||
shiftLeftParsed("0x5", 55, "0x280000000000000");
|
||||
shiftLeftParsed("0x5", 63, "0x28000000000000000");
|
||||
shiftLeftParsed("0x5", 127, "0x280000000000000000000000000000000");
|
||||
shiftLeftParsed("0x8000001", 1, "0x10000002");
|
||||
shiftLeftParsed("0x80000001", 1, "0x100000002");
|
||||
shiftLeftParsed("0x8000000000000001", 1, "0x10000000000000002");
|
||||
shiftLeftParsed("0x8000001", 29, "0x100000020000000");
|
||||
shiftLeftParsed("0x80000001", 33, "0x10000000200000000");
|
||||
shiftLeftParsed(
|
||||
"0x8000000000000001", 65, "0x100000000000000020000000000000000");
|
||||
shiftLeftParsed(minus_one, 0, minus_one);
|
||||
shiftLeftParsed("-0x1234", 0, "-0x1234");
|
||||
shiftLeftParsed(minus_one, 1, "-0x2");
|
||||
shiftLeftParsed(minus_one, 28, "-0x10000000");
|
||||
shiftLeftParsed(minus_one, 32, "-0x100000000");
|
||||
shiftLeftParsed(minus_one, 64, "-0x10000000000000000");
|
||||
shiftLeftParsed("-0x5", 28, "-0x50000000");
|
||||
shiftLeftParsed("-0x5", 32, "-0x500000000");
|
||||
shiftLeftParsed("-0x5", 64, "-0x50000000000000000");
|
||||
shiftLeftParsed("-0x5", 27, "-0x28000000");
|
||||
shiftLeftParsed("-0x5", 31, "-0x280000000");
|
||||
shiftLeftParsed("-0x5", 63, "-0x28000000000000000");
|
||||
shiftLeftParsed("-0x8000001", 1, "-0x10000002");
|
||||
shiftLeftParsed("-0x80000001", 1, "-0x100000002");
|
||||
shiftLeftParsed("-0x8000000000000001", 1, "-0x10000000000000002");
|
||||
shiftLeftParsed("-0x8000001", 29, "-0x100000020000000");
|
||||
shiftLeftParsed("-0x80000001", 33, "-0x10000000200000000");
|
||||
shiftLeftParsed(
|
||||
"-0x8000000000000001", 65, "-0x100000000000000020000000000000000");
|
||||
}
|
||||
|
||||
shiftRightParsed(String a, int amount, String result) {
|
||||
int int_a = int.parse(a);
|
||||
int int_result = int.parse(result);
|
||||
int shifted = int_a >> amount;
|
||||
Expect.equals(int_result, shifted);
|
||||
String str_shifted = shifted >= 0
|
||||
? "0x${shifted.toRadixString(16)}"
|
||||
: "-0x${(-shifted).toRadixString(16)}";
|
||||
Expect.equals(result.toLowerCase(), str_shifted);
|
||||
}
|
||||
|
||||
testBigintRightShift() {
|
||||
String zero = "0x0";
|
||||
String one = "0x1";
|
||||
String minus_one = "-0x1";
|
||||
|
||||
shiftRightParsed(one, 1, zero);
|
||||
shiftRightParsed(minus_one, 1, minus_one);
|
||||
shiftRightParsed("-0x2", 1, minus_one);
|
||||
shiftRightParsed("0x12345678", 29, zero);
|
||||
shiftRightParsed("-0x12345678", 29, minus_one);
|
||||
shiftRightParsed("-0x12345678", 100, minus_one);
|
||||
shiftRightParsed("0x5", 1, "0x2");
|
||||
shiftRightParsed("0x5", 2, "0x1");
|
||||
shiftRightParsed("-0x5", 1, "-0x3");
|
||||
shiftRightParsed("-0x5", 2, "-0x2");
|
||||
shiftRightParsed("0x10000001", 28, one);
|
||||
shiftRightParsed("0x100000001", 32, one);
|
||||
shiftRightParsed("0x10000000000000001", 64, one);
|
||||
shiftRightParsed("-0x10000001", 28, "-0x2");
|
||||
shiftRightParsed("-0x100000001", 32, "-0x2");
|
||||
shiftRightParsed("-0x10000000000000001", 64, "-0x2");
|
||||
shiftRightParsed("0x30000000", 29, one);
|
||||
shiftRightParsed("0x300000000", 33, one);
|
||||
shiftRightParsed("0x30000000000000000", 65, one);
|
||||
shiftRightParsed("-0x30000000", 29, "-0x2");
|
||||
shiftRightParsed("-0x300000000", 33, "-0x2");
|
||||
shiftRightParsed("-0x30000000000000000", 65, "-0x2");
|
||||
}
|
||||
|
||||
bitAndParsed(String a, String b, String result) {
|
||||
int int_a = int.parse(a);
|
||||
int int_b = int.parse(b);
|
||||
int int_result = int.parse(result);
|
||||
int anded = int_a & int_b;
|
||||
Expect.equals(int_result, anded);
|
||||
String str_anded = anded >= 0
|
||||
? "0x${anded.toRadixString(16)}"
|
||||
: "-0x${(-anded).toRadixString(16)}";
|
||||
Expect.equals(result.toLowerCase(), str_anded);
|
||||
int anded2 = int_b & int_a;
|
||||
Expect.equals(int_result, anded2);
|
||||
String str_anded2 = anded2 >= 0
|
||||
? "0x${anded2.toRadixString(16)}"
|
||||
: "-0x${(-anded2).toRadixString(16)}";
|
||||
Expect.equals(result.toLowerCase(), str_anded2);
|
||||
}
|
||||
|
||||
testBigintBitAnd() {
|
||||
String zero = "0x0";
|
||||
String one = "0x1";
|
||||
String minus_one = "-0x1";
|
||||
|
||||
bitAndParsed(one, zero, zero);
|
||||
bitAndParsed(one, one, one);
|
||||
bitAndParsed(minus_one, zero, zero);
|
||||
bitAndParsed(minus_one, one, one);
|
||||
bitAndParsed(minus_one, minus_one, minus_one);
|
||||
bitAndParsed("0x5", "0x3", one);
|
||||
bitAndParsed("0x5", minus_one, "0x5");
|
||||
bitAndParsed("0x50000000", one, zero);
|
||||
bitAndParsed("0x50000000", minus_one, "0x50000000");
|
||||
bitAndParsed("0x500000000", one, zero);
|
||||
bitAndParsed("0x500000000", minus_one, "0x500000000");
|
||||
bitAndParsed("0x50000000000000000", one, zero);
|
||||
bitAndParsed("0x50000000000000000", minus_one, "0x50000000000000000");
|
||||
bitAndParsed("-0x50000000", "-0x50000000", "-0x50000000");
|
||||
bitAndParsed("-0x500000000", "-0x500000000", "-0x500000000");
|
||||
bitAndParsed(
|
||||
"-0x50000000000000000", "-0x50000000000000000", "-0x50000000000000000");
|
||||
bitAndParsed("0x1234567890ABCDEF012345678", "0x876543210FEDCBA0987654321",
|
||||
"0x224422000A9C9A0002244220");
|
||||
bitAndParsed("-0x1234567890ABCDEF012345678", "-0x876543210FEDCBA0987654321",
|
||||
"-0x977557799FEFCFEF997755778");
|
||||
bitAndParsed("0x1234567890ABCDEF012345678", "-0x876543210FEDCBA0987654321",
|
||||
"0x101014589002044F010101458");
|
||||
bitAndParsed(
|
||||
"0x1234567890ABCDEF012345678FFFFFFFFFFFFFFFFFFFFFFFFF",
|
||||
"-0x876543210FEDCBA0987654321",
|
||||
"0x1234567890ABCDEF012345678789ABCDEF012345F6789ABCDF");
|
||||
bitAndParsed("0x12345678", "0xFFFFFFF", "0x2345678");
|
||||
bitAndParsed("0x123456789", "0xFFFFFFFF", "0x23456789");
|
||||
bitAndParsed("-0x10000000", "0xFFFFFFF", "0x0");
|
||||
bitAndParsed("-0x100000000", "0xFFFFFFFF", "0x0");
|
||||
bitAndParsed("-0x10000001", "0xFFFFFFF", "0xFFFFFFF");
|
||||
bitAndParsed("-0x100000001", "0xFFFFFFFF", "0xFFFFFFFF");
|
||||
bitAndParsed("-0x10000001", "0x3FFFFFFF", "0x2FFFFFFF");
|
||||
bitAndParsed("-0x100000001", "0x3FFFFFFFF", "0x2FFFFFFFF");
|
||||
bitAndParsed(
|
||||
"-0x10000000000000001", "0x3FFFFFFFFFFFFFFFF", "0x2FFFFFFFFFFFFFFFF");
|
||||
bitAndParsed("-0x100000000000000", "0xFFFFFFFFFFFFFF", "0x0");
|
||||
bitAndParsed("-0x10000000000000000", "0xFFFFFFFFFFFFFFFF", "0x0");
|
||||
bitAndParsed("-0x300000000000000", "0xFFFFFFFFFFFFFFF", "0xD00000000000000");
|
||||
bitAndParsed(
|
||||
"-0x30000000000000000", "0xFFFFFFFFFFFFFFFFF", "0xD0000000000000000");
|
||||
bitAndParsed("-0x10000000", "-0x10000000", "-0x10000000");
|
||||
bitAndParsed("-0x100000000", "-0x100000000", "-0x100000000");
|
||||
bitAndParsed(
|
||||
"-0x100000000000000", "-0x100000000000000", "-0x100000000000000");
|
||||
bitAndParsed(
|
||||
"-0x10000000000000000", "-0x10000000000000000", "-0x10000000000000000");
|
||||
bitAndParsed("-0x3", "-0x2", "-0x4");
|
||||
bitAndParsed("-0x10000000", "-0x10000001", "-0x20000000");
|
||||
bitAndParsed("-0x100000000", "-0x100000001", "-0x200000000");
|
||||
bitAndParsed(
|
||||
"-0x100000000000000", "-0x100000000000001", "-0x200000000000000");
|
||||
bitAndParsed(
|
||||
"-0x10000000000000000", "-0x10000000000000001", "-0x20000000000000000");
|
||||
bitAndParsed(
|
||||
"0x123456789ABCDEF01234567890",
|
||||
"0x3FFFFFFF", // Max Smi for 32 bits.
|
||||
"0x34567890");
|
||||
bitAndParsed(
|
||||
"0x123456789ABCDEF01274567890",
|
||||
"0x3FFFFFFF", // Max Smi for 32 bits.
|
||||
"0x34567890");
|
||||
bitAndParsed(
|
||||
"0x123456789ABCDEF01234567890",
|
||||
"0x40000000", // Max Smi for 32 bits + 1.
|
||||
"0x0");
|
||||
bitAndParsed(
|
||||
"0x123456789ABCDEF01274567890",
|
||||
"0x40000000", // Max Smi for 32 bits + 1.
|
||||
"0x40000000");
|
||||
bitAndParsed(
|
||||
"0x123456789ABCDEF01234567890",
|
||||
"0x3FFFFFFFFFFFFFFF", // Max Smi for 64 bits.
|
||||
"0x3CDEF01234567890");
|
||||
bitAndParsed(
|
||||
"0x123456789ACCDEF01234567890",
|
||||
"0x4000000000000000", // Max Smi for 64 bits + 1.
|
||||
"0x4000000000000000");
|
||||
bitAndParsed(
|
||||
"0x123456789ABCDEF01234567890",
|
||||
"0x4000000000000000", // Max Smi for 64 bits + 1.
|
||||
"0x0");
|
||||
}
|
||||
|
||||
bitOrParsed(String a, String b, String result) {
|
||||
int int_a = int.parse(a);
|
||||
int int_b = int.parse(b);
|
||||
int int_result = int.parse(result);
|
||||
int ored = int_a | int_b;
|
||||
Expect.equals(int_result, ored);
|
||||
String str_ored = ored >= 0
|
||||
? "0x${ored.toRadixString(16)}"
|
||||
: "-0x${(-ored).toRadixString(16)}";
|
||||
Expect.equals(result.toLowerCase(), str_ored);
|
||||
int ored2 = int_b | int_a;
|
||||
Expect.equals(int_result, ored2);
|
||||
String str_ored2 = ored2 >= 0
|
||||
? "0x${ored2.toRadixString(16)}"
|
||||
: "-0x${(-ored2).toRadixString(16)}";
|
||||
Expect.equals(result.toLowerCase(), str_ored2);
|
||||
}
|
||||
|
||||
testBigintBitOr() {
|
||||
String zero = "0x0";
|
||||
String one = "0x1";
|
||||
String minus_one = "-0x1";
|
||||
|
||||
bitOrParsed(one, zero, one);
|
||||
bitOrParsed(one, one, one);
|
||||
bitOrParsed(minus_one, zero, minus_one);
|
||||
bitOrParsed(minus_one, one, minus_one);
|
||||
bitOrParsed(minus_one, minus_one, minus_one);
|
||||
bitOrParsed("-0x3", one, "-0x3");
|
||||
bitOrParsed("0x5", "0x3", "0x7");
|
||||
bitOrParsed("0x5", minus_one, minus_one);
|
||||
bitOrParsed("0x5", zero, "0x5");
|
||||
bitOrParsed("0x50000000", one, "0x50000001");
|
||||
bitOrParsed("0x50000000", minus_one, minus_one);
|
||||
bitOrParsed("0x500000000", one, "0x500000001");
|
||||
bitOrParsed("0x500000000", minus_one, minus_one);
|
||||
bitOrParsed("0x50000000000000000", one, "0x50000000000000001");
|
||||
bitOrParsed("0x50000000000000000", minus_one, minus_one);
|
||||
bitOrParsed("-0x50000000", "-0x50000000", "-0x50000000");
|
||||
bitOrParsed("-0x500000000", "-0x500000000", "-0x500000000");
|
||||
bitOrParsed(
|
||||
"-0x50000000000000000", "-0x50000000000000000", "-0x50000000000000000");
|
||||
bitOrParsed("0x1234567890ABCDEF012345678", "0x876543210FEDCBA0987654321",
|
||||
"0x977557799FEFCFEF997755779");
|
||||
bitOrParsed("-0x1234567890ABCDEF012345678", "-0x876543210FEDCBA0987654321",
|
||||
"-0x224422000A9C9A0002244221");
|
||||
bitOrParsed("0x1234567890ABCDEF012345678", "-0x876543210FEDCBA0987654321",
|
||||
"-0x854101010F440200985410101");
|
||||
bitOrParsed("0x1234567890ABCDEF012345678FFFFFFFFFFFFFFFFFFFFFFFFF",
|
||||
"-0x876543210FEDCBA0987654321", "-0x1");
|
||||
bitOrParsed("0x12345678", "0xFFFFFFF", "0x1FFFFFFF");
|
||||
bitOrParsed("0x123456789", "0xFFFFFFFF", "0x1FFFFFFFF");
|
||||
bitOrParsed("-0x10000000", "0xFFFFFFF", "-0x1");
|
||||
bitOrParsed("-0x100000000", "0xFFFFFFFF", "-0x1");
|
||||
bitOrParsed("-0x10000001", "0xFFFFFFF", "-0x10000001");
|
||||
bitOrParsed("-0x100000001", "0xFFFFFFFF", "-0x100000001");
|
||||
bitOrParsed("-0x10000001", "0x3FFFFFFF", "-0x1");
|
||||
bitOrParsed("-0x100000001", "0x3FFFFFFFF", "-0x1");
|
||||
bitOrParsed("-0x10000000000000001", "0x3FFFFFFFFFFFFFFFF", "-0x1");
|
||||
bitOrParsed("-0x100000000000000", "0xFFFFFFFFFFFFFF", "-0x1");
|
||||
bitOrParsed("-0x10000000000000000", "0xFFFFFFFFFFFFFFFF", "-0x1");
|
||||
bitOrParsed("-0x300000000000000", "0xFFFFFFFFFFFFFFF", "-0x1");
|
||||
bitOrParsed("-0x30000000000000000", "0xFFFFFFFFFFFFFFFFF", "-0x1");
|
||||
bitOrParsed("-0x10000000", "-0x10000000", "-0x10000000");
|
||||
bitOrParsed("-0x100000000", "-0x100000000", "-0x100000000");
|
||||
bitOrParsed("-0x100000000000000", "-0x100000000000000", "-0x100000000000000");
|
||||
bitOrParsed(
|
||||
"-0x10000000000000000", "-0x10000000000000000", "-0x10000000000000000");
|
||||
bitOrParsed("-0x10000000", "-0x10000001", "-0x1");
|
||||
bitOrParsed("-0x100000000", "-0x100000001", "-0x1");
|
||||
bitOrParsed("-0x100000000000000", "-0x100000000000001", "-0x1");
|
||||
bitOrParsed("-0x10000000000000000", "-0x10000000000000001", "-0x1");
|
||||
bitOrParsed("-0x10000000000000000", "-0x1", "-0x1");
|
||||
}
|
||||
|
||||
bitXorParsed(String a, String b, String result) {
|
||||
int int_a = int.parse(a);
|
||||
int int_b = int.parse(b);
|
||||
int int_result = int.parse(result);
|
||||
int xored = int_a ^ int_b;
|
||||
Expect.equals(int_result, xored);
|
||||
String str_xored = xored >= 0
|
||||
? "0x${xored.toRadixString(16)}"
|
||||
: "-0x${(-xored).toRadixString(16)}";
|
||||
Expect.equals(result.toLowerCase(), str_xored);
|
||||
int xored2 = int_b ^ int_a;
|
||||
Expect.equals(int_result, xored2);
|
||||
String str_xored2 = xored2 >= 0
|
||||
? "0x${xored2.toRadixString(16)}"
|
||||
: "-0x${(-xored2).toRadixString(16)}";
|
||||
Expect.equals(result.toLowerCase(), str_xored2);
|
||||
int xored3 = int_a ^ xored2;
|
||||
Expect.equals(int_b, xored3);
|
||||
String str_xored3 = xored3 >= 0
|
||||
? "0x${xored3.toRadixString(16)}"
|
||||
: "-0x${(-xored3).toRadixString(16)}";
|
||||
Expect.equals(b.toLowerCase(), str_xored3);
|
||||
}
|
||||
|
||||
testBigintBitXor() {
|
||||
String zero = "0x0";
|
||||
String one = "0x1";
|
||||
String minus_one = "-0x1";
|
||||
|
||||
bitXorParsed(one, zero, one);
|
||||
bitXorParsed(one, one, zero);
|
||||
bitXorParsed(minus_one, zero, minus_one);
|
||||
bitXorParsed(minus_one, one, "-0x2");
|
||||
bitXorParsed(minus_one, minus_one, zero);
|
||||
bitXorParsed("0x5", "0x3", "0x6");
|
||||
bitXorParsed("0x5", minus_one, "-0x6");
|
||||
bitXorParsed("0x5", zero, "0x5");
|
||||
bitXorParsed(minus_one, "-0x8", "0x7");
|
||||
bitXorParsed("0x50000000", one, "0x50000001");
|
||||
bitXorParsed("0x50000000", minus_one, "-0x50000001");
|
||||
bitXorParsed("0x500000000", one, "0x500000001");
|
||||
bitXorParsed("0x500000000", minus_one, "-0x500000001");
|
||||
bitXorParsed("0x50000000000000000", one, "0x50000000000000001");
|
||||
bitXorParsed("0x50000000000000000", minus_one, "-0x50000000000000001");
|
||||
bitXorParsed("-0x50000000", "-0x50000000", zero);
|
||||
bitXorParsed("-0x500000000", "-0x500000000", zero);
|
||||
bitXorParsed("-0x50000000000000000", "-0x50000000000000000", zero);
|
||||
bitXorParsed("0x1234567890ABCDEF012345678", "0x876543210FEDCBA0987654321",
|
||||
"0x955115599F46064F995511559");
|
||||
bitXorParsed("-0x1234567890ABCDEF012345678", "-0x876543210FEDCBA0987654321",
|
||||
"0x955115599F46064F995511557");
|
||||
bitXorParsed("0x1234567890ABCDEF012345678", "-0x876543210FEDCBA0987654321",
|
||||
"-0x955115599F46064F995511559");
|
||||
bitXorParsed(
|
||||
"0x1234567890ABCDEF012345678FFFFFFFFFFFFFFFFFFFFFFFFF",
|
||||
"-0x876543210FEDCBA0987654321",
|
||||
"-0x1234567890ABCDEF012345678789ABCDEF012345F6789ABCE0");
|
||||
bitXorParsed("0x12345678", "0xFFFFFFF", "0x1DCBA987");
|
||||
bitXorParsed("0x123456789", "0xFFFFFFFF", "0x1DCBA9876");
|
||||
bitXorParsed("-0x10000000", "0xFFFFFFF", "-0x1");
|
||||
bitXorParsed("-0x100000000", "0xFFFFFFFF", "-0x1");
|
||||
bitXorParsed("-0x10000001", "0xFFFFFFF", "-0x20000000");
|
||||
bitXorParsed("-0x100000001", "0xFFFFFFFF", "-0x200000000");
|
||||
bitXorParsed("-0x10000001", "0x3FFFFFFF", "-0x30000000");
|
||||
bitXorParsed("-0x100000001", "0x3FFFFFFFF", "-0x300000000");
|
||||
bitXorParsed(
|
||||
"-0x10000000000000001", "0x3FFFFFFFFFFFFFFFF", "-0x30000000000000000");
|
||||
bitXorParsed("-0x100000000000000", "0xFFFFFFFFFFFFFF", "-0x1");
|
||||
bitXorParsed("-0x10000000000000000", "0xFFFFFFFFFFFFFFFF", "-0x1");
|
||||
bitXorParsed("-0x300000000000000", "0xFFFFFFFFFFFFFFF", "-0xD00000000000001");
|
||||
bitXorParsed(
|
||||
"-0x30000000000000000", "0xFFFFFFFFFFFFFFFFF", "-0xD0000000000000001");
|
||||
bitXorParsed("-0x10000000", "-0x10000000", zero);
|
||||
bitXorParsed("-0x100000000", "-0x100000000", zero);
|
||||
bitXorParsed("-0x100000000000000", "-0x100000000000000", zero);
|
||||
bitXorParsed("-0x10000000000000000", "-0x10000000000000000", zero);
|
||||
bitXorParsed("-0x10000000", "-0x10000001", "0x1FFFFFFF");
|
||||
bitXorParsed("-0x100000000", "-0x100000001", "0x1FFFFFFFF");
|
||||
bitXorParsed("-0x100000000000000", "-0x100000000000001", "0x1FFFFFFFFFFFFFF");
|
||||
bitXorParsed(
|
||||
"-0x10000000000000000", "-0x10000000000000001", "0x1FFFFFFFFFFFFFFFF");
|
||||
}
|
||||
|
||||
bitNotParsed(String a, String result) {
|
||||
int int_a = int.parse(a);
|
||||
int int_result = int.parse(result);
|
||||
int inverted = ~int_a;
|
||||
Expect.equals(int_result, inverted);
|
||||
String str_inverted = inverted >= 0
|
||||
? "0x${inverted.toRadixString(16)}"
|
||||
: "-0x${(-inverted).toRadixString(16)}";
|
||||
Expect.equals(result.toLowerCase(), str_inverted);
|
||||
int back = ~inverted;
|
||||
Expect.equals(int_a, back);
|
||||
String str_back = back >= 0
|
||||
? "0x${back.toRadixString(16)}"
|
||||
: "-0x${(-back).toRadixString(16)}";
|
||||
Expect.equals(a.toLowerCase(), str_back);
|
||||
}
|
||||
|
||||
testBigintBitNot() {
|
||||
String zero = "0x0";
|
||||
String one = "0x1";
|
||||
String minus_one = "-0x1";
|
||||
|
||||
bitNotParsed(zero, minus_one);
|
||||
bitNotParsed(one, "-0x2");
|
||||
bitNotParsed("0x5", "-0x6");
|
||||
bitNotParsed("0x50000000", "-0x50000001");
|
||||
bitNotParsed("0xFFFFFFF", "-0x10000000");
|
||||
bitNotParsed("0xFFFFFFFF", "-0x100000000");
|
||||
bitNotParsed("0xFFFFFFFFFFFFFF", "-0x100000000000000");
|
||||
bitNotParsed("0xFFFFFFFFFFFFFFFF", "-0x10000000000000000");
|
||||
bitNotParsed("0x1234567890ABCDEF012345678", "-0x1234567890ABCDEF012345679");
|
||||
}
|
||||
|
||||
main() {
|
||||
testBigintAddSub();
|
||||
testBigintLeftShift();
|
||||
testBigintRightShift();
|
||||
testBigintBitAnd();
|
||||
testBigintBitOr();
|
||||
testBigintBitXor();
|
||||
testBigintBitNot();
|
||||
}
|
||||
@@ -1,111 +0,0 @@
|
||||
// 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.
|
||||
|
||||
// Testing Bigints with and without intrinsics.
|
||||
// VMOptions=
|
||||
// VMOptions=--no_intrinsify
|
||||
|
||||
library big_integer_test;
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
|
||||
divRemParsed(String a, String b, String quotient, String remainder) {
|
||||
int int_a = int.parse(a);
|
||||
int int_b = int.parse(b);
|
||||
int int_quotient = int.parse(quotient);
|
||||
int int_remainder = int.parse(remainder);
|
||||
int computed_quotient = int_a ~/ int_b;
|
||||
Expect.equals(int_quotient, computed_quotient);
|
||||
String str_quotient = computed_quotient >= 0
|
||||
? "0x${computed_quotient.toRadixString(16)}"
|
||||
: "-0x${(-computed_quotient).toRadixString(16)}";
|
||||
Expect.equals(quotient.toLowerCase(), str_quotient);
|
||||
int computed_remainder = int_a.remainder(int_b);
|
||||
Expect.equals(int_remainder, computed_remainder);
|
||||
String str_remainder = computed_remainder >= 0
|
||||
? "0x${computed_remainder.toRadixString(16)}"
|
||||
: "-0x${(-computed_remainder).toRadixString(16)}";
|
||||
Expect.equals(remainder.toLowerCase(), str_remainder);
|
||||
}
|
||||
|
||||
testBigintDivideRemainder() {
|
||||
String zero = "0x0";
|
||||
String one = "0x1";
|
||||
String minus_one = "-0x1";
|
||||
|
||||
divRemParsed(one, one, one, zero);
|
||||
divRemParsed(zero, one, zero, zero);
|
||||
divRemParsed(minus_one, one, minus_one, zero);
|
||||
divRemParsed(one, "0x2", zero, one);
|
||||
divRemParsed(minus_one, "0x7", zero, minus_one);
|
||||
divRemParsed("0xB", "0x7", one, "0x4");
|
||||
divRemParsed("0x12345678", "0x7", "0x299C335", "0x5");
|
||||
divRemParsed("-0x12345678", "0x7", "-0x299C335", "-0x5");
|
||||
divRemParsed("0x12345678", "-0x7", "-0x299C335", "0x5");
|
||||
divRemParsed("-0x12345678", "-0x7", "0x299C335", "-0x5");
|
||||
divRemParsed("0x7", "0x12345678", zero, "0x7");
|
||||
divRemParsed("-0x7", "0x12345678", zero, "-0x7");
|
||||
divRemParsed("-0x7", "-0x12345678", zero, "-0x7");
|
||||
divRemParsed("0x7", "-0x12345678", zero, "0x7");
|
||||
divRemParsed("0x12345678", "0x7", "0x299C335", "0x5");
|
||||
divRemParsed("-0x12345678", "0x7", "-0x299C335", "-0x5");
|
||||
divRemParsed("0x12345678", "-0x7", "-0x299C335", "0x5");
|
||||
divRemParsed("-0x12345678", "-0x7", "0x299C335", "-0x5");
|
||||
divRemParsed(
|
||||
"0x14B66DC327D3C88D7EAA988BBFFA9BBA877826E7EDAF373907A931FBFC3A25231DF7F2"
|
||||
"516F511FB1638F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A"
|
||||
"8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F"
|
||||
"0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B"
|
||||
"570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B57"
|
||||
"0F4A8F0B570F4A8F0B570F4A8F0B570F35D89D93E776C67DD864B2034B5C739007933027"
|
||||
"5CDFD41E07A15D0F5AD5256BED5F1CF91FBA375DE70",
|
||||
"0x1234567890ABCDEF01234567890ABCDEF01234567890ABCDEF01234567890ABCDEF"
|
||||
"01234567890ABCDEF",
|
||||
"0x1234567890123456789012345678901234567890123456789012345678901234567890"
|
||||
"123456789012345678901234567890123456789012345678901234567890123456789012"
|
||||
"345678901234567890123456789012345678901234567890123456789012345678901234"
|
||||
"567890123456789012345678901234567890123456789012345678901234567890123456"
|
||||
"789012345678901234567890123456789012345678901234567890123456789012345678"
|
||||
"90123456789012345678901234567890",
|
||||
zero);
|
||||
divRemParsed(
|
||||
"0x14B66DC327D3C88D7EAA988BBFFA9BBA877826E7EDAF373907A931FBFC3A25231DF7F2"
|
||||
"516F511FB1638F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A"
|
||||
"8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F"
|
||||
"0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B"
|
||||
"570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B57"
|
||||
"0F4A8F0B570F4A8F0B570F4A8F0B570F35D89D93E776C67DD864B2034B5C739007933027"
|
||||
"5CDFD41E07A15D0F5AD5256BED5F1CF91FBA375DE71",
|
||||
"0x1234567890ABCDEF01234567890ABCDEF01234567890ABCDEF01234567890ABCDEF"
|
||||
"01234567890ABCDEF",
|
||||
"0x1234567890123456789012345678901234567890123456789012345678901234567890"
|
||||
"123456789012345678901234567890123456789012345678901234567890123456789012"
|
||||
"345678901234567890123456789012345678901234567890123456789012345678901234"
|
||||
"567890123456789012345678901234567890123456789012345678901234567890123456"
|
||||
"789012345678901234567890123456789012345678901234567890123456789012345678"
|
||||
"90123456789012345678901234567890",
|
||||
one);
|
||||
divRemParsed(
|
||||
"0x14B66DC327D3C88D7EAA988BBFFA9BBA877826E7EDAF373907A931FBFC3A25231DF7F2"
|
||||
"516F511FB1638F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A"
|
||||
"8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F"
|
||||
"0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B"
|
||||
"570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B57"
|
||||
"0F4A8F0B570F4A8F0B570F4A8F0B5710591E051CF233A56DEA99087BDC08417F08B6758E"
|
||||
"E5EA90FCF7B39165D365D139DC60403E8743421AC5E",
|
||||
"0x1234567890ABCDEF01234567890ABCDEF01234567890ABCDEF01234567890ABCDEF"
|
||||
"01234567890ABCDEF",
|
||||
"0x1234567890123456789012345678901234567890123456789012345678901234567890"
|
||||
"123456789012345678901234567890123456789012345678901234567890123456789012"
|
||||
"345678901234567890123456789012345678901234567890123456789012345678901234"
|
||||
"567890123456789012345678901234567890123456789012345678901234567890123456"
|
||||
"789012345678901234567890123456789012345678901234567890123456789012345678"
|
||||
"90123456789012345678901234567890",
|
||||
"0x1234567890ABCDEF01234567890ABCDEF01234567890ABCDEF01234567890ABCDEF"
|
||||
"01234567890ABCDEE");
|
||||
}
|
||||
|
||||
main() {
|
||||
testBigintDivideRemainder();
|
||||
}
|
||||
@@ -1,804 +0,0 @@
|
||||
// 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.
|
||||
|
||||
// Testing Bigints with and without intrinsics.
|
||||
// VMOptions=
|
||||
// VMOptions=--no_intrinsify
|
||||
|
||||
library big_integer_test;
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
|
||||
mulDivParsed(String a, String b, String product) {
|
||||
int int_a = int.parse(a);
|
||||
int int_b = int.parse(b);
|
||||
int int_product = int.parse(product);
|
||||
int computed_product = int_a * int_b;
|
||||
Expect.equals(int_product, computed_product);
|
||||
String str_product = computed_product >= 0
|
||||
? "0x${computed_product.toRadixString(16)}"
|
||||
: "-0x${(-computed_product).toRadixString(16)}";
|
||||
Expect.equals(product.toLowerCase(), str_product);
|
||||
int computed_product2 = int_b * int_a;
|
||||
Expect.equals(int_product, computed_product2);
|
||||
String str_product2 = computed_product2 >= 0
|
||||
? "0x${computed_product2.toRadixString(16)}"
|
||||
: "-0x${(-computed_product2).toRadixString(16)}";
|
||||
Expect.equals(product.toLowerCase(), str_product2);
|
||||
|
||||
if (int_a != 0) {
|
||||
int computed_quotient1 = int_product ~/ int_a;
|
||||
Expect.equals(int_b, computed_quotient1);
|
||||
String str_quotient1 = computed_quotient1 >= 0
|
||||
? "0x${computed_quotient1.toRadixString(16)}"
|
||||
: "-0x${(-computed_quotient1).toRadixString(16)}";
|
||||
Expect.equals(b.toLowerCase(), str_quotient1);
|
||||
}
|
||||
|
||||
if (int_b != 0) {
|
||||
int computed_quotient2 = int_product ~/ int_b;
|
||||
Expect.equals(int_a, computed_quotient2);
|
||||
String str_quotient2 = computed_quotient2 >= 0
|
||||
? "0x${computed_quotient2.toRadixString(16)}"
|
||||
: "-0x${(-computed_quotient2).toRadixString(16)}";
|
||||
Expect.equals(a.toLowerCase(), str_quotient2);
|
||||
}
|
||||
}
|
||||
|
||||
testBigintMultiplyDivide() {
|
||||
String zero = "0x0";
|
||||
String one = "0x1";
|
||||
String minus_one = "-0x1";
|
||||
|
||||
mulDivParsed(zero, zero, zero);
|
||||
mulDivParsed(one, one, one);
|
||||
mulDivParsed(one, zero, zero);
|
||||
mulDivParsed(zero, one, zero);
|
||||
mulDivParsed(one, minus_one, minus_one);
|
||||
mulDivParsed(minus_one, minus_one, one);
|
||||
mulDivParsed("0x42", one, "0x42");
|
||||
mulDivParsed("0x42", "0x2", "0x84");
|
||||
mulDivParsed("0xFFFF", "0x2", "0x1FFFE");
|
||||
mulDivParsed("0x3", "0x5", "0xF");
|
||||
mulDivParsed("0xFFFFF", "0x5", "0x4FFFFB");
|
||||
mulDivParsed("0xFFFFFFF", "0x5", "0x4FFFFFFB");
|
||||
mulDivParsed("0xFFFFFFFF", "0x5", "0x4FFFFFFFB");
|
||||
mulDivParsed("0xFFFFFFFFFFFFFFFF", "0x5", "0x4FFFFFFFFFFFFFFFB");
|
||||
mulDivParsed("0xFFFFFFFFFFFFFFFF", "0x3039", "0x3038FFFFFFFFFFFFCFC7");
|
||||
mulDivParsed("0xFFFFFFFFFFFFFFFF", "0xFFFFFFFFFFFFFFFFFFFFFFFFFF",
|
||||
"0xFFFFFFFFFFFFFFFEFFFFFFFFFF0000000000000001");
|
||||
mulDivParsed(
|
||||
"0xFFFFFFFFFFFFFFFF000000000000000000000000000000000000000000000",
|
||||
"0xFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000000000000",
|
||||
"0xFFFFFFFFFFFFFFFEFFFFFFFFFF000000000000000100000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000");
|
||||
mulDivParsed("0x10000001", "0x5", "0x50000005");
|
||||
mulDivParsed(
|
||||
"0x1234567890ABCDEF01234567890ABCDEF01234567890ABCDEF"
|
||||
"01234567890ABCDEF01234567890ABCDEF",
|
||||
"0x1234567890ABCDEF01234567890ABCDEF01234567890ABCDEF"
|
||||
"01234567890ABCDEF01234567890ABCDEF",
|
||||
"0x14B66DC328828BCA670CBE52943AA3894CCCE15C8F5ED1E55F"
|
||||
"328F6D3F579F992299850C4B5B95213EF3FB7B4E73B5F43D4299"
|
||||
"5B9F6FD5441C275F2FF89F86F28F47A94CA37481090DCCCDCA6475F09A2F2A521");
|
||||
mulDivParsed(
|
||||
"0x1234567890ABCDEF01234567890ABCDEF01234567890ABCDEF01234567890ABCDEF"
|
||||
"01234567890ABCDEF",
|
||||
"0x1234567890123456789012345678901234567890123456789012345678901234567890"
|
||||
"123456789012345678901234567890123456789012345678901234567890123456789012"
|
||||
"345678901234567890123456789012345678901234567890123456789012345678901234"
|
||||
"567890123456789012345678901234567890123456789012345678901234567890123456"
|
||||
"789012345678901234567890123456789012345678901234567890123456789012345678"
|
||||
"90123456789012345678901234567890",
|
||||
"0x14B66DC327D3C88D7EAA988BBFFA9BBA877826E7EDAF373907A931FBFC3A25231DF7F2"
|
||||
"516F511FB1638F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A"
|
||||
"8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F"
|
||||
"0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B"
|
||||
"570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B570F4A8F0B57"
|
||||
"0F4A8F0B570F4A8F0B570F4A8F0B570F35D89D93E776C67DD864B2034B5C739007933027"
|
||||
"5CDFD41E07A15D0F5AD5256BED5F1CF91FBA375DE70");
|
||||
mulDivParsed(
|
||||
"0x1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
"FFFFFFFFFFFFFFFFF",
|
||||
"0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF",
|
||||
"0x1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDFFFFFFFFFFFFFFFF"
|
||||
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
"FFFFFFFFFFFFFFFFF0000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000000000000000000000001");
|
||||
mulDivParsed(
|
||||
"0x1FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||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FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
"FFFFFFFFFFFFFFFFC0000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000001");
|
||||
|
||||
// A 256 28-bit digits number squared.
|
||||
mulDivParsed(
|
||||
"0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF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FFFFFFFF"
|
||||
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000000000001");
|
||||
|
||||
mulDivParsed(
|
||||
"0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
"FFFFFFFFFFFFFFFFFFFFF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FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||
"0000000000000000000000000000000000000000000000000000000001");
|
||||
}
|
||||
|
||||
main() {
|
||||
testBigintMultiplyDivide();
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
// Copyright (c) 2013, 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.
|
||||
// Testing Bigints.
|
||||
|
||||
library bit_twiddling_test;
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
|
||||
// See bit_twiddling_test.dart first. This file contains only the tests that
|
||||
// need Bigint or would fail in dart2js compatibility mode.
|
||||
|
||||
testBitLength() {
|
||||
check(int i, width) {
|
||||
Expect.equals(width, i.bitLength, '$i.bitLength == $width');
|
||||
// (~i) written as (-i-1) to avoid issues with limited range of dart2js ops.
|
||||
Expect.equals(width, (-i - 1).bitLength, '(~$i).bitLength == $width');
|
||||
}
|
||||
|
||||
check(0xffffffffffffff, 56);
|
||||
check(0xffffffffffffffff, 64);
|
||||
check(0xffffffffffffffffff, 72);
|
||||
check(0x1000000000000000000, 73);
|
||||
check(0x1000000000000000001, 73);
|
||||
|
||||
check(0xfffffffffffffffffffffffffffffffffffffe, 152);
|
||||
check(0xffffffffffffffffffffffffffffffffffffff, 152);
|
||||
check(0x100000000000000000000000000000000000000, 153);
|
||||
check(0x100000000000000000000000000000000000001, 153);
|
||||
}
|
||||
|
||||
testToUnsigned() {
|
||||
checkU(src, width, expected) {
|
||||
Expect.equals(expected, src.toUnsigned(width));
|
||||
}
|
||||
|
||||
checkU(0x100000100000000000001, 2, 1);
|
||||
checkU(0x100000200000000000001, 60, 0x200000000000001);
|
||||
checkU(0x100000200000000000001, 59, 0x200000000000001);
|
||||
checkU(0x100000200000000000001, 58, 0x200000000000001);
|
||||
checkU(0x100000200000000000001, 57, 1);
|
||||
}
|
||||
|
||||
testToSigned() {
|
||||
checkS(src, width, expected) {
|
||||
Expect.equals(
|
||||
expected, src.toSigned(width), '$src.toSigned($width) == $expected');
|
||||
}
|
||||
|
||||
checkS(0x100000100000000000001, 2, 1);
|
||||
checkS(0x100000200000000000001, 60, 0x200000000000001);
|
||||
checkS(0x100000200000000000001, 59, 0x200000000000001);
|
||||
checkS(0x100000200000000000001, 58, -0x200000000000000 + 1);
|
||||
checkS(0x100000200000000000001, 57, 1);
|
||||
}
|
||||
|
||||
main() {
|
||||
testBitLength();
|
||||
testToUnsigned();
|
||||
testToSigned();
|
||||
}
|
||||
@@ -1,173 +0,0 @@
|
||||
// Copyright (c) 2013, 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.
|
||||
// Testing Bigints.
|
||||
|
||||
library bit_twiddling_test;
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
|
||||
bool haveBigints() {
|
||||
return 100000000000000000000 + 1 != 100000000000000000000;
|
||||
}
|
||||
|
||||
testBitLength() {
|
||||
check(int i, width) {
|
||||
Expect.equals(width, i.bitLength, '$i.bitLength == $width');
|
||||
// (~i) written as (-i-1) to avoid issues with limited range of dart2js ops.
|
||||
Expect.equals(width, (-i - 1).bitLength, '(~$i).bitLength == $width');
|
||||
}
|
||||
|
||||
check(0, 0);
|
||||
check(1, 1);
|
||||
check(2, 2);
|
||||
check(3, 2);
|
||||
check(4, 3);
|
||||
check(5, 3);
|
||||
check(6, 3);
|
||||
check(7, 3);
|
||||
check(8, 4);
|
||||
check(127, 7);
|
||||
check(128, 8);
|
||||
check(129, 8);
|
||||
check(2147483646, 31);
|
||||
check(2147483647, 31);
|
||||
check(2147483648, 32);
|
||||
check(2147483649, 32);
|
||||
check(4294967295, 32);
|
||||
check(4294967296, 33);
|
||||
check(0xffffffffff, 40);
|
||||
check(0xfffffffffff, 44);
|
||||
check(0xffffffffffff, 48);
|
||||
check(0x1000000000000, 49);
|
||||
check(0x1000000000001, 49);
|
||||
check(0x1ffffffffffff, 49);
|
||||
check(0x2000000000000, 50);
|
||||
check(0x2000000000001, 50);
|
||||
|
||||
if (haveBigints()) {
|
||||
check(0xffffffffffffff, 56);
|
||||
check(0xffffffffffffffff, 64);
|
||||
check(0xffffffffffffffffff, 72);
|
||||
check(0x1000000000000000000, 73);
|
||||
check(0x1000000000000000001, 73);
|
||||
|
||||
check(0xfffffffffffffffffffffffffffffffffffffe, 152);
|
||||
check(0xffffffffffffffffffffffffffffffffffffff, 152);
|
||||
check(0x100000000000000000000000000000000000000, 153);
|
||||
check(0x100000000000000000000000000000000000001, 153);
|
||||
}
|
||||
}
|
||||
|
||||
testToUnsigned() {
|
||||
checkU(src, width, expected) {
|
||||
Expect.equals(expected, src.toUnsigned(width));
|
||||
}
|
||||
|
||||
checkU(1, 8, 1);
|
||||
checkU(0xff, 8, 0xff);
|
||||
checkU(0xffff, 8, 0xff);
|
||||
checkU(-1, 8, 0xff);
|
||||
checkU(0xffffffff, 32, 0xffffffff);
|
||||
|
||||
checkU(0x7fffffff, 30, 0x3fffffff);
|
||||
checkU(0x7fffffff, 31, 0x7fffffff);
|
||||
checkU(0x7fffffff, 32, 0x7fffffff);
|
||||
checkU(0x80000000, 30, 0);
|
||||
checkU(0x80000000, 31, 0);
|
||||
checkU(0x80000000, 32, 0x80000000);
|
||||
checkU(0xffffffff, 30, 0x3fffffff);
|
||||
checkU(0xffffffff, 31, 0x7fffffff);
|
||||
checkU(0xffffffff, 32, 0xffffffff);
|
||||
checkU(0x100000000, 30, 0);
|
||||
checkU(0x100000000, 31, 0);
|
||||
checkU(0x100000000, 32, 0);
|
||||
checkU(0x1ffffffff, 30, 0x3fffffff);
|
||||
checkU(0x1ffffffff, 31, 0x7fffffff);
|
||||
checkU(0x1ffffffff, 32, 0xffffffff);
|
||||
|
||||
checkU(-1, 0, 0);
|
||||
checkU(0, 0, 0);
|
||||
checkU(1, 0, 0);
|
||||
checkU(2, 0, 0);
|
||||
checkU(3, 0, 0);
|
||||
|
||||
checkU(-1, 1, 1);
|
||||
checkU(0, 1, 0);
|
||||
checkU(1, 1, 1);
|
||||
checkU(2, 1, 0);
|
||||
checkU(3, 1, 1);
|
||||
checkU(4, 1, 0);
|
||||
|
||||
checkU(-1, 2, 3);
|
||||
checkU(0, 2, 0);
|
||||
checkU(1, 2, 1);
|
||||
checkU(2, 2, 2);
|
||||
checkU(3, 2, 3);
|
||||
checkU(4, 2, 0);
|
||||
|
||||
checkU(-1, 3, 7);
|
||||
checkU(0, 3, 0);
|
||||
checkU(1, 3, 1);
|
||||
checkU(2, 3, 2);
|
||||
checkU(3, 3, 3);
|
||||
checkU(4, 3, 4);
|
||||
}
|
||||
|
||||
testToSigned() {
|
||||
checkS(src, width, expected) {
|
||||
Expect.equals(
|
||||
expected, src.toSigned(width), '$src.toSigned($width) == $expected');
|
||||
}
|
||||
|
||||
checkS(1, 8, 1);
|
||||
checkS(0xff, 8, -1);
|
||||
checkS(0xffff, 8, -1);
|
||||
checkS(-1, 8, -1);
|
||||
checkS(128, 8, -128);
|
||||
checkS(0xffffffff, 32, -1);
|
||||
|
||||
checkS(0x7fffffff, 30, -1);
|
||||
checkS(0x7fffffff, 31, -1);
|
||||
checkS(0x7fffffff, 32, 0x7fffffff);
|
||||
checkS(0x80000000, 30, 0);
|
||||
checkS(0x80000000, 31, 0);
|
||||
checkS(0x80000000, 32, -2147483648);
|
||||
checkS(0xffffffff, 30, -1);
|
||||
checkS(0xffffffff, 31, -1);
|
||||
checkS(0xffffffff, 32, -1);
|
||||
|
||||
checkS(0x100000000, 30, 0);
|
||||
checkS(0x100000000, 31, 0);
|
||||
checkS(0x100000000, 32, 0);
|
||||
checkS(0x1ffffffff, 30, -1);
|
||||
checkS(0x1ffffffff, 31, -1);
|
||||
checkS(0x1ffffffff, 32, -1);
|
||||
|
||||
checkS(-1, 1, -1);
|
||||
checkS(0, 1, 0);
|
||||
checkS(1, 1, -1); // The only bit is the sign bit.
|
||||
checkS(2, 1, 0);
|
||||
checkS(3, 1, -1);
|
||||
checkS(4, 1, 0);
|
||||
|
||||
checkS(-1, 2, -1);
|
||||
checkS(0, 2, 0);
|
||||
checkS(1, 2, 1);
|
||||
checkS(2, 2, -2);
|
||||
checkS(3, 2, -1);
|
||||
checkS(4, 2, 0);
|
||||
|
||||
checkS(-1, 3, -1);
|
||||
checkS(0, 3, 0);
|
||||
checkS(1, 3, 1);
|
||||
checkS(2, 3, 2);
|
||||
checkS(3, 3, 3);
|
||||
checkS(4, 3, -4);
|
||||
}
|
||||
|
||||
main() {
|
||||
testBitLength();
|
||||
testToUnsigned();
|
||||
testToSigned();
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
// Copyright (c) 2013, 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.
|
||||
|
||||
main() {
|
||||
const bool.fromEnvironment('NOT_FOUND', defaultValue: ''); // //# 01: compile-time error
|
||||
const bool.fromEnvironment('NOT_FOUND', defaultValue: 1); // //# 02: compile-time error
|
||||
const bool.fromEnvironment(null); // //# 03: compile-time error
|
||||
const bool.fromEnvironment(1); // //# 04: compile-time error
|
||||
const bool.fromEnvironment([]); // //# 05: compile-time error
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
// Copyright (c) 2013, 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.
|
||||
// SharedOptions=-Da=true -Db=false -Dc=NOTBOOL -Dd=True
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
|
||||
main() {
|
||||
Expect.isTrue(const bool.fromEnvironment('a'));
|
||||
Expect.isFalse(const bool.fromEnvironment('b'));
|
||||
Expect.isTrue(const bool.fromEnvironment('c', defaultValue: true));
|
||||
Expect.isFalse(const bool.fromEnvironment('c', defaultValue: false));
|
||||
Expect.isFalse(const bool.fromEnvironment('d', defaultValue: false));
|
||||
Expect.equals(const bool.fromEnvironment('dart.isVM'), !identical(1.0, 1));
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
// 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";
|
||||
|
||||
class BoolHashCodeTest {
|
||||
static testMain() {
|
||||
Expect.notEquals(true.hashCode, false.hashCode);
|
||||
}
|
||||
}
|
||||
|
||||
main() {
|
||||
BoolHashCodeTest.testMain();
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
// 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.
|
||||
|
||||
library collection.from.test;
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
import 'dart:collection' show Queue;
|
||||
|
||||
class CollectionFromTest {
|
||||
static testMain() {
|
||||
var set = new Set<int>();
|
||||
set.add(1);
|
||||
set.add(2);
|
||||
set.add(4);
|
||||
check(set, new List<int>.from(set));
|
||||
check(set, new List.from(set));
|
||||
check(set, new Queue<int>.from(set));
|
||||
check(set, new Queue.from(set));
|
||||
check(set, new Set<int>.from(set));
|
||||
check(set, new Set.from(set));
|
||||
}
|
||||
|
||||
static check(Iterable initial, Iterable other) {
|
||||
Expect.equals(3, initial.length);
|
||||
Expect.equals(initial.length, other.length);
|
||||
|
||||
int initialSum = 0;
|
||||
int otherSum = 0;
|
||||
|
||||
initial.forEach((e) {
|
||||
initialSum += e;
|
||||
});
|
||||
other.forEach((e) {
|
||||
otherSum += e;
|
||||
});
|
||||
Expect.equals(4 + 2 + 1, otherSum);
|
||||
Expect.equals(otherSum, initialSum);
|
||||
}
|
||||
}
|
||||
|
||||
main() {
|
||||
CollectionFromTest.testMain();
|
||||
}
|
||||
@@ -1,76 +0,0 @@
|
||||
// Copyright (c) 2013, 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.
|
||||
|
||||
library map_test;
|
||||
|
||||
import 'dart:collection';
|
||||
|
||||
// Test that length/isEmpty operations are constant time on
|
||||
// maps, strings and collections.
|
||||
|
||||
void testString(int n) {
|
||||
String s = "x";
|
||||
String string = "";
|
||||
int length = n;
|
||||
while (true) {
|
||||
if ((length & 1) == 1) {
|
||||
string += s;
|
||||
}
|
||||
length >>= 1;
|
||||
if (length == 0) break;
|
||||
s += s;
|
||||
}
|
||||
testLength(string, n);
|
||||
testLength(string.codeUnits, n);
|
||||
}
|
||||
|
||||
void testMap(Map map, int n) {
|
||||
for (int i = 0; i < n; i++) {
|
||||
map[i] = i;
|
||||
}
|
||||
testLength(map, n);
|
||||
testLength(map.keys, n);
|
||||
testLength(map.values, n);
|
||||
}
|
||||
|
||||
void testCollection(var collection, n) {
|
||||
for (int i = 0; i < n; i++) {
|
||||
collection.add(i);
|
||||
}
|
||||
testLength(collection, n);
|
||||
}
|
||||
|
||||
void testList(List list, n) {
|
||||
// Works even if list is fixed-length.
|
||||
for (int i = 0; i < n; i++) {
|
||||
list[i] = i;
|
||||
}
|
||||
testLength(list, n);
|
||||
}
|
||||
|
||||
void testLength(var lengthable, int size) {
|
||||
print(lengthable.runtimeType); // Show what hangs the test.
|
||||
int length = 0;
|
||||
// If length, isEmpty or isNotEmpty is not a constant-time (or very fast)
|
||||
// operation, this will timeout.
|
||||
for (int i = 0; i < 100000; i++) {
|
||||
if (!lengthable.isEmpty) length += lengthable.length;
|
||||
if (lengthable.isNotEmpty) length += lengthable.length;
|
||||
}
|
||||
if (length != size * 200000) throw "Bad length: $length / size: $size";
|
||||
}
|
||||
|
||||
main() {
|
||||
const int N = 100000;
|
||||
testMap(new HashMap(), N);
|
||||
testMap(new LinkedHashMap(), N);
|
||||
testMap(new SplayTreeMap(), N);
|
||||
testCollection(new HashSet(), N);
|
||||
testCollection(new LinkedHashSet(), N);
|
||||
testCollection(new ListQueue(), N);
|
||||
testCollection(new DoubleLinkedQueue(), N);
|
||||
testList(new List()..length = N, N);
|
||||
testList(new List(N), N);
|
||||
testString(N);
|
||||
}
|
||||
@@ -1,130 +0,0 @@
|
||||
// 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.
|
||||
|
||||
import 'dart:collection';
|
||||
import "package:expect/expect.dart";
|
||||
|
||||
testRemove(base) {
|
||||
int length = base.length;
|
||||
for (int i = 0; i < length; i++) {
|
||||
Expect.isFalse(base.isEmpty);
|
||||
base.remove(base.first);
|
||||
}
|
||||
Expect.isTrue(base.isEmpty);
|
||||
}
|
||||
|
||||
testRemoveAll(base, Iterable removes) {
|
||||
Set retained = new Set();
|
||||
for (var element in base) {
|
||||
if (!removes.contains(element)) {
|
||||
retained.add(element);
|
||||
}
|
||||
}
|
||||
String name = "$base.removeAll($removes) -> $retained";
|
||||
base.removeAll(removes);
|
||||
for (var value in base) {
|
||||
Expect.isFalse(removes.contains(value), "$name: Found $value");
|
||||
}
|
||||
for (var value in retained) {
|
||||
Expect.isTrue(base.contains(value), "$name: Found $value");
|
||||
}
|
||||
}
|
||||
|
||||
testRetainAll(base, Iterable retains) {
|
||||
Set retained = new Set();
|
||||
for (var element in base) {
|
||||
if (retains.contains(element)) {
|
||||
retained.add(element);
|
||||
}
|
||||
}
|
||||
String name = "$base.retainAll($retains) -> $retained";
|
||||
base.retainAll(retains);
|
||||
for (var value in base) {
|
||||
Expect.isTrue(retains.contains(value), "$name: Found $value");
|
||||
}
|
||||
for (var value in retained) {
|
||||
Expect.isTrue(base.contains(value), "$name: Found $value");
|
||||
}
|
||||
}
|
||||
|
||||
testRemoveWhere(base, bool test(value)) {
|
||||
Set retained = new Set();
|
||||
for (var element in base) {
|
||||
if (!test(element)) {
|
||||
retained.add(element);
|
||||
}
|
||||
}
|
||||
String name = "$base.removeWhere(...) -> $retained";
|
||||
base.removeWhere(test);
|
||||
for (var value in base) {
|
||||
Expect.isFalse(test(value), "$name: Found $value");
|
||||
}
|
||||
for (var value in retained) {
|
||||
Expect.isTrue(base.contains(value), "$name: Found $value");
|
||||
}
|
||||
}
|
||||
|
||||
testRetainWhere(base, bool test(value)) {
|
||||
Set retained = new Set();
|
||||
for (var element in base) {
|
||||
if (test(element)) {
|
||||
retained.add(element);
|
||||
}
|
||||
}
|
||||
String name = "$base.retainWhere(...) -> $retained";
|
||||
base.retainWhere(test);
|
||||
for (var value in base) {
|
||||
Expect.isTrue(test(value), "$name: Found $value");
|
||||
}
|
||||
for (var value in retained) {
|
||||
Expect.isTrue(base.contains(value), "$name: Found $value");
|
||||
}
|
||||
}
|
||||
|
||||
void main() {
|
||||
var collections = [
|
||||
[],
|
||||
[1],
|
||||
[2],
|
||||
[1, 2],
|
||||
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
|
||||
[1, 3, 5, 7, 9],
|
||||
[2, 4, 6, 8, 10]
|
||||
];
|
||||
for (var base in collections) {
|
||||
for (var delta in collections) {
|
||||
testRemove(base.toList());
|
||||
testRemove(base.toSet());
|
||||
|
||||
var deltaSet = delta.toSet();
|
||||
testRemoveWhere(base.toList(), deltaSet.contains);
|
||||
testRetainWhere(base.toList(), (e) => !deltaSet.contains(e));
|
||||
|
||||
testRemoveAll(base.toSet(), delta);
|
||||
testRemoveAll(base.toSet(), deltaSet);
|
||||
testRetainAll(base.toSet(), delta);
|
||||
testRetainAll(base.toSet(), deltaSet);
|
||||
testRemoveWhere(base.toSet(), deltaSet.contains);
|
||||
testRetainWhere(base.toSet(), (e) => !deltaSet.contains(e));
|
||||
|
||||
// Test the ListBase class's List implementation.
|
||||
testRemoveWhere(new MyList(base.toList()), deltaSet.contains);
|
||||
testRetainWhere(new MyList(base.toList()), (e) => !deltaSet.contains(e));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class MyList<E> extends ListBase<E> {
|
||||
List<E> _source;
|
||||
MyList(this._source);
|
||||
int get length => _source.length;
|
||||
void set length(int length) {
|
||||
_source.length = length;
|
||||
}
|
||||
|
||||
E operator [](int index) => _source[index];
|
||||
void operator []=(int index, E value) {
|
||||
_source[index] = value;
|
||||
}
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
// 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.
|
||||
|
||||
library collection_test;
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
import 'dart:collection' show Queue;
|
||||
|
||||
class CollectionTest {
|
||||
CollectionTest(Iterable iterable) {
|
||||
testFold(iterable);
|
||||
}
|
||||
|
||||
void testFold(Iterable iterable) {
|
||||
Expect.equals(28, iterable.fold(0, (prev, element) => prev + element));
|
||||
Expect.equals(3024, iterable.fold(1, (prev, element) => prev * element));
|
||||
}
|
||||
}
|
||||
|
||||
main() {
|
||||
final TEST_ELEMENTS = const [4, 2, 6, 7, 9];
|
||||
// Const list.
|
||||
new CollectionTest(TEST_ELEMENTS);
|
||||
|
||||
// Fixed size list.
|
||||
var fixedList = new List(TEST_ELEMENTS.length);
|
||||
for (int i = 0; i < TEST_ELEMENTS.length; i++) {
|
||||
fixedList[i] = TEST_ELEMENTS[i];
|
||||
}
|
||||
new CollectionTest(fixedList);
|
||||
|
||||
// Growable list.
|
||||
new CollectionTest(new List.from(TEST_ELEMENTS));
|
||||
|
||||
// Set.
|
||||
new CollectionTest(new Set.from(TEST_ELEMENTS));
|
||||
|
||||
// Queue.
|
||||
new CollectionTest(new Queue.from(TEST_ELEMENTS));
|
||||
}
|
||||
@@ -1,387 +0,0 @@
|
||||
// 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.
|
||||
|
||||
/**
|
||||
* Tests for the toString methods on collections and maps.
|
||||
*/
|
||||
|
||||
library collection_to_string;
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
import 'dart:collection' show Queue, LinkedHashMap;
|
||||
import 'dart:math' as Math;
|
||||
|
||||
// TODO(jjb): seed random number generator when API allows it
|
||||
|
||||
const int NUM_TESTS = 300;
|
||||
const int MAX_COLLECTION_SIZE = 7;
|
||||
|
||||
Math.Random rand;
|
||||
|
||||
main() {
|
||||
rand = new Math.Random();
|
||||
smokeTest();
|
||||
exactTest();
|
||||
inexactTest();
|
||||
}
|
||||
|
||||
/**
|
||||
* Test a few simple examples.
|
||||
*/
|
||||
void smokeTest() {
|
||||
// Non-const lists
|
||||
Expect.equals([].toString(), '[]');
|
||||
Expect.equals([1].toString(), '[1]');
|
||||
Expect.equals(['Elvis'].toString(), '[Elvis]');
|
||||
Expect.equals([null].toString(), '[null]');
|
||||
Expect.equals([1, 2].toString(), '[1, 2]');
|
||||
Expect.equals(['I', 'II'].toString(), '[I, II]');
|
||||
Expect.equals(
|
||||
[
|
||||
[1, 2],
|
||||
[3, 4],
|
||||
[5, 6]
|
||||
].toString(),
|
||||
'[[1, 2], [3, 4], [5, 6]]');
|
||||
|
||||
// Const lists
|
||||
Expect.equals((const []).toString(), '[]');
|
||||
Expect.equals((const [1]).toString(), '[1]');
|
||||
Expect.equals((const ['Elvis']).toString(), '[Elvis]');
|
||||
Expect.equals((const [null]).toString(), '[null]');
|
||||
Expect.equals((const [1, 2]).toString(), '[1, 2]');
|
||||
Expect.equals((const ['I', 'II']).toString(), '[I, II]');
|
||||
Expect.equals(
|
||||
(const [
|
||||
const [1, 2],
|
||||
const [3, 4],
|
||||
const [5, 6]
|
||||
])
|
||||
.toString(),
|
||||
'[[1, 2], [3, 4], [5, 6]]');
|
||||
|
||||
// Non-const maps - Note that all keys are strings; the spec currently demands this
|
||||
Expect.equals({}.toString(), '{}');
|
||||
Expect.equals({'Elvis': 'King'}.toString(), '{Elvis: King}');
|
||||
Expect.equals({'Elvis': null}.toString(), '{Elvis: null}');
|
||||
Expect.equals({'I': 1, 'II': 2}.toString(), '{I: 1, II: 2}');
|
||||
Expect.equals(
|
||||
{
|
||||
'X': {'I': 1, 'II': 2},
|
||||
'Y': {'III': 3, 'IV': 4},
|
||||
'Z': {'V': 5, 'VI': 6}
|
||||
}.toString(),
|
||||
'{X: {I: 1, II: 2}, Y: {III: 3, IV: 4}, Z: {V: 5, VI: 6}}');
|
||||
|
||||
// Const maps
|
||||
Expect.equals(const {}.toString(), '{}');
|
||||
Expect.equals(const {'Elvis': 'King'}.toString(), '{Elvis: King}');
|
||||
Expect.equals({'Elvis': null}.toString(), '{Elvis: null}');
|
||||
Expect.equals(const {'I': 1, 'II': 2}.toString(), '{I: 1, II: 2}');
|
||||
Expect.equals(
|
||||
const {
|
||||
'X': const {'I': 1, 'II': 2},
|
||||
'Y': const {'III': 3, 'IV': 4},
|
||||
'Z': const {'V': 5, 'VI': 6}
|
||||
}.toString(),
|
||||
'{X: {I: 1, II: 2}, Y: {III: 3, IV: 4}, Z: {V: 5, VI: 6}}');
|
||||
}
|
||||
|
||||
// SERIOUS "BASHER" TESTS
|
||||
|
||||
/**
|
||||
* Generate a bunch of random collections (including Maps), and test that
|
||||
* there string form is as expected. The collections include collections
|
||||
* as elements, keys, and values, and include recursive references.
|
||||
*
|
||||
* This test restricts itself to collections with well-defined iteration
|
||||
* orders (i.e., no HashSet, HashMap).
|
||||
*/
|
||||
void exactTest() {
|
||||
for (int i = 0; i < NUM_TESTS; i++) {
|
||||
// Choose a size from 0 to MAX_COLLECTION_SIZE, favoring larger sizes
|
||||
int size =
|
||||
Math.sqrt(random(MAX_COLLECTION_SIZE * MAX_COLLECTION_SIZE)).toInt();
|
||||
|
||||
StringBuffer stringRep = new StringBuffer();
|
||||
Object o = randomCollection(size, stringRep, exact: true);
|
||||
print(stringRep);
|
||||
print(o);
|
||||
Expect.equals(o.toString(), stringRep.toString());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a bunch of random collections (including Maps), and test that
|
||||
* there string form is as expected. The collections include collections
|
||||
* as elements, keys, and values, and include recursive references.
|
||||
*
|
||||
* This test includes collections with ill-defined iteration orders (i.e.,
|
||||
* HashSet, HashMap). As a consequence, it can't use equality tests on the
|
||||
* string form. Instead, it performs equality tests on their "alphagrams."
|
||||
* This might allow false positives, but it does give a fair amount of
|
||||
* confidence.
|
||||
*/
|
||||
void inexactTest() {
|
||||
for (int i = 0; i < NUM_TESTS; i++) {
|
||||
// Choose a size from 0 to MAX_COLLECTION_SIZE, favoring larger sizes
|
||||
int size =
|
||||
Math.sqrt(random(MAX_COLLECTION_SIZE * MAX_COLLECTION_SIZE)).toInt();
|
||||
|
||||
StringBuffer stringRep = new StringBuffer();
|
||||
Object o = randomCollection(size, stringRep, exact: false);
|
||||
print(stringRep);
|
||||
print(o);
|
||||
Expect.equals(alphagram(o.toString()), alphagram(stringRep.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a random collection (or Map) of the specified size, placing its
|
||||
* string representation into the given string buffer.
|
||||
*
|
||||
* If exact is true, the returned collections will not be, and will not contain
|
||||
* a collection with ill-defined iteration order (i.e., a HashSet or HashMap).
|
||||
*/
|
||||
Object randomCollection(int size, StringBuffer stringRep, {bool exact}) {
|
||||
return randomCollectionHelper(size, exact, stringRep, []);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a random collection (or map) of the specified size, placing its
|
||||
* string representation into the given string buffer. The beingMade
|
||||
* parameter is a list of collections currently under construction, i.e.,
|
||||
* candidates for recursive references.
|
||||
*
|
||||
* If exact is true, the returned collections will not be, and will not contain
|
||||
* a collection with ill-defined iteration order (i.e., a HashSet or HashMap).
|
||||
*/
|
||||
Object randomCollectionHelper(
|
||||
int size, bool exact, StringBuffer stringRep, List beingMade) {
|
||||
double interfaceFrac = rand.nextDouble();
|
||||
|
||||
if (exact) {
|
||||
if (interfaceFrac < 1 / 3) {
|
||||
return randomList(size, exact, stringRep, beingMade);
|
||||
} else if (interfaceFrac < 2 / 3) {
|
||||
return randomQueue(size, exact, stringRep, beingMade);
|
||||
} else {
|
||||
return randomMap(size, exact, stringRep, beingMade);
|
||||
}
|
||||
} else {
|
||||
if (interfaceFrac < 1 / 4) {
|
||||
return randomList(size, exact, stringRep, beingMade);
|
||||
} else if (interfaceFrac < 2 / 4) {
|
||||
return randomQueue(size, exact, stringRep, beingMade);
|
||||
} else if (interfaceFrac < 3 / 4) {
|
||||
return randomSet(size, exact, stringRep, beingMade);
|
||||
} else {
|
||||
return randomMap(size, exact, stringRep, beingMade);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a random List of the specified size, placing its string
|
||||
* representation into the given string buffer. The beingMade
|
||||
* parameter is a list of collections currently under construction, i.e.,
|
||||
* candidates for recursive references.
|
||||
*
|
||||
* If exact is true, the returned collections will not be, and will not contain
|
||||
* a collection with ill-defined iteration order (i.e., a HashSet or HashMap).
|
||||
*/
|
||||
List randomList(int size, bool exact, StringBuffer stringRep, List beingMade) {
|
||||
return populateRandomCollection(size, exact, stringRep, beingMade, [], "[]");
|
||||
}
|
||||
|
||||
/**
|
||||
* Like randomList, but returns a queue.
|
||||
*/
|
||||
Queue randomQueue(
|
||||
int size, bool exact, StringBuffer stringRep, List beingMade) {
|
||||
return populateRandomCollection(
|
||||
size, exact, stringRep, beingMade, new Queue(), "{}");
|
||||
}
|
||||
|
||||
/**
|
||||
* Like randomList, but returns a Set.
|
||||
*/
|
||||
Set randomSet(int size, bool exact, StringBuffer stringRep, List beingMade) {
|
||||
// Until we have LinkedHashSet, method will only be called with exact==true
|
||||
return populateRandomSet(size, exact, stringRep, beingMade, new Set());
|
||||
}
|
||||
|
||||
/**
|
||||
* Like randomList, but returns a map.
|
||||
*/
|
||||
Map randomMap(int size, bool exact, StringBuffer stringRep, List beingMade) {
|
||||
if (exact) {
|
||||
return populateRandomMap(
|
||||
size, exact, stringRep, beingMade, new LinkedHashMap());
|
||||
} else {
|
||||
return populateRandomMap(size, exact, stringRep, beingMade,
|
||||
randomBool() ? new Map() : new LinkedHashMap());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Populates the given empty collection with elements, emitting the string
|
||||
* representation of the collection to stringRep. The beingMade parameter is
|
||||
* a list of collections currently under construction, i.e., candidates for
|
||||
* recursive references.
|
||||
*
|
||||
* If exact is true, the elements of the returned collections will not be,
|
||||
* and will not contain a collection with ill-defined iteration order
|
||||
* (i.e., a HashSet or HashMap).
|
||||
*/
|
||||
populateRandomCollection(int size, bool exact, StringBuffer stringRep,
|
||||
List beingMade, var coll, String delimiters) {
|
||||
beingMade.add(coll);
|
||||
int start = stringRep.length;
|
||||
|
||||
stringRep.write(delimiters[0]);
|
||||
|
||||
List indices = [];
|
||||
for (int i = 0; i < size; i++) {
|
||||
indices.add(stringRep.length);
|
||||
if (i != 0) stringRep.write(', ');
|
||||
coll.add(randomElement(random(size), exact, stringRep, beingMade));
|
||||
}
|
||||
if (size > 5 && delimiters == "()") {
|
||||
const int MAX_LENGTH = 80;
|
||||
const int MIN_COUNT = 3;
|
||||
const int MAX_COUNT = 100;
|
||||
// It's an iterable, it may omit some elements.
|
||||
int end = stringRep.length;
|
||||
if (size > MAX_COUNT) {
|
||||
// Last two elements are also omitted, just find the first three or
|
||||
// first 60 characters.
|
||||
for (int i = MIN_COUNT; i < size; i++) {
|
||||
int startIndex = indices[i];
|
||||
if (startIndex - start > MAX_LENGTH - 6) {
|
||||
// Limit - ", ...)".length.
|
||||
String prefix = stringRep.toString().substring(0, startIndex);
|
||||
stringRep.clear();
|
||||
stringRep.write(prefix);
|
||||
stringRep.write(", ...");
|
||||
}
|
||||
}
|
||||
} else if (stringRep.length - start > MAX_LENGTH - 1) {
|
||||
// 80 - ")".length.
|
||||
// Last two elements are always included. Middle ones may be omitted.
|
||||
int lastTwoLength = end - indices[indices.length - 2];
|
||||
// Try to find first element to omit.
|
||||
for (int i = 3; i <= size - 3; i++) {
|
||||
int elementEnd = indices[i + 1];
|
||||
int lengthAfter = elementEnd - start;
|
||||
int ellipsisSize = 5; // ", ...".length
|
||||
if (i == size - 3) ellipsisSize = 0; // No ellipsis if we hit the end.
|
||||
if (lengthAfter + ellipsisSize + lastTwoLength > MAX_LENGTH - 1) {
|
||||
// Omit this element and everything up to the last two.
|
||||
int elementStart = indices[i];
|
||||
// Rewrite string buffer by copying it out, clearing, and putting
|
||||
// the parts back in.
|
||||
String buffer = stringRep.toString();
|
||||
String prefix = buffer.substring(0, elementStart);
|
||||
String suffix = buffer.substring(end - lastTwoLength, end);
|
||||
stringRep.clear();
|
||||
stringRep.write(prefix);
|
||||
stringRep.write(", ...");
|
||||
stringRep.write(suffix);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stringRep.write(delimiters[1]);
|
||||
beingMade.removeLast();
|
||||
return coll;
|
||||
}
|
||||
|
||||
/** Like populateRandomCollection, but for sets (elements must be hashable) */
|
||||
Set populateRandomSet(
|
||||
int size, bool exact, StringBuffer stringRep, List beingMade, Set set) {
|
||||
stringRep.write('{');
|
||||
|
||||
for (int i = 0; i < size; i++) {
|
||||
if (i != 0) stringRep.write(', ');
|
||||
set.add(i);
|
||||
stringRep.write(i);
|
||||
}
|
||||
|
||||
stringRep.write('}');
|
||||
return set;
|
||||
}
|
||||
|
||||
/** Like populateRandomCollection, but for maps. */
|
||||
Map populateRandomMap(
|
||||
int size, bool exact, StringBuffer stringRep, List beingMade, Map map) {
|
||||
beingMade.add(map);
|
||||
stringRep.write('{');
|
||||
|
||||
for (int i = 0; i < size; i++) {
|
||||
if (i != 0) stringRep.write(', ');
|
||||
|
||||
int key = i; // Ensures no duplicates
|
||||
stringRep.write(key);
|
||||
stringRep.write(': ');
|
||||
Object val = randomElement(random(size), exact, stringRep, beingMade);
|
||||
map[key] = val;
|
||||
}
|
||||
|
||||
stringRep.write('}');
|
||||
beingMade.removeLast();
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a random element which can be an int, a collection, or a map,
|
||||
* and emits it to StringRep. The beingMade parameter is a list of collections
|
||||
* currently under construction, i.e., candidates for recursive references.
|
||||
*
|
||||
* If exact is true, the returned element will not be, and will not contain
|
||||
* a collection with ill-defined iteration order (i.e., a HashSet or HashMap).
|
||||
*/
|
||||
Object randomElement(
|
||||
int size, bool exact, StringBuffer stringRep, List beingMade) {
|
||||
Object result;
|
||||
double elementTypeFrac = rand.nextDouble();
|
||||
if (elementTypeFrac < 1 / 3) {
|
||||
result = random(1000);
|
||||
stringRep.write(result);
|
||||
} else if (elementTypeFrac < 2 / 3) {
|
||||
// Element is a random (new) collection
|
||||
result = randomCollectionHelper(size, exact, stringRep, beingMade);
|
||||
} else {
|
||||
// Element is a random recursive ref
|
||||
result = beingMade[random(beingMade.length)];
|
||||
if (result is List) {
|
||||
stringRep.write('[...]');
|
||||
} else if (result is Set || result is Map || result is Queue) {
|
||||
stringRep.write('{...}');
|
||||
} else {
|
||||
stringRep.write('(...)');
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/** Returns a random int on [0, max) */
|
||||
int random(int max) {
|
||||
return rand.nextInt(max);
|
||||
}
|
||||
|
||||
/** Returns a random boolean value. */
|
||||
bool randomBool() {
|
||||
return rand.nextBool();
|
||||
}
|
||||
|
||||
/** Returns the alphabetized characters in a string. */
|
||||
String alphagram(String s) {
|
||||
// Calling [toList] to convert unmodifiable list to normal list.
|
||||
List<int> chars = s.codeUnits.toList();
|
||||
chars.sort((int a, int b) => a - b);
|
||||
return new String.fromCharCodes(chars);
|
||||
}
|
||||
@@ -1,94 +0,0 @@
|
||||
// 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.
|
||||
// Dart test for testing Math.min and Math.max.
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
|
||||
negate(x) => -x;
|
||||
|
||||
main() {
|
||||
// Test matrix:
|
||||
var minNonZero = 5e-324;
|
||||
var maxDenormal = 2.225073858507201e-308;
|
||||
var minNormal = 2.2250738585072014e-308;
|
||||
var maxFraction = 0.9999999999999999;
|
||||
var minAbove1 = 1.0000000000000002;
|
||||
var maxNonInt = 4503599627370495.5;
|
||||
var maxNonIntFloorAsInt = maxNonInt.floor();
|
||||
var maxNonIntFloorAsDouble = maxNonIntFloorAsInt.toDouble();
|
||||
var maxExactIntAsDouble = 9007199254740992.0;
|
||||
var maxExactIntAsInt = 9007199254740992;
|
||||
var two53 = 1 << 53; // Same as maxExactIntAsInt.
|
||||
var two53p1 = two53 + 1;
|
||||
var maxFiniteAsDouble = 1.7976931348623157e+308;
|
||||
var maxFiniteAsInt = maxFiniteAsDouble.truncate();
|
||||
int huge = 1 << 2000;
|
||||
int hugeP1 = huge + 1;
|
||||
var inf = double.INFINITY;
|
||||
var nan = double.NAN;
|
||||
var mnan = negate(nan);
|
||||
var matrix = [
|
||||
-inf,
|
||||
-hugeP1,
|
||||
-huge,
|
||||
[-maxFiniteAsDouble, -maxFiniteAsInt],
|
||||
-two53p1,
|
||||
[-two53, -maxExactIntAsInt, -maxExactIntAsDouble],
|
||||
-maxNonInt,
|
||||
[-maxNonIntFloorAsDouble, -maxNonIntFloorAsInt],
|
||||
[-499.0, -499],
|
||||
-minAbove1,
|
||||
[-1.0, -1],
|
||||
-maxFraction,
|
||||
-minNormal,
|
||||
-maxDenormal,
|
||||
-minNonZero,
|
||||
-0.0,
|
||||
[0, 0, 0],
|
||||
minNonZero,
|
||||
maxDenormal,
|
||||
minNormal,
|
||||
maxFraction,
|
||||
[1.0, 1],
|
||||
minAbove1,
|
||||
[499.0, 499],
|
||||
[maxNonIntFloorAsDouble, maxNonIntFloorAsInt],
|
||||
maxNonInt,
|
||||
[two53, maxExactIntAsInt, maxExactIntAsDouble],
|
||||
two53p1,
|
||||
[maxFiniteAsDouble, maxFiniteAsInt],
|
||||
huge,
|
||||
hugeP1,
|
||||
inf,
|
||||
[nan, mnan],
|
||||
];
|
||||
|
||||
check(left, right, expectedResult) {
|
||||
if (left is List) {
|
||||
for (var x in left) check(x, right, expectedResult);
|
||||
return;
|
||||
}
|
||||
if (right is List) {
|
||||
for (var x in right) check(left, x, expectedResult);
|
||||
return;
|
||||
}
|
||||
int actual = left.compareTo(right);
|
||||
Expect.equals(
|
||||
expectedResult,
|
||||
actual,
|
||||
"($left).compareTo($right) failed "
|
||||
"(should have been $expectedResult, was $actual");
|
||||
}
|
||||
|
||||
for (int i = 0; i < matrix.length; i++) {
|
||||
for (int j = 0; j < matrix.length; j++) {
|
||||
var left = matrix[i];
|
||||
var right = matrix[j];
|
||||
if (left is List) {
|
||||
check(left, left, 0);
|
||||
}
|
||||
check(left, right, i == j ? 0 : (i < j ? -1 : 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,136 +0,0 @@
|
||||
// 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.
|
||||
// Dart test for testing Math.min and Math.max.
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
|
||||
negate(x) => -x;
|
||||
|
||||
main() {
|
||||
// Test matrix:
|
||||
// -inf < -499.0 == -499 < -0.0 < 0.0 == 0 < 499.0 == 499 < +inf < -NaN, NaN.
|
||||
var inf = double.INFINITY;
|
||||
var nan = double.NAN;
|
||||
var mnan = negate(nan);
|
||||
|
||||
Expect.equals(0, (-inf).compareTo(-inf));
|
||||
Expect.equals(-1, (-inf).compareTo(-499.0));
|
||||
Expect.equals(-1, (-inf).compareTo(-499));
|
||||
Expect.equals(-1, (-inf).compareTo(-0.0));
|
||||
Expect.equals(-1, (-inf).compareTo(0));
|
||||
Expect.equals(-1, (-inf).compareTo(0.0));
|
||||
Expect.equals(-1, (-inf).compareTo(499.0));
|
||||
Expect.equals(-1, (-inf).compareTo(499));
|
||||
Expect.equals(-1, (-inf).compareTo(inf));
|
||||
Expect.equals(-1, (-inf).compareTo(nan));
|
||||
Expect.equals(-1, (-inf).compareTo(mnan));
|
||||
|
||||
Expect.equals(1, (-499.0).compareTo(-inf));
|
||||
Expect.equals(0, (-499.0).compareTo(-499.0));
|
||||
Expect.equals(0, (-499.0).compareTo(-499));
|
||||
Expect.equals(-1, (-499.0).compareTo(-0.0));
|
||||
Expect.equals(-1, (-499.0).compareTo(0));
|
||||
Expect.equals(-1, (-499.0).compareTo(0.0));
|
||||
Expect.equals(-1, (-499.0).compareTo(499.0));
|
||||
Expect.equals(-1, (-499.0).compareTo(499));
|
||||
Expect.equals(-1, (-499.0).compareTo(inf));
|
||||
Expect.equals(-1, (-499.0).compareTo(nan));
|
||||
Expect.equals(-1, (-499.0).compareTo(mnan));
|
||||
|
||||
Expect.equals(1, (-499).compareTo(-inf));
|
||||
Expect.equals(0, (-499).compareTo(-499.0));
|
||||
Expect.equals(0, (-499).compareTo(-499));
|
||||
Expect.equals(-1, (-499).compareTo(-0.0));
|
||||
Expect.equals(-1, (-499).compareTo(0));
|
||||
Expect.equals(-1, (-499).compareTo(0.0));
|
||||
Expect.equals(-1, (-499).compareTo(499.0));
|
||||
Expect.equals(-1, (-499).compareTo(499));
|
||||
Expect.equals(-1, (-499).compareTo(inf));
|
||||
Expect.equals(-1, (-499).compareTo(nan));
|
||||
Expect.equals(-1, (-499).compareTo(mnan));
|
||||
|
||||
Expect.equals(1, (-0.0).compareTo(-inf));
|
||||
Expect.equals(1, (-0.0).compareTo(-499.0));
|
||||
Expect.equals(1, (-0.0).compareTo(-499));
|
||||
Expect.equals(0, (-0.0).compareTo(-0.0));
|
||||
Expect.equals(-1, (-0.0).compareTo(0));
|
||||
Expect.equals(-1, (-0.0).compareTo(0.0));
|
||||
Expect.equals(-1, (-0.0).compareTo(499.0));
|
||||
Expect.equals(-1, (-0.0).compareTo(499));
|
||||
Expect.equals(-1, (-0.0).compareTo(inf));
|
||||
Expect.equals(-1, (-0.0).compareTo(nan));
|
||||
Expect.equals(-1, (-0.0).compareTo(mnan));
|
||||
|
||||
Expect.equals(1, (0).compareTo(-inf));
|
||||
Expect.equals(1, (0).compareTo(-499.0));
|
||||
Expect.equals(1, (0).compareTo(-499));
|
||||
Expect.equals(1, (0).compareTo(-0.0));
|
||||
Expect.equals(0, (0).compareTo(0));
|
||||
Expect.equals(0, (0).compareTo(0.0));
|
||||
Expect.equals(-1, (0).compareTo(499.0));
|
||||
Expect.equals(-1, (0).compareTo(499));
|
||||
Expect.equals(-1, (0).compareTo(inf));
|
||||
Expect.equals(-1, (0).compareTo(nan));
|
||||
Expect.equals(-1, (0).compareTo(mnan));
|
||||
|
||||
Expect.equals(1, (0.0).compareTo(-inf));
|
||||
Expect.equals(1, (0.0).compareTo(-499.0));
|
||||
Expect.equals(1, (0.0).compareTo(-499));
|
||||
Expect.equals(1, (0.0).compareTo(-0.0));
|
||||
Expect.equals(0, (0.0).compareTo(0));
|
||||
Expect.equals(0, (0.0).compareTo(0.0));
|
||||
Expect.equals(-1, (0.0).compareTo(499.0));
|
||||
Expect.equals(-1, (0.0).compareTo(499));
|
||||
Expect.equals(-1, (0.0).compareTo(inf));
|
||||
Expect.equals(-1, (0.0).compareTo(nan));
|
||||
Expect.equals(-1, (0.0).compareTo(mnan));
|
||||
|
||||
Expect.equals(1, (499.0).compareTo(-inf));
|
||||
Expect.equals(1, (499.0).compareTo(-499.0));
|
||||
Expect.equals(1, (499.0).compareTo(-499));
|
||||
Expect.equals(1, (499.0).compareTo(-0.0));
|
||||
Expect.equals(1, (499.0).compareTo(0));
|
||||
Expect.equals(1, (499.0).compareTo(0.0));
|
||||
Expect.equals(0, (499.0).compareTo(499.0));
|
||||
Expect.equals(0, (499.0).compareTo(499));
|
||||
Expect.equals(-1, (499.0).compareTo(inf));
|
||||
Expect.equals(-1, (499.0).compareTo(nan));
|
||||
Expect.equals(-1, (499.0).compareTo(mnan));
|
||||
|
||||
Expect.equals(1, (499).compareTo(-inf));
|
||||
Expect.equals(1, (499).compareTo(-499.0));
|
||||
Expect.equals(1, (499).compareTo(-499));
|
||||
Expect.equals(1, (499).compareTo(-0.0));
|
||||
Expect.equals(1, (499).compareTo(0));
|
||||
Expect.equals(1, (499).compareTo(0.0));
|
||||
Expect.equals(0, (499).compareTo(499.0));
|
||||
Expect.equals(0, (499).compareTo(499));
|
||||
Expect.equals(-1, (499).compareTo(inf));
|
||||
Expect.equals(-1, (499).compareTo(nan));
|
||||
Expect.equals(-1, (499).compareTo(mnan));
|
||||
|
||||
Expect.equals(1, inf.compareTo(-inf));
|
||||
Expect.equals(1, inf.compareTo(-499.0));
|
||||
Expect.equals(1, inf.compareTo(-499));
|
||||
Expect.equals(1, inf.compareTo(-0.0));
|
||||
Expect.equals(1, inf.compareTo(0));
|
||||
Expect.equals(1, inf.compareTo(0.0));
|
||||
Expect.equals(1, inf.compareTo(499.0));
|
||||
Expect.equals(1, inf.compareTo(499));
|
||||
Expect.equals(0, inf.compareTo(inf));
|
||||
Expect.equals(-1, inf.compareTo(nan));
|
||||
Expect.equals(-1, inf.compareTo(mnan));
|
||||
|
||||
Expect.equals(1, nan.compareTo(-inf));
|
||||
Expect.equals(1, nan.compareTo(-499.0));
|
||||
Expect.equals(1, nan.compareTo(-499));
|
||||
Expect.equals(1, nan.compareTo(-0.0));
|
||||
Expect.equals(1, nan.compareTo(0));
|
||||
Expect.equals(1, nan.compareTo(0.0));
|
||||
Expect.equals(1, nan.compareTo(499.0));
|
||||
Expect.equals(1, nan.compareTo(499));
|
||||
Expect.equals(1, nan.compareTo(inf));
|
||||
Expect.equals(0, nan.compareTo(nan));
|
||||
Expect.equals(0, nan.compareTo(mnan));
|
||||
}
|
||||
@@ -1,80 +0,0 @@
|
||||
// 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.
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
|
||||
// Test that a final list literal is not expandable nor modifiable.
|
||||
|
||||
class ConstListLiteralTest {
|
||||
static void testMain() {
|
||||
var list = const [4, 2, 3];
|
||||
Expect.equals(3, list.length);
|
||||
|
||||
var exception = null;
|
||||
try {
|
||||
list.add(4);
|
||||
} on UnsupportedError catch (e) {
|
||||
exception = e;
|
||||
}
|
||||
Expect.equals(true, exception != null);
|
||||
Expect.equals(3, list.length);
|
||||
exception = null;
|
||||
|
||||
exception = null;
|
||||
try {
|
||||
list.addAll([4, 5]);
|
||||
} on UnsupportedError catch (e) {
|
||||
exception = e;
|
||||
}
|
||||
Expect.equals(true, exception != null);
|
||||
Expect.equals(3, list.length);
|
||||
|
||||
exception = null;
|
||||
try {
|
||||
list[0] = 0;
|
||||
} on UnsupportedError catch (e) {
|
||||
exception = e;
|
||||
}
|
||||
Expect.equals(true, exception != null);
|
||||
Expect.equals(3, list.length);
|
||||
|
||||
exception = null;
|
||||
try {
|
||||
list.sort((a, b) => a - b);
|
||||
} on UnsupportedError catch (e) {
|
||||
exception = e;
|
||||
}
|
||||
Expect.equals(true, exception != null);
|
||||
Expect.equals(3, list.length);
|
||||
Expect.equals(4, list[0]);
|
||||
Expect.equals(2, list[1]);
|
||||
Expect.equals(3, list[2]);
|
||||
|
||||
exception = null;
|
||||
try {
|
||||
list.setRange(0, 1, [1], 0);
|
||||
} on UnsupportedError catch (e) {
|
||||
exception = e;
|
||||
}
|
||||
Expect.equals(true, exception != null);
|
||||
Expect.equals(3, list.length);
|
||||
Expect.equals(4, list[0]);
|
||||
Expect.equals(2, list[1]);
|
||||
Expect.equals(3, list[2]);
|
||||
|
||||
// Note: the next check is a regression test for dart2js. The immutable list
|
||||
// overrides the 'length' property of List, but relies on using the native
|
||||
// 'forEach' construct in Array. This test ensures that our strategy works
|
||||
// correctly.
|
||||
int x = 0;
|
||||
list.forEach((e) {
|
||||
x += e;
|
||||
});
|
||||
Expect.equals(9, x);
|
||||
}
|
||||
}
|
||||
|
||||
main() {
|
||||
ConstListLiteralTest.testMain();
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
// 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.
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
|
||||
main() {
|
||||
testImmutable(const []);
|
||||
testImmutable(const [1]);
|
||||
testImmutable(const [1, 2]);
|
||||
}
|
||||
|
||||
void expectUOE(Function f) {
|
||||
Expect.throws(f, (e) => e is UnsupportedError);
|
||||
}
|
||||
|
||||
testImmutable(var list) {
|
||||
expectUOE(() {
|
||||
list.removeRange(0, 0);
|
||||
});
|
||||
expectUOE(() {
|
||||
list.removeRange(0, 1);
|
||||
});
|
||||
expectUOE(() {
|
||||
list.removeRange(-1, 1);
|
||||
});
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
// 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.
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
|
||||
main() {
|
||||
testImmutable(const []);
|
||||
testImmutable(const [1]);
|
||||
testImmutable(const [1, 2]);
|
||||
}
|
||||
|
||||
void expectUOE(Function f) {
|
||||
Expect.throws(f, (e) => e is UnsupportedError);
|
||||
}
|
||||
|
||||
testImmutable(var list) {
|
||||
expectUOE(() {
|
||||
list.setRange(0, 0, const []);
|
||||
});
|
||||
expectUOE(() {
|
||||
list.setRange(0, 1, const [], 1);
|
||||
});
|
||||
expectUOE(() {
|
||||
list.setRange(0, 1, const []);
|
||||
});
|
||||
expectUOE(() {
|
||||
list.setRange(0, 0, []);
|
||||
});
|
||||
expectUOE(() {
|
||||
list.setRange(0, 1, [], 1);
|
||||
});
|
||||
expectUOE(() {
|
||||
list.setRange(0, 1, []);
|
||||
});
|
||||
expectUOE(() {
|
||||
list.setRange(0, 0, const [1]);
|
||||
});
|
||||
expectUOE(() {
|
||||
list.setRange(0, 1, const [1]);
|
||||
});
|
||||
expectUOE(() {
|
||||
list.setRange(0, 0, [1]);
|
||||
});
|
||||
expectUOE(() {
|
||||
list.setRange(0, 1, [1]);
|
||||
});
|
||||
expectUOE(() {
|
||||
list.setRange(0, 1, [1], 1);
|
||||
});
|
||||
}
|
||||
@@ -1,342 +0,0 @@
|
||||
// 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.
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
|
||||
/**
|
||||
* A test of simple runtime behavior on numbers, strings and lists with
|
||||
* a focus on both correct behavior and runtime errors.
|
||||
*
|
||||
* This file is written to use minimal type declarations to match a
|
||||
* typical dynamic language coding style.
|
||||
*/
|
||||
class CoreRuntimeTypesTest {
|
||||
static testMain() {
|
||||
testBooleanOperators();
|
||||
testRationalOperators();
|
||||
testIntegerOperators();
|
||||
testOperatorErrors();
|
||||
testRationalMethods();
|
||||
testIntegerMethods();
|
||||
testStringOperators();
|
||||
testStringMethods();
|
||||
testListOperators();
|
||||
testListMethods();
|
||||
testMapOperators();
|
||||
testMapMethods();
|
||||
testLiterals();
|
||||
testDateMethods();
|
||||
}
|
||||
|
||||
static assertEquals(a, b) {
|
||||
Expect.equals(b, a);
|
||||
}
|
||||
|
||||
static assertListEquals(List a, List b) {
|
||||
Expect.equals(b.length, a.length);
|
||||
for (int i = 0; i < a.length; i++) {
|
||||
Expect.equals(b[i], a[i]);
|
||||
}
|
||||
}
|
||||
|
||||
static assertListContains(List<Comparable> a, List<Comparable> b) {
|
||||
a.sort((x, y) => x.compareTo(y));
|
||||
b.sort((x, y) => x.compareTo(y));
|
||||
assertListEquals(a, b);
|
||||
}
|
||||
|
||||
static assertTypeError(void f()) {
|
||||
Expect.throws(
|
||||
f,
|
||||
(exception) =>
|
||||
(exception is TypeError) ||
|
||||
(exception is NoSuchMethodError) ||
|
||||
(exception is ArgumentError));
|
||||
}
|
||||
|
||||
static testBooleanOperators() {
|
||||
var x = true, y = false;
|
||||
assertEquals(x, true);
|
||||
assertEquals(y, false);
|
||||
assertEquals(x, !y);
|
||||
assertEquals(!x, y);
|
||||
}
|
||||
|
||||
static testRationalOperators() {
|
||||
var x = 10, y = 20;
|
||||
assertEquals(x + y, 30);
|
||||
assertEquals(x - y, -10);
|
||||
assertEquals(x * y, 200);
|
||||
assertEquals(x / y, 0.5);
|
||||
assertEquals(x ~/ y, 0);
|
||||
assertEquals(x % y, 10);
|
||||
}
|
||||
|
||||
static testIntegerOperators() {
|
||||
var x = 18, y = 17;
|
||||
assertEquals(x | y, 19);
|
||||
assertEquals(x & y, 16);
|
||||
assertEquals(x ^ y, 3);
|
||||
assertEquals(2 >> 1, 1);
|
||||
assertEquals(1 << 1, 2);
|
||||
}
|
||||
|
||||
static testOperatorErrors() {
|
||||
var objs = [
|
||||
1,
|
||||
'2',
|
||||
[3],
|
||||
null,
|
||||
true,
|
||||
new Map()
|
||||
];
|
||||
for (var i = 0; i < objs.length; i++) {
|
||||
for (var j = i + 1; j < objs.length; j++) {
|
||||
testBinaryOperatorErrors(objs[i], objs[j]);
|
||||
// Allow "String * int".
|
||||
if (j > 2) testBinaryOperatorErrors(objs[j], objs[i]);
|
||||
}
|
||||
if (objs[i] != 1) {
|
||||
testUnaryOperatorErrors(objs[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static testBinaryOperatorErrors(x, y) {
|
||||
assertTypeError(() {
|
||||
x - y;
|
||||
});
|
||||
assertTypeError(() {
|
||||
x * y;
|
||||
});
|
||||
assertTypeError(() {
|
||||
x / y;
|
||||
});
|
||||
assertTypeError(() {
|
||||
x | y;
|
||||
});
|
||||
assertTypeError(() {
|
||||
x ^ y;
|
||||
});
|
||||
assertTypeError(() {
|
||||
x & y;
|
||||
});
|
||||
assertTypeError(() {
|
||||
x << y;
|
||||
});
|
||||
assertTypeError(() {
|
||||
x >> y;
|
||||
});
|
||||
assertTypeError(() {
|
||||
x ~/ y;
|
||||
});
|
||||
assertTypeError(() {
|
||||
x % y;
|
||||
});
|
||||
|
||||
testComparisonOperatorErrors(x, y);
|
||||
}
|
||||
|
||||
static testComparisonOperatorErrors(x, y) {
|
||||
assertEquals(x == y, false);
|
||||
assertEquals(x != y, true);
|
||||
assertTypeError(() {
|
||||
x < y;
|
||||
});
|
||||
assertTypeError(() {
|
||||
x <= y;
|
||||
});
|
||||
assertTypeError(() {
|
||||
x > y;
|
||||
});
|
||||
assertTypeError(() {
|
||||
x >= y;
|
||||
});
|
||||
}
|
||||
|
||||
static testUnaryOperatorErrors(x) {
|
||||
// TODO(jimhug): Add guard for 'is num' when 'is' is working
|
||||
assertTypeError(() {
|
||||
~x;
|
||||
});
|
||||
assertTypeError(() {
|
||||
-x;
|
||||
});
|
||||
// TODO(jimhug): Add check for !x as an error when x is not a bool
|
||||
}
|
||||
|
||||
static testRationalMethods() {
|
||||
var x = 10.6;
|
||||
assertEquals(x.abs(), 10.6);
|
||||
assertEquals((-x).abs(), 10.6);
|
||||
assertEquals(x.round(), 11);
|
||||
assertEquals(x.floor(), 10);
|
||||
assertEquals(x.ceil(), 11);
|
||||
}
|
||||
|
||||
// TODO(jimhug): Determine correct behavior for mixing ints and floats.
|
||||
static testIntegerMethods() {
|
||||
var y = 9;
|
||||
assertEquals(y.isEven, false);
|
||||
assertEquals(y.isOdd, true);
|
||||
assertEquals(y.toRadixString(2), '1001');
|
||||
assertEquals(y.toRadixString(3), '100');
|
||||
assertEquals(y.toRadixString(16), '9');
|
||||
assertEquals((0).toRadixString(16), '0');
|
||||
try {
|
||||
y.toRadixString(0);
|
||||
Expect.fail("Illegal radix 0 accepted.");
|
||||
} catch (e) {}
|
||||
try {
|
||||
y.toRadixString(-1);
|
||||
Expect.fail("Illegal radix -1 accepted.");
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
static testStringOperators() {
|
||||
var s = "abcdef";
|
||||
assertEquals(s, "abcdef");
|
||||
assertEquals(s.codeUnitAt(0), 97);
|
||||
assertEquals(s[0], 'a');
|
||||
assertEquals(s.length, 6);
|
||||
assertTypeError(() {
|
||||
s[null];
|
||||
});
|
||||
assertTypeError(() {
|
||||
s['hello'];
|
||||
});
|
||||
assertTypeError(() {
|
||||
s[0] = 'x';
|
||||
});
|
||||
}
|
||||
|
||||
// TODO(jimhug): Fill out full set of string methods.
|
||||
static testStringMethods() {
|
||||
var s = "abcdef";
|
||||
assertEquals(s.isEmpty, false);
|
||||
assertEquals(s.isNotEmpty, true);
|
||||
assertEquals(s.startsWith("abc"), true);
|
||||
assertEquals(s.endsWith("def"), true);
|
||||
assertEquals(s.startsWith("aa"), false);
|
||||
assertEquals(s.endsWith("ff"), false);
|
||||
assertEquals(s.contains('cd', 0), true);
|
||||
assertEquals(s.contains('cd', 2), true);
|
||||
assertEquals(s.contains('cd', 3), false);
|
||||
assertEquals(s.indexOf('cd', 2), 2);
|
||||
assertEquals(s.indexOf('cd', 3), -1);
|
||||
|
||||
assertTypeError(() {
|
||||
s.startsWith(1);
|
||||
});
|
||||
assertTypeError(() {
|
||||
s.endsWith(1);
|
||||
});
|
||||
}
|
||||
|
||||
static testListOperators() {
|
||||
var a = [1, 2, 3, 4];
|
||||
assertEquals(a[0], 1);
|
||||
assertTypeError(() {
|
||||
a['0'];
|
||||
});
|
||||
a[0] = 42;
|
||||
assertEquals(a[0], 42);
|
||||
assertTypeError(() {
|
||||
a['0'] = 99;
|
||||
});
|
||||
assertEquals(a.length, 4);
|
||||
}
|
||||
|
||||
// TODO(jimhug): Fill out full set of list methods.
|
||||
static testListMethods() {
|
||||
var a = [1, 2, 3, 4];
|
||||
assertEquals(a.isEmpty, false);
|
||||
assertEquals(a.length, 4);
|
||||
var exception = null;
|
||||
a.clear();
|
||||
assertEquals(a.length, 0);
|
||||
}
|
||||
|
||||
static testMapOperators() {
|
||||
var d = new Map();
|
||||
d['a'] = 1;
|
||||
d['b'] = 2;
|
||||
assertEquals(d['a'], 1);
|
||||
assertEquals(d['b'], 2);
|
||||
assertEquals(d['c'], null);
|
||||
}
|
||||
|
||||
static testMapMethods() {
|
||||
var d = new Map();
|
||||
d['a'] = 1;
|
||||
d['b'] = 2;
|
||||
assertEquals(d.containsValue(2), true);
|
||||
assertEquals(d.containsValue(3), false);
|
||||
assertEquals(d.containsKey('a'), true);
|
||||
assertEquals(d.containsKey('c'), false);
|
||||
assertEquals(d.keys.length, 2);
|
||||
assertEquals(d.values.length, 2);
|
||||
|
||||
assertEquals(d.remove('c'), null);
|
||||
assertEquals(d.remove('b'), 2);
|
||||
assertEquals(d.keys.single, 'a');
|
||||
assertEquals(d.values.single, 1);
|
||||
|
||||
d['c'] = 3;
|
||||
d['f'] = 4;
|
||||
assertEquals(d.keys.length, 3);
|
||||
assertEquals(d.values.length, 3);
|
||||
assertListContains(d.keys.toList(), ['a', 'c', 'f']);
|
||||
assertListContains(d.values.toList(), [1, 3, 4]);
|
||||
|
||||
var count = 0;
|
||||
d.forEach((key, value) {
|
||||
count++;
|
||||
assertEquals(value, d[key]);
|
||||
});
|
||||
assertEquals(count, 3);
|
||||
|
||||
d = {'a': 1, 'b': 2};
|
||||
assertEquals(d.containsValue(2), true);
|
||||
assertEquals(d.containsValue(3), false);
|
||||
assertEquals(d.containsKey('a'), true);
|
||||
assertEquals(d.containsKey('c'), false);
|
||||
assertEquals(d.keys.length, 2);
|
||||
assertEquals(d.values.length, 2);
|
||||
|
||||
d['g'] = null;
|
||||
assertEquals(d.containsKey('g'), true);
|
||||
assertEquals(d['g'], null);
|
||||
}
|
||||
|
||||
static testDateMethods() {
|
||||
var msec = 115201000;
|
||||
var d = new DateTime.fromMillisecondsSinceEpoch(msec, isUtc: true);
|
||||
assertEquals(d.second, 1);
|
||||
assertEquals(d.year, 1970);
|
||||
|
||||
d = new DateTime.now();
|
||||
assertEquals(d.year >= 1970, true);
|
||||
}
|
||||
|
||||
static testLiterals() {
|
||||
true.toString();
|
||||
1.0.toString();
|
||||
.5.toString();
|
||||
1.toString();
|
||||
if (false) {
|
||||
// Depends on http://b/4198808.
|
||||
null.toString();
|
||||
}
|
||||
'${null}'.toString();
|
||||
'${true}'.toString();
|
||||
'${false}'.toString();
|
||||
''.toString();
|
||||
''.endsWith('');
|
||||
}
|
||||
}
|
||||
|
||||
main() {
|
||||
CoreRuntimeTypesTest.testMain();
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
# 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.
|
||||
|
||||
*: SkipByDesign # Deprecating Dart1 tests.
|
||||
@@ -1,335 +0,0 @@
|
||||
// Copyright (c) 2015, 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";
|
||||
import "dart:convert";
|
||||
import "dart:typed_data";
|
||||
|
||||
main() {
|
||||
testMediaType();
|
||||
|
||||
testRoundTrip("");
|
||||
testRoundTrip("a");
|
||||
testRoundTrip("ab");
|
||||
testRoundTrip("abc");
|
||||
testRoundTrip("abcd");
|
||||
testRoundTrip("Content with special%25 characters: # ? = % # ? = %");
|
||||
testRoundTrip("blåbærgrød", UTF8);
|
||||
testRoundTrip("blåbærgrød", LATIN1);
|
||||
|
||||
testUriEquals("data:,abc?d");
|
||||
testUriEquals("DATA:,ABC?D");
|
||||
testUriEquals("data:,a%20bc?d");
|
||||
testUriEquals("DATA:,A%20BC?D");
|
||||
testUriEquals("data:,abc?d%23e"); // # must and will be is escaped.
|
||||
|
||||
// Test that UriData.uri normalizes path and query.
|
||||
|
||||
testUtf8Encoding("\u1000\uffff");
|
||||
testBytes();
|
||||
testInvalidCharacters();
|
||||
testNormalization();
|
||||
testErrors();
|
||||
}
|
||||
|
||||
void testMediaType() {
|
||||
for (var mimeType in ["", "text/plain", "text/javascript"]) {
|
||||
for (var charset in ["", ";charset=US-ASCII", ";charset=UTF-8"]) {
|
||||
for (var base64 in ["", ";base64"]) {
|
||||
bool isBase64 = base64.isNotEmpty;
|
||||
var text = "data:$mimeType$charset$base64,";
|
||||
var uri = UriData.parse(text);
|
||||
|
||||
String expectedCharset =
|
||||
charset.isEmpty ? "US-ASCII" : charset.substring(9);
|
||||
String expectedMimeType = mimeType.isEmpty ? "text/plain" : mimeType;
|
||||
|
||||
Expect.equals(text, "$uri");
|
||||
Expect.equals(expectedMimeType, uri.mimeType);
|
||||
Expect.equals(expectedCharset, uri.charset);
|
||||
Expect.equals(isBase64, uri.isBase64);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void testRoundTrip(String content, [Encoding encoding]) {
|
||||
UriData dataUri = new UriData.fromString(content, encoding: encoding);
|
||||
Expect.isFalse(dataUri.isBase64);
|
||||
Uri uri = dataUri.uri;
|
||||
expectUriEquals(new Uri.dataFromString(content, encoding: encoding), uri);
|
||||
|
||||
if (encoding != null) {
|
||||
UriData dataUriParams =
|
||||
new UriData.fromString(content, parameters: {"charset": encoding.name});
|
||||
Expect.equals("$dataUri", "$dataUriParams");
|
||||
}
|
||||
|
||||
Expect.equals(encoding ?? ASCII, Encoding.getByName(dataUri.charset));
|
||||
Expect.equals(content, dataUri.contentAsString(encoding: encoding));
|
||||
Expect.equals(content, dataUri.contentAsString());
|
||||
Expect.equals(content, (encoding ?? ASCII).decode(dataUri.contentAsBytes()));
|
||||
|
||||
uri = dataUri.uri;
|
||||
Expect.equals(uri.toString(), dataUri.toString());
|
||||
Expect.equals(dataUri.toString(), new UriData.fromUri(uri).toString());
|
||||
|
||||
dataUri = new UriData.fromBytes(content.codeUnits);
|
||||
Expect.listEquals(content.codeUnits, dataUri.contentAsBytes());
|
||||
Expect.equals(content, dataUri.contentAsString(encoding: LATIN1));
|
||||
|
||||
uri = dataUri.uri;
|
||||
Expect.equals(uri.toString(), dataUri.toString());
|
||||
Expect.equals(dataUri.toString(), new UriData.fromUri(uri).toString());
|
||||
// Check that the URI is properly normalized.
|
||||
expectUriEquals(uri, Uri.parse("$uri"));
|
||||
}
|
||||
|
||||
void testUtf8Encoding(String content) {
|
||||
UriData uri = new UriData.fromString(content, encoding: UTF8);
|
||||
Expect.equals(content, uri.contentAsString(encoding: UTF8));
|
||||
Expect.listEquals(UTF8.encode(content), uri.contentAsBytes());
|
||||
}
|
||||
|
||||
void testInvalidCharacters() {
|
||||
// SPACE, CTL and tspecial, plus '%' and '#' (URI gen-delim)
|
||||
// This contains all ASCII character that are not valid in attribute/value
|
||||
// parts.
|
||||
var invalid =
|
||||
'\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x7f'
|
||||
' ()<>@,;:"/[]?=%#\x80\u{1000}\u{10000}';
|
||||
var invalidNoSlash = invalid.replaceAll('/', '');
|
||||
var dataUri = new UriData.fromString(invalid,
|
||||
encoding: UTF8,
|
||||
mimeType: "$invalidNoSlash/$invalidNoSlash",
|
||||
parameters: {invalid: invalid});
|
||||
|
||||
Expect.equals(invalid, dataUri.contentAsString());
|
||||
Expect.equals("$invalidNoSlash/$invalidNoSlash", dataUri.mimeType);
|
||||
Expect.equals(invalid, dataUri.parameters[invalid]);
|
||||
|
||||
var uri = dataUri.uri;
|
||||
Expect.equals("$uri", "$dataUri");
|
||||
expectUriEquals(uri, Uri.parse("$uri")); // Check that it's canonicalized.
|
||||
Expect.equals("$dataUri", new UriData.fromUri(uri).toString());
|
||||
}
|
||||
|
||||
void testBytes() {
|
||||
void testList(List<int> list) {
|
||||
var dataUri = new UriData.fromBytes(list);
|
||||
Expect.equals("application/octet-stream", dataUri.mimeType);
|
||||
Expect.isTrue(dataUri.isBase64);
|
||||
Expect.listEquals(list, dataUri.contentAsBytes());
|
||||
|
||||
dataUri = new UriData.fromBytes(list, percentEncoded: true);
|
||||
Expect.equals("application/octet-stream", dataUri.mimeType);
|
||||
Expect.isFalse(dataUri.isBase64);
|
||||
Expect.listEquals(list, dataUri.contentAsBytes());
|
||||
|
||||
var string = new String.fromCharCodes(list);
|
||||
|
||||
dataUri = new UriData.fromString(string, encoding: LATIN1);
|
||||
Expect.equals("text/plain", dataUri.mimeType);
|
||||
Expect.isFalse(dataUri.isBase64);
|
||||
Expect.listEquals(list, dataUri.contentAsBytes());
|
||||
|
||||
dataUri = new UriData.fromString(string, encoding: LATIN1, base64: true);
|
||||
Expect.equals("text/plain", dataUri.mimeType);
|
||||
Expect.isTrue(dataUri.isBase64);
|
||||
Expect.listEquals(list, dataUri.contentAsBytes());
|
||||
}
|
||||
|
||||
void testLists(List<int> list) {
|
||||
testList(list);
|
||||
for (int i = 0; i < 27; i++) {
|
||||
testList(list.sublist(i, i + i)); // All lengths from 0 to 27.
|
||||
}
|
||||
}
|
||||
|
||||
var bytes = new Uint8List(512);
|
||||
for (int i = 0; i < bytes.length; i++) {
|
||||
bytes[i] = i;
|
||||
}
|
||||
testLists(bytes);
|
||||
testLists(new List.from(bytes));
|
||||
testLists(new List.unmodifiable(bytes));
|
||||
}
|
||||
|
||||
void testNormalization() {
|
||||
// Base-64 normalization.
|
||||
|
||||
// Normalized URI-alphabet characters.
|
||||
Expect.equals(
|
||||
"data:;base64,AA/+", UriData.parse("data:;base64,AA_-").toString());
|
||||
// Normalized escapes.
|
||||
Expect.equals(
|
||||
"data:;base64,AB==", UriData.parse("data:;base64,A%42=%3D").toString());
|
||||
Expect.equals("data:;base64,/+/+",
|
||||
UriData.parse("data:;base64,%5F%2D%2F%2B").toString());
|
||||
// Normalized padded data.
|
||||
Expect.equals(
|
||||
"data:;base64,AA==", UriData.parse("data:;base64,AA%3D%3D").toString());
|
||||
Expect.equals(
|
||||
"data:;base64,AAA=", UriData.parse("data:;base64,AAA%3D").toString());
|
||||
// Normalized unpadded data.
|
||||
Expect.equals(
|
||||
"data:;base64,AA==", UriData.parse("data:;base64,AA").toString());
|
||||
Expect.equals(
|
||||
"data:;base64,AAA=", UriData.parse("data:;base64,AAA").toString());
|
||||
|
||||
// "URI normalization" of non-base64 content.
|
||||
var uri = UriData.parse("data:,\x20\xa0");
|
||||
Expect.equals("data:,%20%C2%A0", uri.toString());
|
||||
uri = UriData.parse("data:,x://x@y:[z]:42/p/./?q=x&y=z#?#\u1234\u{12345}");
|
||||
Expect.equals(
|
||||
"data:,x://x@y:%5Bz%5D:42/p/./?q=x&y=z%23?%23%E1%88%B4%F0%92%8D%85",
|
||||
uri.toString());
|
||||
}
|
||||
|
||||
bool badArgument(e) => e is ArgumentError;
|
||||
bool badFormat(e) => e is FormatException;
|
||||
|
||||
void testErrors() {
|
||||
// Invalid constructor parameters.
|
||||
Expect.throws(() {
|
||||
new UriData.fromBytes([], mimeType: "noslash");
|
||||
}, badArgument);
|
||||
Expect.throws(() {
|
||||
new UriData.fromBytes([257]);
|
||||
}, badArgument);
|
||||
Expect.throws(() {
|
||||
new UriData.fromBytes([-1]);
|
||||
}, badArgument);
|
||||
Expect.throws(() {
|
||||
new UriData.fromBytes([0x10000000]);
|
||||
}, badArgument);
|
||||
Expect.throws(() {
|
||||
new UriData.fromString("", mimeType: "noslash");
|
||||
}, badArgument);
|
||||
|
||||
Expect.throws(() {
|
||||
new Uri.dataFromBytes([], mimeType: "noslash");
|
||||
}, badArgument);
|
||||
Expect.throws(() {
|
||||
new Uri.dataFromBytes([257]);
|
||||
}, badArgument);
|
||||
Expect.throws(() {
|
||||
new Uri.dataFromBytes([-1]);
|
||||
}, badArgument);
|
||||
Expect.throws(() {
|
||||
new Uri.dataFromBytes([0x10000000]);
|
||||
}, badArgument);
|
||||
Expect.throws(() {
|
||||
new Uri.dataFromString("", mimeType: "noslash");
|
||||
}, badArgument);
|
||||
|
||||
// Empty parameters allowed, not an error.
|
||||
var uri = new UriData.fromString("", mimeType: "", parameters: {});
|
||||
Expect.equals("data:,", "$uri");
|
||||
// Empty parameter key or value is an error.
|
||||
Expect.throws(
|
||||
() => new UriData.fromString("", parameters: {"": "X"}), badArgument);
|
||||
Expect.throws(
|
||||
() => new UriData.fromString("", parameters: {"X": ""}), badArgument);
|
||||
|
||||
// Not recognizing charset is an error.
|
||||
uri = UriData.parse("data:;charset=arglebargle,X");
|
||||
Expect.throws(() {
|
||||
uri.contentAsString();
|
||||
});
|
||||
// Doesn't throw if we specify the encoding.
|
||||
Expect.equals("X", uri.contentAsString(encoding: ASCII));
|
||||
|
||||
// Parse format.
|
||||
Expect.throws(() {
|
||||
UriData.parse("notdata:,");
|
||||
}, badFormat);
|
||||
Expect.throws(() {
|
||||
UriData.parse("text/plain,noscheme");
|
||||
}, badFormat);
|
||||
Expect.throws(() {
|
||||
UriData.parse("data:noseparator");
|
||||
}, badFormat);
|
||||
Expect.throws(() {
|
||||
UriData.parse("data:noslash,text");
|
||||
}, badFormat);
|
||||
Expect.throws(() {
|
||||
UriData.parse("data:type/sub;noequals,text");
|
||||
}, badFormat);
|
||||
Expect.throws(() {
|
||||
UriData.parse("data:type/sub;knocomma=");
|
||||
}, badFormat);
|
||||
Expect.throws(() {
|
||||
UriData.parse("data:type/sub;k=v;nocomma");
|
||||
}, badFormat);
|
||||
Expect.throws(() {
|
||||
UriData.parse("data:type/sub;k=nocomma");
|
||||
}, badFormat);
|
||||
Expect.throws(() {
|
||||
UriData.parse("data:type/sub;k=v;base64");
|
||||
}, badFormat);
|
||||
|
||||
void formatError(String input) {
|
||||
Expect.throws(() => UriData.parse("data:;base64,$input"), badFormat, input);
|
||||
}
|
||||
|
||||
// Invalid base64 format (detected when parsed).
|
||||
for (var a = 0; a <= 4; a++) {
|
||||
for (var p = 0; p <= 4; p++) {
|
||||
// Base-64 encoding must have length divisible by four and no more
|
||||
// than two padding characters at the end.
|
||||
if (p < 3 && (a + p) % 4 == 0) continue;
|
||||
if (p == 0 && a > 1) continue;
|
||||
formatError("A" * a + "=" * p);
|
||||
formatError("A" * a + "%3D" * p);
|
||||
}
|
||||
}
|
||||
// Invalid base64 encoding: padding not at end.
|
||||
formatError("AA=A");
|
||||
formatError("A=AA");
|
||||
formatError("=AAA");
|
||||
formatError("A==A");
|
||||
formatError("==AA");
|
||||
formatError("===A");
|
||||
formatError("AAA%3D=");
|
||||
formatError("A%3D==");
|
||||
|
||||
// Invalid unpadded data.
|
||||
formatError("A");
|
||||
formatError("AAAAA");
|
||||
|
||||
// Invalid characters.
|
||||
formatError("AAA*");
|
||||
formatError("AAA\x00");
|
||||
formatError("AAA\\");
|
||||
formatError("AAA,");
|
||||
|
||||
// Invalid escapes.
|
||||
formatError("AAA%25");
|
||||
formatError("AAA%7F");
|
||||
formatError("AAA%7F");
|
||||
}
|
||||
|
||||
/// Checks that two [Uri]s are exactly the same.
|
||||
expectUriEquals(Uri expect, Uri actual) {
|
||||
Expect.equals(expect.scheme, actual.scheme, "scheme");
|
||||
Expect.equals(expect.hasAuthority, actual.hasAuthority, "hasAuthority");
|
||||
Expect.equals(expect.userInfo, actual.userInfo, "userInfo");
|
||||
Expect.equals(expect.host, actual.host, "host");
|
||||
Expect.equals(expect.hasPort, actual.hasPort, "hasPort");
|
||||
Expect.equals(expect.port, actual.port, "port");
|
||||
Expect.equals(expect.port, actual.port, "port");
|
||||
Expect.equals(expect.hasQuery, actual.hasQuery, "hasQuery");
|
||||
Expect.equals(expect.query, actual.query, "query");
|
||||
Expect.equals(expect.hasFragment, actual.hasFragment, "hasFragment");
|
||||
Expect.equals(expect.fragment, actual.fragment, "fragment");
|
||||
}
|
||||
|
||||
void testUriEquals(String uriText) {
|
||||
var data = UriData.parse(uriText);
|
||||
var uri = Uri.parse(uriText);
|
||||
Expect.equals(data.uri, uri);
|
||||
Expect.equals(data.toString(), uri.data.toString());
|
||||
Expect.equals(data.toString(), uri.toString());
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
// 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";
|
||||
|
||||
// Make sure the years in the range of single digits are handled correctly with
|
||||
// month roll-over. (This tests an edge condition when delegating to
|
||||
// JavaScript's Date constructor.)
|
||||
|
||||
void check(String expected, DateTime actual) {
|
||||
Expect.equals(expected, actual.toString());
|
||||
}
|
||||
|
||||
testUtc() {
|
||||
check("0099-01-01 00:00:00.000Z", new DateTime.utc(99, 1));
|
||||
check("0100-01-01 00:00:00.000Z", new DateTime.utc(99, 1 + 12));
|
||||
check("0000-01-01 00:00:00.000Z", new DateTime.utc(0, 1));
|
||||
check("-0001-01-01 00:00:00.000Z", new DateTime.utc(0, 1 - 12));
|
||||
|
||||
check("0099-03-02 00:00:00.000Z", new DateTime.utc(99, 2, 30));
|
||||
check("0100-03-02 00:00:00.000Z", new DateTime.utc(99, 2 + 12, 30));
|
||||
|
||||
check("0004-03-01 00:00:00.000Z", new DateTime.utc(3, 2 + 12, 30));
|
||||
check("0004-03-01 00:00:00.000Z", new DateTime.utc(4, 2, 30));
|
||||
check("0004-03-01 00:00:00.000Z", new DateTime.utc(5, 2 - 12, 30));
|
||||
|
||||
check("0005-03-02 00:00:00.000Z", new DateTime.utc(4, 2 + 12, 30));
|
||||
check("0005-03-02 00:00:00.000Z", new DateTime.utc(5, 2, 30));
|
||||
check("0005-03-02 00:00:00.000Z", new DateTime.utc(6, 2 - 12, 30));
|
||||
}
|
||||
|
||||
testLocal() {
|
||||
check("0099-01-01 00:00:00.000", new DateTime(99, 1));
|
||||
check("0100-01-01 00:00:00.000", new DateTime(99, 1 + 12));
|
||||
check("0000-01-01 00:00:00.000", new DateTime(0, 1));
|
||||
check("-0001-01-01 00:00:00.000", new DateTime(0, 1 - 12));
|
||||
|
||||
check("0099-03-02 00:00:00.000", new DateTime(99, 2, 30));
|
||||
check("0100-03-02 00:00:00.000", new DateTime(99, 2 + 12, 30));
|
||||
|
||||
check("0004-03-01 00:00:00.000", new DateTime(3, 2 + 12, 30));
|
||||
check("0004-03-01 00:00:00.000", new DateTime(4, 2, 30));
|
||||
check("0004-03-01 00:00:00.000", new DateTime(5, 2 - 12, 30));
|
||||
|
||||
check("0005-03-02 00:00:00.000", new DateTime(4, 2 + 12, 30));
|
||||
check("0005-03-02 00:00:00.000", new DateTime(5, 2, 30));
|
||||
check("0005-03-02 00:00:00.000", new DateTime(6, 2 - 12, 30));
|
||||
}
|
||||
|
||||
main() {
|
||||
testUtc();
|
||||
testLocal();
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
// 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";
|
||||
|
||||
// Dart test program for DateTime's hashCode.
|
||||
|
||||
main() {
|
||||
var d = DateTime.parse("2000-01-01T00:00:00Z");
|
||||
var d2 = DateTime.parse("2000-01-01T00:00:01Z");
|
||||
// There is no guarantee that the hashcode for these two dates is different,
|
||||
// but in the worst case we will have to fix this test.
|
||||
// The important test here is, that DateTime .
|
||||
Expect.isFalse(d.hashCode == d2.hashCode);
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
// 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";
|
||||
|
||||
// At some point dart was emitting a bad padding 0 for Dates where the ms were
|
||||
// ending with 10.
|
||||
|
||||
main() {
|
||||
String s = "2012-01-30 08:30:00.010";
|
||||
DateTime d = DateTime.parse(s);
|
||||
Expect.equals(s, d.toString());
|
||||
}
|
||||
@@ -1,104 +0,0 @@
|
||||
// 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";
|
||||
|
||||
// Test fromString with 6 digits after the decimal point.
|
||||
|
||||
bool get supportsMicroseconds =>
|
||||
new DateTime.fromMicrosecondsSinceEpoch(1).microsecondsSinceEpoch == 1;
|
||||
|
||||
main() {
|
||||
if (supportsMicroseconds) {
|
||||
testMicrosecondPrecision();
|
||||
} else {
|
||||
testMillisecondPrecision();
|
||||
}
|
||||
}
|
||||
|
||||
void testMillisecondPrecision() {
|
||||
// We only support milliseconds. If the user supplies more data (the "51"
|
||||
// here), we round.
|
||||
DateTime dt1 = DateTime.parse("1999-01-02 23:59:59.999519");
|
||||
Expect.equals(1999, dt1.year);
|
||||
Expect.equals(1, dt1.month);
|
||||
Expect.equals(3, dt1.day);
|
||||
Expect.equals(0, dt1.hour);
|
||||
Expect.equals(0, dt1.minute);
|
||||
Expect.equals(0, dt1.second);
|
||||
Expect.equals(0, dt1.millisecond);
|
||||
Expect.equals(false, dt1.isUtc);
|
||||
dt1 = DateTime.parse("1999-01-02 23:58:59.999519Z");
|
||||
Expect.equals(1999, dt1.year);
|
||||
Expect.equals(1, dt1.month);
|
||||
Expect.equals(2, dt1.day);
|
||||
Expect.equals(23, dt1.hour);
|
||||
Expect.equals(59, dt1.minute);
|
||||
Expect.equals(0, dt1.second);
|
||||
Expect.equals(0, dt1.millisecond);
|
||||
Expect.equals(true, dt1.isUtc);
|
||||
dt1 = DateTime.parse("0009-09-09 09:09:09.009411Z");
|
||||
Expect.equals(9, dt1.year);
|
||||
Expect.equals(9, dt1.month);
|
||||
Expect.equals(9, dt1.day);
|
||||
Expect.equals(9, dt1.hour);
|
||||
Expect.equals(9, dt1.minute);
|
||||
Expect.equals(9, dt1.second);
|
||||
Expect.equals(9, dt1.millisecond);
|
||||
Expect.equals(true, dt1.isUtc);
|
||||
String svnDate = "2012-03-30T04:28:13.752341Z";
|
||||
dt1 = DateTime.parse(svnDate);
|
||||
Expect.equals(2012, dt1.year);
|
||||
Expect.equals(3, dt1.month);
|
||||
Expect.equals(30, dt1.day);
|
||||
Expect.equals(4, dt1.hour);
|
||||
Expect.equals(28, dt1.minute);
|
||||
Expect.equals(13, dt1.second);
|
||||
Expect.equals(752, dt1.millisecond);
|
||||
Expect.equals(true, dt1.isUtc);
|
||||
}
|
||||
|
||||
void testMicrosecondPrecision() {
|
||||
DateTime dt1 = DateTime.parse("1999-01-02 23:59:59.999519");
|
||||
Expect.equals(1999, dt1.year);
|
||||
Expect.equals(1, dt1.month);
|
||||
Expect.equals(2, dt1.day);
|
||||
Expect.equals(23, dt1.hour);
|
||||
Expect.equals(59, dt1.minute);
|
||||
Expect.equals(59, dt1.second);
|
||||
Expect.equals(999, dt1.millisecond);
|
||||
Expect.equals(519, dt1.microsecond);
|
||||
Expect.equals(false, dt1.isUtc);
|
||||
dt1 = DateTime.parse("1999-01-02 23:58:59.999519Z");
|
||||
Expect.equals(1999, dt1.year);
|
||||
Expect.equals(1, dt1.month);
|
||||
Expect.equals(2, dt1.day);
|
||||
Expect.equals(23, dt1.hour);
|
||||
Expect.equals(58, dt1.minute);
|
||||
Expect.equals(59, dt1.second);
|
||||
Expect.equals(999, dt1.millisecond);
|
||||
Expect.equals(519, dt1.microsecond);
|
||||
Expect.equals(true, dt1.isUtc);
|
||||
dt1 = DateTime.parse("0009-09-09 09:09:09.009411Z");
|
||||
Expect.equals(9, dt1.year);
|
||||
Expect.equals(9, dt1.month);
|
||||
Expect.equals(9, dt1.day);
|
||||
Expect.equals(9, dt1.hour);
|
||||
Expect.equals(9, dt1.minute);
|
||||
Expect.equals(9, dt1.second);
|
||||
Expect.equals(9, dt1.millisecond);
|
||||
Expect.equals(411, dt1.microsecond);
|
||||
Expect.equals(true, dt1.isUtc);
|
||||
String svnDate = "2012-03-30T04:28:13.752341Z";
|
||||
dt1 = DateTime.parse(svnDate);
|
||||
Expect.equals(2012, dt1.year);
|
||||
Expect.equals(3, dt1.month);
|
||||
Expect.equals(30, dt1.day);
|
||||
Expect.equals(4, dt1.hour);
|
||||
Expect.equals(28, dt1.minute);
|
||||
Expect.equals(13, dt1.second);
|
||||
Expect.equals(752, dt1.millisecond);
|
||||
Expect.equals(341, dt1.microsecond);
|
||||
Expect.equals(true, dt1.isUtc);
|
||||
}
|
||||
@@ -1,81 +0,0 @@
|
||||
// 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";
|
||||
|
||||
// Test DateTime constructor with optional arguments.
|
||||
|
||||
main() {
|
||||
var d = new DateTime(2012);
|
||||
Expect.equals(2012, d.year);
|
||||
Expect.equals(1, d.month);
|
||||
Expect.equals(1, d.day);
|
||||
Expect.equals(0, d.hour);
|
||||
Expect.equals(0, d.minute);
|
||||
Expect.equals(0, d.second);
|
||||
Expect.equals(0, d.millisecond);
|
||||
|
||||
d = new DateTime(2012, 1, 28);
|
||||
Expect.equals(2012, d.year);
|
||||
Expect.equals(1, d.month);
|
||||
Expect.equals(28, d.day);
|
||||
Expect.equals(0, d.hour);
|
||||
Expect.equals(0, d.minute);
|
||||
Expect.equals(0, d.second);
|
||||
Expect.equals(0, d.millisecond);
|
||||
|
||||
d = new DateTime(1970, 3);
|
||||
Expect.equals(1970, d.year);
|
||||
Expect.equals(3, d.month);
|
||||
Expect.equals(1, d.day);
|
||||
Expect.equals(0, d.hour);
|
||||
Expect.equals(0, d.minute);
|
||||
Expect.equals(0, d.second);
|
||||
Expect.equals(0, d.millisecond);
|
||||
|
||||
d = new DateTime(1970, 3, 1, 11);
|
||||
Expect.equals(1970, d.year);
|
||||
Expect.equals(3, d.month);
|
||||
Expect.equals(1, d.day);
|
||||
Expect.equals(11, d.hour);
|
||||
Expect.equals(0, d.minute);
|
||||
Expect.equals(0, d.second);
|
||||
Expect.equals(0, d.millisecond);
|
||||
|
||||
d = new DateTime(0, 12, 24, 0, 12);
|
||||
Expect.equals(0, d.year);
|
||||
Expect.equals(12, d.month);
|
||||
Expect.equals(24, d.day);
|
||||
Expect.equals(0, d.hour);
|
||||
Expect.equals(12, d.minute);
|
||||
Expect.equals(0, d.second);
|
||||
Expect.equals(0, d.millisecond);
|
||||
|
||||
d = new DateTime(-1, 2, 2, 3, 0, 0, 4);
|
||||
Expect.equals(-1, d.year);
|
||||
Expect.equals(2, d.month);
|
||||
Expect.equals(2, d.day);
|
||||
Expect.equals(3, d.hour);
|
||||
Expect.equals(0, d.minute);
|
||||
Expect.equals(0, d.second);
|
||||
Expect.equals(4, d.millisecond);
|
||||
|
||||
d = new DateTime(-1, 2, 2, 3, 0, 4);
|
||||
Expect.equals(-1, d.year);
|
||||
Expect.equals(2, d.month);
|
||||
Expect.equals(2, d.day);
|
||||
Expect.equals(3, d.hour);
|
||||
Expect.equals(0, d.minute);
|
||||
Expect.equals(4, d.second);
|
||||
Expect.equals(0, d.millisecond);
|
||||
|
||||
d = new DateTime(2012, 5, 15, 13, 21, 33, 12);
|
||||
Expect.equals(2012, d.year);
|
||||
Expect.equals(5, d.month);
|
||||
Expect.equals(15, d.day);
|
||||
Expect.equals(13, d.hour);
|
||||
Expect.equals(21, d.minute);
|
||||
Expect.equals(33, d.second);
|
||||
Expect.equals(12, d.millisecond);
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
// 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";
|
||||
|
||||
// Test DateTime comparison operators.
|
||||
|
||||
main() {
|
||||
var d = new DateTime.fromMillisecondsSinceEpoch(0, isUtc: true);
|
||||
var d2 = new DateTime.fromMillisecondsSinceEpoch(1, isUtc: true);
|
||||
Expect.isTrue(d.isBefore(d2));
|
||||
Expect.isTrue(!d.isAfter(d2));
|
||||
Expect.isTrue(d2.isAfter(d));
|
||||
Expect.isTrue(!d2.isBefore(d));
|
||||
Expect.isFalse(d2.isBefore(d));
|
||||
Expect.isFalse(!d2.isAfter(d));
|
||||
Expect.isFalse(d.isAfter(d2));
|
||||
Expect.isFalse(!d.isBefore(d2));
|
||||
|
||||
d = new DateTime.fromMillisecondsSinceEpoch(-1, isUtc: true);
|
||||
d2 = new DateTime.fromMillisecondsSinceEpoch(0, isUtc: true);
|
||||
Expect.isTrue(d.isBefore(d2));
|
||||
Expect.isTrue(!d.isAfter(d2));
|
||||
Expect.isTrue(d2.isAfter(d));
|
||||
Expect.isTrue(!d2.isBefore(d));
|
||||
Expect.isFalse(d2.isBefore(d));
|
||||
Expect.isFalse(!d2.isAfter(d));
|
||||
Expect.isFalse(d.isAfter(d2));
|
||||
Expect.isFalse(!d.isBefore(d2));
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
// 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";
|
||||
|
||||
// Test DateTime timeZoneName and timeZoneOffset getters.
|
||||
|
||||
testUtc() {
|
||||
var d = DateTime.parse("2012-03-04T03:25:38.123Z");
|
||||
Expect.equals("UTC", d.timeZoneName);
|
||||
Expect.equals(0, d.timeZoneOffset.inSeconds);
|
||||
}
|
||||
|
||||
testLocal() {
|
||||
checkOffset(String name, Duration offset) {
|
||||
// Timezone abbreviations are not in bijection with their timezones.
|
||||
// For example AST stands for "Arab Standard Time" (UTC+03), as well as
|
||||
// "Arabian Standard Time" (UTC+04), or PST stands for Pacific Standard Time
|
||||
// and Philippine Standard Time.
|
||||
//
|
||||
// Hardcode some common timezones.
|
||||
if (name == "CET") {
|
||||
Expect.equals(1, offset.inHours);
|
||||
} else if (name == "CEST") {
|
||||
Expect.equals(2, offset.inHours);
|
||||
} else if (name == "GMT") {
|
||||
Expect.equals(0, offset.inSeconds);
|
||||
} else if (name == "EST") {
|
||||
Expect.equals(-5, offset.inHours);
|
||||
} else if (name == "EDT") {
|
||||
Expect.equals(-4, offset.inHours);
|
||||
} else if (name == "PDT") {
|
||||
Expect.equals(-7, offset.inHours);
|
||||
}
|
||||
}
|
||||
|
||||
var d = DateTime.parse("2012-01-02T13:45:23");
|
||||
String name = d.timeZoneName;
|
||||
checkOffset(name, d.timeZoneOffset);
|
||||
|
||||
d = DateTime.parse("2012-07-02T13:45:23");
|
||||
name = d.timeZoneName;
|
||||
checkOffset(name, d.timeZoneOffset);
|
||||
}
|
||||
|
||||
main() {
|
||||
testUtc();
|
||||
testLocal();
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
// 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";
|
||||
|
||||
// Make sure the year 0 is correctly printed.
|
||||
|
||||
testUtc() {
|
||||
var d = new DateTime.utc(0, 1, 1);
|
||||
Expect.equals("0000-01-01 00:00:00.000Z", d.toString());
|
||||
}
|
||||
|
||||
testLocal() {
|
||||
var d = new DateTime(0, 1, 1);
|
||||
Expect.equals("0000-01-01 00:00:00.000", d.toString());
|
||||
}
|
||||
|
||||
main() {
|
||||
testUtc();
|
||||
testLocal();
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
// Copyright (c) 2013, 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() {
|
||||
var dt = new DateTime.now();
|
||||
Expect.isTrue(dt is Comparable);
|
||||
|
||||
var dt2 = new DateTime.fromMillisecondsSinceEpoch(100);
|
||||
var dt3 = new DateTime.fromMillisecondsSinceEpoch(200, isUtc: true);
|
||||
var dt3b = new DateTime.fromMillisecondsSinceEpoch(200);
|
||||
var dt4 = new DateTime.fromMillisecondsSinceEpoch(300);
|
||||
var dt5 = new DateTime.fromMillisecondsSinceEpoch(400, isUtc: true);
|
||||
var dt5b = new DateTime.fromMillisecondsSinceEpoch(400);
|
||||
|
||||
Expect.isTrue(dt2.compareTo(dt2) == 0);
|
||||
Expect.isTrue(dt3.compareTo(dt3) == 0);
|
||||
Expect.isTrue(dt3b.compareTo(dt3b) == 0);
|
||||
Expect.isTrue(dt4.compareTo(dt4) == 0);
|
||||
Expect.isTrue(dt5.compareTo(dt5) == 0);
|
||||
Expect.isTrue(dt5b.compareTo(dt5b) == 0);
|
||||
|
||||
// Time zones don't have any effect.
|
||||
Expect.isTrue(dt3.compareTo(dt3b) == 0);
|
||||
Expect.isTrue(dt5.compareTo(dt5b) == 0);
|
||||
|
||||
Expect.isTrue(dt2.compareTo(dt3) < 0);
|
||||
Expect.isTrue(dt3.compareTo(dt4) < 0);
|
||||
Expect.isTrue(dt4.compareTo(dt5) < 0);
|
||||
|
||||
Expect.isTrue(dt2.compareTo(dt3b) < 0);
|
||||
Expect.isTrue(dt4.compareTo(dt5b) < 0);
|
||||
|
||||
Expect.isTrue(dt3.compareTo(dt2) > 0);
|
||||
Expect.isTrue(dt4.compareTo(dt3) > 0);
|
||||
Expect.isTrue(dt5.compareTo(dt4) > 0);
|
||||
|
||||
Expect.isTrue(dt3b.compareTo(dt2) > 0);
|
||||
Expect.isTrue(dt5b.compareTo(dt4) > 0);
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
// Copyright (c) 2013, 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";
|
||||
|
||||
check(DateTime expected, String str) {
|
||||
DateTime actual = DateTime.parse(str);
|
||||
Expect.equals(expected, actual); // Only checks if they are at the same time.
|
||||
Expect.equals(expected.isUtc, actual.isUtc);
|
||||
}
|
||||
|
||||
bool get supportsMicroseconds =>
|
||||
new DateTime.fromMicrosecondsSinceEpoch(1).microsecondsSinceEpoch == 1;
|
||||
|
||||
main() {
|
||||
check(new DateTime(2012, 02, 27, 13, 27), "2012-02-27 13:27:00");
|
||||
if (supportsMicroseconds) {
|
||||
check(new DateTime.utc(2012, 02, 27, 13, 27, 0, 123, 456),
|
||||
"2012-02-27 13:27:00.123456z");
|
||||
} else {
|
||||
check(new DateTime.utc(2012, 02, 27, 13, 27, 0, 123, 456),
|
||||
"2012-02-27 13:27:00.123z");
|
||||
}
|
||||
check(new DateTime(2012, 02, 27, 13, 27), "20120227 13:27:00");
|
||||
check(new DateTime(2012, 02, 27, 13, 27), "20120227T132700");
|
||||
check(new DateTime(2012, 02, 27), "20120227");
|
||||
check(new DateTime(2012, 02, 27), "+20120227");
|
||||
check(new DateTime.utc(2012, 02, 27, 14), "2012-02-27T14Z");
|
||||
check(new DateTime.utc(-12345, 1, 1), "-123450101 00:00:00 Z");
|
||||
check(new DateTime.utc(2012, 02, 27, 14), "2012-02-27T14+00");
|
||||
check(new DateTime.utc(2012, 02, 27, 14), "2012-02-27T14+0000");
|
||||
check(new DateTime.utc(2012, 02, 27, 14), "2012-02-27T14+00:00");
|
||||
check(new DateTime.utc(2012, 02, 27, 14), "2012-02-27T14 +00:00");
|
||||
|
||||
check(new DateTime.utc(2015, 02, 14, 13, 0, 0, 0), "2015-02-15T00:00+11");
|
||||
check(new DateTime.utc(2015, 02, 14, 13, 0, 0, 0), "2015-02-15T00:00:00+11");
|
||||
check(
|
||||
new DateTime.utc(2015, 02, 14, 13, 0, 0, 0), "2015-02-15T00:00:00+11:00");
|
||||
|
||||
if (supportsMicroseconds) {
|
||||
check(new DateTime.utc(2015, 02, 15, 0, 0, 0, 500, 500),
|
||||
"2015-02-15T00:00:00.500500Z");
|
||||
check(new DateTime.utc(2015, 02, 15, 0, 0, 0, 511, 500),
|
||||
"2015-02-15T00:00:00.511500Z");
|
||||
} else {
|
||||
check(new DateTime.utc(2015, 02, 15, 0, 0, 0, 501),
|
||||
"2015-02-15T00:00:00.501Z");
|
||||
check(new DateTime.utc(2015, 02, 15, 0, 0, 0, 512),
|
||||
"2015-02-15T00:00:00.512Z");
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,12 +0,0 @@
|
||||
// Copyright (c) 2013, 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() {
|
||||
Expect.throws(() => double.INFINITY.ceil(), (e) => e is UnsupportedError);
|
||||
Expect.throws(
|
||||
() => double.NEGATIVE_INFINITY.ceil(), (e) => e is UnsupportedError);
|
||||
Expect.throws(() => double.NAN.ceil(), (e) => e is UnsupportedError);
|
||||
}
|
||||
@@ -1,84 +0,0 @@
|
||||
// Copyright (c) 2013, 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() {
|
||||
Expect.equals(0, 0.0.ceil());
|
||||
Expect.equals(1, double.MIN_POSITIVE.ceil());
|
||||
Expect.equals(1, (2.0 * double.MIN_POSITIVE).ceil());
|
||||
Expect.equals(1, (1.18e-38).ceil());
|
||||
Expect.equals(1, (1.18e-38 * 2).ceil());
|
||||
Expect.equals(1, 0.49999999999999994.ceil());
|
||||
Expect.equals(1, 0.5.ceil());
|
||||
Expect.equals(1, 0.9999999999999999.ceil());
|
||||
Expect.equals(1, 1.0.ceil());
|
||||
Expect.equals(2, 1.000000000000001.ceil());
|
||||
// The following numbers are on the border of 52 bits.
|
||||
// For example: 4503599627370499 + 0.5 => 4503599627370500.
|
||||
Expect.equals(4503599627370496, 4503599627370496.0.ceil());
|
||||
Expect.equals(4503599627370497, 4503599627370497.0.ceil());
|
||||
Expect.equals(4503599627370498, 4503599627370498.0.ceil());
|
||||
Expect.equals(4503599627370499, 4503599627370499.0.ceil());
|
||||
|
||||
Expect.equals(9007199254740991, 9007199254740991.0.ceil());
|
||||
Expect.equals(9007199254740992, 9007199254740992.0.ceil());
|
||||
Expect.equals(
|
||||
179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368,
|
||||
double.MAX_FINITE.ceil());
|
||||
|
||||
Expect.equals(0, (-double.MIN_POSITIVE).ceil());
|
||||
Expect.equals(0, (2.0 * -double.MIN_POSITIVE).ceil());
|
||||
Expect.equals(0, (-1.18e-38).ceil());
|
||||
Expect.equals(0, (-1.18e-38 * 2).ceil());
|
||||
Expect.equals(0, (-0.49999999999999994).ceil());
|
||||
Expect.equals(0, (-0.5).ceil());
|
||||
Expect.equals(0, (-0.9999999999999999).ceil());
|
||||
Expect.equals(-1, (-1.0).ceil());
|
||||
Expect.equals(-1, (-1.000000000000001).ceil());
|
||||
Expect.equals(-4503599627370496, (-4503599627370496.0).ceil());
|
||||
Expect.equals(-4503599627370497, (-4503599627370497.0).ceil());
|
||||
Expect.equals(-4503599627370498, (-4503599627370498.0).ceil());
|
||||
Expect.equals(-4503599627370499, (-4503599627370499.0).ceil());
|
||||
Expect.equals(-9007199254740991, (-9007199254740991.0).ceil());
|
||||
Expect.equals(-9007199254740992, (-9007199254740992.0).ceil());
|
||||
Expect.equals(
|
||||
-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368,
|
||||
(-double.MAX_FINITE).ceil());
|
||||
|
||||
Expect.isTrue(0.0.ceil() is int);
|
||||
Expect.isTrue(double.MIN_POSITIVE.ceil() is int);
|
||||
Expect.isTrue((2.0 * double.MIN_POSITIVE).ceil() is int);
|
||||
Expect.isTrue((1.18e-38).ceil() is int);
|
||||
Expect.isTrue((1.18e-38 * 2).ceil() is int);
|
||||
Expect.isTrue(0.49999999999999994.ceil() is int);
|
||||
Expect.isTrue(0.5.ceil() is int);
|
||||
Expect.isTrue(0.9999999999999999.ceil() is int);
|
||||
Expect.isTrue(1.0.ceil() is int);
|
||||
Expect.isTrue(1.000000000000001.ceil() is int);
|
||||
Expect.isTrue(4503599627370496.0.ceil() is int);
|
||||
Expect.isTrue(4503599627370497.0.ceil() is int);
|
||||
Expect.isTrue(4503599627370498.0.ceil() is int);
|
||||
Expect.isTrue(4503599627370499.0.ceil() is int);
|
||||
Expect.isTrue(9007199254740991.0.ceil() is int);
|
||||
Expect.isTrue(9007199254740992.0.ceil() is int);
|
||||
Expect.isTrue(double.MAX_FINITE.ceil() is int);
|
||||
|
||||
Expect.isTrue((-double.MIN_POSITIVE).ceil() is int);
|
||||
Expect.isTrue((2.0 * -double.MIN_POSITIVE).ceil() is int);
|
||||
Expect.isTrue((-1.18e-38).ceil() is int);
|
||||
Expect.isTrue((-1.18e-38 * 2).ceil() is int);
|
||||
Expect.isTrue((-0.49999999999999994).ceil() is int);
|
||||
Expect.isTrue((-0.5).ceil() is int);
|
||||
Expect.isTrue((-0.9999999999999999).ceil() is int);
|
||||
Expect.isTrue((-1.0).ceil() is int);
|
||||
Expect.isTrue((-1.000000000000001).ceil() is int);
|
||||
Expect.isTrue((-4503599627370496.0).ceil() is int);
|
||||
Expect.isTrue((-4503599627370497.0).ceil() is int);
|
||||
Expect.isTrue((-4503599627370498.0).ceil() is int);
|
||||
Expect.isTrue((-4503599627370499.0).ceil() is int);
|
||||
Expect.isTrue((-9007199254740991.0).ceil() is int);
|
||||
Expect.isTrue((-9007199254740992.0).ceil() is int);
|
||||
Expect.isTrue((-double.MAX_FINITE).ceil() is int);
|
||||
}
|
||||
@@ -1,93 +0,0 @@
|
||||
// Copyright (c) 2013, 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() {
|
||||
Expect.equals(0.0, 0.0.ceilToDouble());
|
||||
Expect.equals(1.0, double.MIN_POSITIVE.ceilToDouble());
|
||||
Expect.equals(1.0, (2.0 * double.MIN_POSITIVE).ceilToDouble());
|
||||
Expect.equals(1.0, (1.18e-38).ceilToDouble());
|
||||
Expect.equals(1.0, (1.18e-38 * 2).ceilToDouble());
|
||||
Expect.equals(1.0, 0.49999999999999994.ceilToDouble());
|
||||
Expect.equals(1.0, 0.5.ceilToDouble());
|
||||
Expect.equals(1.0, 0.9999999999999999.ceilToDouble());
|
||||
Expect.equals(1.0, 1.0.ceilToDouble());
|
||||
Expect.equals(2.0, 1.000000000000001.ceilToDouble());
|
||||
// The following numbers are on the border of 52 bits.
|
||||
// For example: 4503599627370499 + 0.5 => 4503599627370500.
|
||||
Expect.equals(4503599627370496.0, 4503599627370496.0.ceilToDouble());
|
||||
Expect.equals(4503599627370497.0, 4503599627370497.0.ceilToDouble());
|
||||
Expect.equals(4503599627370498.0, 4503599627370498.0.ceilToDouble());
|
||||
Expect.equals(4503599627370499.0, 4503599627370499.0.ceilToDouble());
|
||||
|
||||
Expect.equals(9007199254740991.0, 9007199254740991.0.ceilToDouble());
|
||||
Expect.equals(9007199254740992.0, 9007199254740992.0.ceilToDouble());
|
||||
Expect.equals(double.MAX_FINITE, double.MAX_FINITE.ceilToDouble());
|
||||
|
||||
Expect.equals(0.0, (-double.MIN_POSITIVE).ceilToDouble());
|
||||
Expect.equals(0.0, (2.0 * -double.MIN_POSITIVE).ceilToDouble());
|
||||
Expect.equals(0.0, (-1.18e-38).ceilToDouble());
|
||||
Expect.equals(0.0, (-1.18e-38 * 2).ceilToDouble());
|
||||
Expect.equals(0.0, (-0.49999999999999994).ceilToDouble());
|
||||
Expect.equals(0.0, (-0.5).ceilToDouble());
|
||||
Expect.equals(0.0, (-0.9999999999999999).ceilToDouble());
|
||||
Expect.equals(-1.0, (-1.0).ceilToDouble());
|
||||
Expect.equals(-1.0, (-1.000000000000001).ceilToDouble());
|
||||
Expect.equals(-4503599627370496.0, (-4503599627370496.0).ceilToDouble());
|
||||
Expect.equals(-4503599627370497.0, (-4503599627370497.0).ceilToDouble());
|
||||
Expect.equals(-4503599627370498.0, (-4503599627370498.0).ceilToDouble());
|
||||
Expect.equals(-4503599627370499.0, (-4503599627370499.0).ceilToDouble());
|
||||
Expect.equals(-9007199254740991.0, (-9007199254740991.0).ceilToDouble());
|
||||
Expect.equals(-9007199254740992.0, (-9007199254740992.0).ceilToDouble());
|
||||
Expect.equals(-double.MAX_FINITE, (-double.MAX_FINITE).ceilToDouble());
|
||||
|
||||
Expect.equals(double.INFINITY, double.INFINITY.ceilToDouble());
|
||||
Expect.equals(
|
||||
double.NEGATIVE_INFINITY, double.NEGATIVE_INFINITY.ceilToDouble());
|
||||
Expect.isTrue(double.NAN.ceilToDouble().isNaN);
|
||||
|
||||
Expect.isTrue(0.0.ceilToDouble() is double);
|
||||
Expect.isTrue(double.MIN_POSITIVE.ceilToDouble() is double);
|
||||
Expect.isTrue((2.0 * double.MIN_POSITIVE).ceilToDouble() is double);
|
||||
Expect.isTrue((1.18e-38).ceilToDouble() is double);
|
||||
Expect.isTrue((1.18e-38 * 2).ceilToDouble() is double);
|
||||
Expect.isTrue(0.49999999999999994.ceilToDouble() is double);
|
||||
Expect.isTrue(0.5.ceilToDouble() is double);
|
||||
Expect.isTrue(0.9999999999999999.ceilToDouble() is double);
|
||||
Expect.isTrue(1.0.ceilToDouble() is double);
|
||||
Expect.isTrue(1.000000000000001.ceilToDouble() is double);
|
||||
Expect.isTrue(4503599627370496.0.ceilToDouble() is double);
|
||||
Expect.isTrue(4503599627370497.0.ceilToDouble() is double);
|
||||
Expect.isTrue(4503599627370498.0.ceilToDouble() is double);
|
||||
Expect.isTrue(4503599627370499.0.ceilToDouble() is double);
|
||||
Expect.isTrue(9007199254740991.0.ceilToDouble() is double);
|
||||
Expect.isTrue(9007199254740992.0.ceilToDouble() is double);
|
||||
Expect.isTrue(double.MAX_FINITE.ceilToDouble() is double);
|
||||
|
||||
Expect.isTrue((-double.MIN_POSITIVE).ceilToDouble().isNegative);
|
||||
Expect.isTrue((2.0 * -double.MIN_POSITIVE).ceilToDouble().isNegative);
|
||||
Expect.isTrue((-1.18e-38).ceilToDouble().isNegative);
|
||||
Expect.isTrue((-1.18e-38 * 2).ceilToDouble().isNegative);
|
||||
Expect.isTrue((-0.49999999999999994).ceilToDouble().isNegative);
|
||||
Expect.isTrue((-0.5).ceilToDouble().isNegative);
|
||||
Expect.isTrue((-0.9999999999999999).ceilToDouble().isNegative);
|
||||
|
||||
Expect.isTrue((-double.MIN_POSITIVE).ceilToDouble() is double);
|
||||
Expect.isTrue((2.0 * -double.MIN_POSITIVE).ceilToDouble() is double);
|
||||
Expect.isTrue((-1.18e-38).ceilToDouble() is double);
|
||||
Expect.isTrue((-1.18e-38 * 2).ceilToDouble() is double);
|
||||
Expect.isTrue((-0.49999999999999994).ceilToDouble() is double);
|
||||
Expect.isTrue((-0.5).ceilToDouble() is double);
|
||||
Expect.isTrue((-0.9999999999999999).ceilToDouble() is double);
|
||||
Expect.isTrue((-1.0).ceilToDouble() is double);
|
||||
Expect.isTrue((-1.000000000000001).ceilToDouble() is double);
|
||||
Expect.isTrue((-4503599627370496.0).ceilToDouble() is double);
|
||||
Expect.isTrue((-4503599627370497.0).ceilToDouble() is double);
|
||||
Expect.isTrue((-4503599627370498.0).ceilToDouble() is double);
|
||||
Expect.isTrue((-4503599627370499.0).ceilToDouble() is double);
|
||||
Expect.isTrue((-9007199254740991.0).ceilToDouble() is double);
|
||||
Expect.isTrue((-9007199254740992.0).ceilToDouble() is double);
|
||||
Expect.isTrue((-double.MAX_FINITE).ceilToDouble() is double);
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
// 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.
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
|
||||
// Dart test program for testing 'compare' on doubles.
|
||||
|
||||
void main() {
|
||||
Expect.equals(0, (0.0).compareTo(0.0));
|
||||
Expect.equals(0, (1.0).compareTo(1.0));
|
||||
Expect.equals(0, (-2.0).compareTo(-2.0));
|
||||
Expect.equals(0, (1e-50).compareTo(1e-50));
|
||||
Expect.equals(0, (-2e50).compareTo(-2e50));
|
||||
Expect.equals(0, double.NAN.compareTo(double.NAN));
|
||||
Expect.equals(0, double.INFINITY.compareTo(double.INFINITY));
|
||||
Expect.equals(
|
||||
0, double.NEGATIVE_INFINITY.compareTo(double.NEGATIVE_INFINITY));
|
||||
Expect.equals(0, (-0.0).compareTo(-0.0));
|
||||
Expect.isTrue((0.0).compareTo(1.0) < 0);
|
||||
Expect.isTrue((1.0).compareTo(0.0) > 0);
|
||||
Expect.isTrue((0.0).compareTo(-1.0) > 0);
|
||||
Expect.isTrue((-1.0).compareTo(0.0) < 0);
|
||||
Expect.isTrue((0.0).compareTo(1234e11) < 0);
|
||||
Expect.isTrue((123e-112).compareTo(0.0) > 0);
|
||||
Expect.isTrue((0.0).compareTo(-123.0e12) > 0);
|
||||
Expect.isTrue((-1.0e8).compareTo(0.0) < 0);
|
||||
|
||||
double maxDouble = 1.7976931348623157e308;
|
||||
Expect.equals(0, maxDouble.compareTo(maxDouble));
|
||||
Expect.isTrue(maxDouble.compareTo(double.INFINITY) < 0);
|
||||
Expect.isTrue(double.INFINITY.compareTo(maxDouble) > 0);
|
||||
|
||||
double negMaxDouble = -maxDouble;
|
||||
Expect.equals(0, negMaxDouble.compareTo(negMaxDouble));
|
||||
Expect.isTrue(double.NEGATIVE_INFINITY.compareTo(negMaxDouble) < 0);
|
||||
Expect.isTrue(negMaxDouble.compareTo(double.NEGATIVE_INFINITY) > 0);
|
||||
|
||||
Expect.isTrue((-0.0).compareTo(0.0) < 0);
|
||||
Expect.isTrue((0.0).compareTo(-0.0) > 0);
|
||||
Expect.isTrue(double.NAN.compareTo(double.INFINITY) > 0);
|
||||
Expect.isTrue(double.NAN.compareTo(double.NEGATIVE_INFINITY) > 0);
|
||||
Expect.isTrue(double.INFINITY.compareTo(double.NAN) < 0);
|
||||
Expect.isTrue(double.NEGATIVE_INFINITY.compareTo(double.NAN) < 0);
|
||||
Expect.isTrue(maxDouble.compareTo(double.NAN) < 0);
|
||||
Expect.isTrue(negMaxDouble.compareTo(double.NAN) < 0);
|
||||
Expect.isTrue(double.NAN.compareTo(maxDouble) > 0);
|
||||
Expect.isTrue(double.NAN.compareTo(negMaxDouble) > 0);
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
// Copyright (c) 2013, 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() {
|
||||
Expect.throws(() => double.INFINITY.floor(), (e) => e is UnsupportedError);
|
||||
Expect.throws(
|
||||
() => double.NEGATIVE_INFINITY.floor(), (e) => e is UnsupportedError);
|
||||
Expect.throws(() => double.NAN.floor(), (e) => e is UnsupportedError);
|
||||
}
|
||||
@@ -1,84 +0,0 @@
|
||||
// Copyright (c) 2013, 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() {
|
||||
Expect.equals(0, 0.0.floor());
|
||||
Expect.equals(0, double.MIN_POSITIVE.floor());
|
||||
Expect.equals(0, (2.0 * double.MIN_POSITIVE).floor());
|
||||
Expect.equals(0, (1.18e-38).floor());
|
||||
Expect.equals(0, (1.18e-38 * 2).floor());
|
||||
Expect.equals(0, 0.49999999999999994.floor());
|
||||
Expect.equals(0, 0.5.floor());
|
||||
Expect.equals(0, 0.9999999999999999.floor());
|
||||
Expect.equals(1, 1.0.floor());
|
||||
Expect.equals(1, 1.000000000000001.floor());
|
||||
// The following numbers are on the border of 52 bits.
|
||||
// For example: 4503599627370499 + 0.5 => 4503599627370500.
|
||||
Expect.equals(4503599627370496, 4503599627370496.0.floor());
|
||||
Expect.equals(4503599627370497, 4503599627370497.0.floor());
|
||||
Expect.equals(4503599627370498, 4503599627370498.0.floor());
|
||||
Expect.equals(4503599627370499, 4503599627370499.0.floor());
|
||||
|
||||
Expect.equals(9007199254740991, 9007199254740991.0.floor());
|
||||
Expect.equals(9007199254740992, 9007199254740992.0.floor());
|
||||
Expect.equals(
|
||||
179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368,
|
||||
double.MAX_FINITE.floor());
|
||||
|
||||
Expect.equals(-1, (-double.MIN_POSITIVE).floor());
|
||||
Expect.equals(-1, (2.0 * -double.MIN_POSITIVE).floor());
|
||||
Expect.equals(-1, (-1.18e-38).floor());
|
||||
Expect.equals(-1, (-1.18e-38 * 2).floor());
|
||||
Expect.equals(-1, (-0.49999999999999994).floor());
|
||||
Expect.equals(-1, (-0.5).floor());
|
||||
Expect.equals(-1, (-0.9999999999999999).floor());
|
||||
Expect.equals(-1, (-1.0).floor());
|
||||
Expect.equals(-2, (-1.000000000000001).floor());
|
||||
Expect.equals(-4503599627370496, (-4503599627370496.0).floor());
|
||||
Expect.equals(-4503599627370497, (-4503599627370497.0).floor());
|
||||
Expect.equals(-4503599627370498, (-4503599627370498.0).floor());
|
||||
Expect.equals(-4503599627370499, (-4503599627370499.0).floor());
|
||||
Expect.equals(-9007199254740991, (-9007199254740991.0).floor());
|
||||
Expect.equals(-9007199254740992, (-9007199254740992.0).floor());
|
||||
Expect.equals(
|
||||
-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368,
|
||||
(-double.MAX_FINITE).floor());
|
||||
|
||||
Expect.isTrue(0.0.floor() is int);
|
||||
Expect.isTrue(double.MIN_POSITIVE.floor() is int);
|
||||
Expect.isTrue((2.0 * double.MIN_POSITIVE).floor() is int);
|
||||
Expect.isTrue((1.18e-38).floor() is int);
|
||||
Expect.isTrue((1.18e-38 * 2).floor() is int);
|
||||
Expect.isTrue(0.49999999999999994.floor() is int);
|
||||
Expect.isTrue(0.5.floor() is int);
|
||||
Expect.isTrue(0.9999999999999999.floor() is int);
|
||||
Expect.isTrue(1.0.floor() is int);
|
||||
Expect.isTrue(1.000000000000001.floor() is int);
|
||||
Expect.isTrue(4503599627370496.0.floor() is int);
|
||||
Expect.isTrue(4503599627370497.0.floor() is int);
|
||||
Expect.isTrue(4503599627370498.0.floor() is int);
|
||||
Expect.isTrue(4503599627370499.0.floor() is int);
|
||||
Expect.isTrue(9007199254740991.0.floor() is int);
|
||||
Expect.isTrue(9007199254740992.0.floor() is int);
|
||||
Expect.isTrue(double.MAX_FINITE.floor() is int);
|
||||
|
||||
Expect.isTrue((-double.MIN_POSITIVE).floor() is int);
|
||||
Expect.isTrue((2.0 * -double.MIN_POSITIVE).floor() is int);
|
||||
Expect.isTrue((-1.18e-38).floor() is int);
|
||||
Expect.isTrue((-1.18e-38 * 2).floor() is int);
|
||||
Expect.isTrue((-0.49999999999999994).floor() is int);
|
||||
Expect.isTrue((-0.5).floor() is int);
|
||||
Expect.isTrue((-0.9999999999999999).floor() is int);
|
||||
Expect.isTrue((-1.0).floor() is int);
|
||||
Expect.isTrue((-1.000000000000001).floor() is int);
|
||||
Expect.isTrue((-4503599627370496.0).floor() is int);
|
||||
Expect.isTrue((-4503599627370497.0).floor() is int);
|
||||
Expect.isTrue((-4503599627370498.0).floor() is int);
|
||||
Expect.isTrue((-4503599627370499.0).floor() is int);
|
||||
Expect.isTrue((-9007199254740991.0).floor() is int);
|
||||
Expect.isTrue((-9007199254740992.0).floor() is int);
|
||||
Expect.isTrue((-double.MAX_FINITE).floor() is int);
|
||||
}
|
||||
@@ -1,85 +0,0 @@
|
||||
// Copyright (c) 2013, 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() {
|
||||
Expect.equals(0.0, 0.0.floorToDouble());
|
||||
Expect.equals(0.0, double.MIN_POSITIVE.floorToDouble());
|
||||
Expect.equals(0.0, (2.0 * double.MIN_POSITIVE).floorToDouble());
|
||||
Expect.equals(0.0, (1.18e-38).floorToDouble());
|
||||
Expect.equals(0.0, (1.18e-38 * 2).floorToDouble());
|
||||
Expect.equals(0.0, 0.49999999999999994.floorToDouble());
|
||||
Expect.equals(0.0, 0.5.floorToDouble());
|
||||
Expect.equals(0.0, 0.9999999999999999.floorToDouble());
|
||||
Expect.equals(1.0, 1.0.floorToDouble());
|
||||
Expect.equals(1.0, 1.000000000000001.floorToDouble());
|
||||
// The following numbers are on the border of 52 bits.
|
||||
// For example: 4503599627370499 + 0.5 => 4503599627370500.
|
||||
Expect.equals(4503599627370496.0, 4503599627370496.0.floorToDouble());
|
||||
Expect.equals(4503599627370497.0, 4503599627370497.0.floorToDouble());
|
||||
Expect.equals(4503599627370498.0, 4503599627370498.0.floorToDouble());
|
||||
Expect.equals(4503599627370499.0, 4503599627370499.0.floorToDouble());
|
||||
|
||||
Expect.equals(9007199254740991.0, 9007199254740991.0.floorToDouble());
|
||||
Expect.equals(9007199254740992.0, 9007199254740992.0.floorToDouble());
|
||||
Expect.equals(double.MAX_FINITE, double.MAX_FINITE.floorToDouble());
|
||||
|
||||
Expect.equals(-1.0, (-double.MIN_POSITIVE).floorToDouble());
|
||||
Expect.equals(-1.0, (2.0 * -double.MIN_POSITIVE).floorToDouble());
|
||||
Expect.equals(-1.0, (-1.18e-38).floorToDouble());
|
||||
Expect.equals(-1.0, (-1.18e-38 * 2).floorToDouble());
|
||||
Expect.equals(-1.0, (-0.49999999999999994).floorToDouble());
|
||||
Expect.equals(-1.0, (-0.5).floorToDouble());
|
||||
Expect.equals(-1.0, (-0.9999999999999999).floorToDouble());
|
||||
Expect.equals(-1.0, (-1.0).floorToDouble());
|
||||
Expect.equals(-2.0, (-1.000000000000001).floorToDouble());
|
||||
Expect.equals(-4503599627370496.0, (-4503599627370496.0).floorToDouble());
|
||||
Expect.equals(-4503599627370497.0, (-4503599627370497.0).floorToDouble());
|
||||
Expect.equals(-4503599627370498.0, (-4503599627370498.0).floorToDouble());
|
||||
Expect.equals(-4503599627370499.0, (-4503599627370499.0).floorToDouble());
|
||||
Expect.equals(-9007199254740991.0, (-9007199254740991.0).floorToDouble());
|
||||
Expect.equals(-9007199254740992.0, (-9007199254740992.0).floorToDouble());
|
||||
Expect.equals(-double.MAX_FINITE, (-double.MAX_FINITE).floorToDouble());
|
||||
|
||||
Expect.equals(double.INFINITY, double.INFINITY.floorToDouble());
|
||||
Expect.equals(
|
||||
double.NEGATIVE_INFINITY, double.NEGATIVE_INFINITY.floorToDouble());
|
||||
Expect.isTrue(double.NAN.floorToDouble().isNaN);
|
||||
|
||||
Expect.isTrue(0.0.floorToDouble() is double);
|
||||
Expect.isTrue(double.MIN_POSITIVE.floorToDouble() is double);
|
||||
Expect.isTrue((2.0 * double.MIN_POSITIVE).floorToDouble() is double);
|
||||
Expect.isTrue((1.18e-38).floorToDouble() is double);
|
||||
Expect.isTrue((1.18e-38 * 2).floorToDouble() is double);
|
||||
Expect.isTrue(0.49999999999999994.floorToDouble() is double);
|
||||
Expect.isTrue(0.5.floorToDouble() is double);
|
||||
Expect.isTrue(0.9999999999999999.floorToDouble() is double);
|
||||
Expect.isTrue(1.0.floorToDouble() is double);
|
||||
Expect.isTrue(1.000000000000001.floorToDouble() is double);
|
||||
Expect.isTrue(4503599627370496.0.floorToDouble() is double);
|
||||
Expect.isTrue(4503599627370497.0.floorToDouble() is double);
|
||||
Expect.isTrue(4503599627370498.0.floorToDouble() is double);
|
||||
Expect.isTrue(4503599627370499.0.floorToDouble() is double);
|
||||
Expect.isTrue(9007199254740991.0.floorToDouble() is double);
|
||||
Expect.isTrue(9007199254740992.0.floorToDouble() is double);
|
||||
Expect.isTrue(double.MAX_FINITE.floorToDouble() is double);
|
||||
|
||||
Expect.isTrue((-double.MIN_POSITIVE).floorToDouble() is double);
|
||||
Expect.isTrue((2.0 * -double.MIN_POSITIVE).floorToDouble() is double);
|
||||
Expect.isTrue((-1.18e-38).floorToDouble() is double);
|
||||
Expect.isTrue((-1.18e-38 * 2).floorToDouble() is double);
|
||||
Expect.isTrue((-0.49999999999999994).floorToDouble() is double);
|
||||
Expect.isTrue((-0.5).floorToDouble() is double);
|
||||
Expect.isTrue((-0.9999999999999999).floorToDouble() is double);
|
||||
Expect.isTrue((-1.0).floorToDouble() is double);
|
||||
Expect.isTrue((-1.000000000000001).floorToDouble() is double);
|
||||
Expect.isTrue((-4503599627370496.0).floorToDouble() is double);
|
||||
Expect.isTrue((-4503599627370497.0).floorToDouble() is double);
|
||||
Expect.isTrue((-4503599627370498.0).floorToDouble() is double);
|
||||
Expect.isTrue((-4503599627370499.0).floorToDouble() is double);
|
||||
Expect.isTrue((-9007199254740991.0).floorToDouble() is double);
|
||||
Expect.isTrue((-9007199254740992.0).floorToDouble() is double);
|
||||
Expect.isTrue((-double.MAX_FINITE).floorToDouble() is double);
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,12 +0,0 @@
|
||||
// Copyright (c) 2013, 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() {
|
||||
Expect.throws(() => double.INFINITY.round(), (e) => e is UnsupportedError);
|
||||
Expect.throws(
|
||||
() => double.NEGATIVE_INFINITY.round(), (e) => e is UnsupportedError);
|
||||
Expect.throws(() => double.NAN.round(), (e) => e is UnsupportedError);
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
// Copyright (c) 2013, 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() {
|
||||
Expect.equals(0, 0.49999999999999994.round());
|
||||
Expect.equals(0, (-0.49999999999999994).round());
|
||||
Expect.isTrue(0.49999999999999994.round() is int);
|
||||
Expect.isTrue((-0.49999999999999994).round() is int);
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
// Copyright (c) 2013, 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() {
|
||||
// The following numbers are on the border of 52 bits.
|
||||
// For example: 4503599627370499 + 0.5 => 4503599627370500.
|
||||
Expect.equals(4503599627370496, 4503599627370496.0.round());
|
||||
Expect.equals(4503599627370497, 4503599627370497.0.round());
|
||||
Expect.equals(4503599627370498, 4503599627370498.0.round());
|
||||
Expect.equals(4503599627370499, 4503599627370499.0.round());
|
||||
|
||||
Expect.equals(9007199254740991, 9007199254740991.0.round());
|
||||
Expect.equals(9007199254740992, 9007199254740992.0.round());
|
||||
|
||||
Expect.equals(-4503599627370496, (-4503599627370496.0).round());
|
||||
Expect.equals(-4503599627370497, (-4503599627370497.0).round());
|
||||
Expect.equals(-4503599627370498, (-4503599627370498.0).round());
|
||||
Expect.equals(-4503599627370499, (-4503599627370499.0).round());
|
||||
|
||||
Expect.equals(-9007199254740991, (-9007199254740991.0).round());
|
||||
Expect.equals(-9007199254740992, (-9007199254740992.0).round());
|
||||
|
||||
Expect.isTrue(4503599627370496.0.round() is int);
|
||||
Expect.isTrue(4503599627370497.0.round() is int);
|
||||
Expect.isTrue(4503599627370498.0.round() is int);
|
||||
Expect.isTrue(4503599627370499.0.round() is int);
|
||||
Expect.isTrue(9007199254740991.0.round() is int);
|
||||
Expect.isTrue(9007199254740992.0.round() is int);
|
||||
Expect.isTrue((-4503599627370496.0).round() is int);
|
||||
Expect.isTrue((-4503599627370497.0).round() is int);
|
||||
Expect.isTrue((-4503599627370498.0).round() is int);
|
||||
Expect.isTrue((-4503599627370499.0).round() is int);
|
||||
Expect.isTrue((-9007199254740991.0).round() is int);
|
||||
Expect.isTrue((-9007199254740992.0).round() is int);
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
// Copyright (c) 2013, 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() {
|
||||
Expect.equals(0, 0.0.round());
|
||||
Expect.equals(0, double.MIN_POSITIVE.round());
|
||||
Expect.equals(0, (2.0 * double.MIN_POSITIVE).round());
|
||||
Expect.equals(0, (1.18e-38).round());
|
||||
Expect.equals(0, (1.18e-38 * 2).round());
|
||||
Expect.equals(1, 0.5.round());
|
||||
Expect.equals(1, 0.9999999999999999.round());
|
||||
Expect.equals(1, 1.0.round());
|
||||
Expect.equals(1, 1.000000000000001.round());
|
||||
|
||||
Expect.equals(
|
||||
179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368,
|
||||
double.MAX_FINITE.round());
|
||||
|
||||
Expect.equals(0, (-double.MIN_POSITIVE).round());
|
||||
Expect.equals(0, (2.0 * -double.MIN_POSITIVE).round());
|
||||
Expect.equals(0, (-1.18e-38).round());
|
||||
Expect.equals(0, (-1.18e-38 * 2).round());
|
||||
Expect.equals(-1, (-0.5).round());
|
||||
Expect.equals(-1, (-0.9999999999999999).round());
|
||||
Expect.equals(-1, (-1.0).round());
|
||||
Expect.equals(-1, (-1.000000000000001).round());
|
||||
Expect.equals(
|
||||
-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368,
|
||||
(-double.MAX_FINITE).round());
|
||||
|
||||
Expect.isTrue(0.0.round() is int);
|
||||
Expect.isTrue(double.MIN_POSITIVE.round() is int);
|
||||
Expect.isTrue((2.0 * double.MIN_POSITIVE).round() is int);
|
||||
Expect.isTrue((1.18e-38).round() is int);
|
||||
Expect.isTrue((1.18e-38 * 2).round() is int);
|
||||
Expect.isTrue(0.5.round() is int);
|
||||
Expect.isTrue(0.9999999999999999.round() is int);
|
||||
Expect.isTrue(1.0.round() is int);
|
||||
Expect.isTrue(1.000000000000001.round() is int);
|
||||
Expect.isTrue(double.MAX_FINITE.round() is int);
|
||||
|
||||
Expect.isTrue((-double.MIN_POSITIVE).round() is int);
|
||||
Expect.isTrue((2.0 * -double.MIN_POSITIVE).round() is int);
|
||||
Expect.isTrue((-1.18e-38).round() is int);
|
||||
Expect.isTrue((-1.18e-38 * 2).round() is int);
|
||||
Expect.isTrue((-0.5).round() is int);
|
||||
Expect.isTrue((-0.9999999999999999).round() is int);
|
||||
Expect.isTrue((-1.0).round() is int);
|
||||
Expect.isTrue((-1.000000000000001).round() is int);
|
||||
Expect.isTrue((-double.MAX_FINITE).round() is int);
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
// Copyright (c) 2013, 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() {
|
||||
Expect.equals(0.0, 0.49999999999999994.roundToDouble());
|
||||
Expect.equals(0.0, (-0.49999999999999994).roundToDouble());
|
||||
Expect.isTrue(0.49999999999999994.roundToDouble() is double);
|
||||
Expect.isTrue((-0.49999999999999994).roundToDouble().isNegative);
|
||||
Expect.isTrue((-0.49999999999999994).roundToDouble() is double);
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
// Copyright (c) 2013, 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() {
|
||||
// The following numbers are on the border of 52 bits.
|
||||
// For example: 4503599627370499 + 0.5 => 4503599627370500.
|
||||
Expect.equals(4503599627370496.0, 4503599627370496.0.roundToDouble());
|
||||
Expect.equals(4503599627370497.0, 4503599627370497.0.roundToDouble());
|
||||
Expect.equals(4503599627370498.0, 4503599627370498.0.roundToDouble());
|
||||
Expect.equals(4503599627370499.0, 4503599627370499.0.roundToDouble());
|
||||
Expect.equals(9007199254740991.0, 9007199254740991.0.roundToDouble());
|
||||
Expect.equals(9007199254740992.0, 9007199254740992.0.roundToDouble());
|
||||
Expect.equals(-4503599627370496.0, (-4503599627370496.0).roundToDouble());
|
||||
Expect.equals(-4503599627370497.0, (-4503599627370497.0).roundToDouble());
|
||||
Expect.equals(-4503599627370498.0, (-4503599627370498.0).roundToDouble());
|
||||
Expect.equals(-4503599627370499.0, (-4503599627370499.0).roundToDouble());
|
||||
Expect.equals(-9007199254740991.0, (-9007199254740991.0).roundToDouble());
|
||||
Expect.equals(-9007199254740992.0, (-9007199254740992.0).roundToDouble());
|
||||
Expect.isTrue(4503599627370496.0.roundToDouble() is double);
|
||||
Expect.isTrue(4503599627370497.0.roundToDouble() is double);
|
||||
Expect.isTrue(4503599627370498.0.roundToDouble() is double);
|
||||
Expect.isTrue(4503599627370499.0.roundToDouble() is double);
|
||||
Expect.isTrue(9007199254740991.0.roundToDouble() is double);
|
||||
Expect.isTrue(9007199254740992.0.roundToDouble() is double);
|
||||
Expect.isTrue((-4503599627370496.0).roundToDouble() is double);
|
||||
Expect.isTrue((-4503599627370497.0).roundToDouble() is double);
|
||||
Expect.isTrue((-4503599627370498.0).roundToDouble() is double);
|
||||
Expect.isTrue((-4503599627370499.0).roundToDouble() is double);
|
||||
Expect.isTrue((-9007199254740991.0).roundToDouble() is double);
|
||||
Expect.isTrue((-9007199254740992.0).roundToDouble() is double);
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
// Copyright (c) 2013, 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() {
|
||||
Expect.equals(0.0, 0.0.roundToDouble());
|
||||
Expect.equals(0.0, double.MIN_POSITIVE.roundToDouble());
|
||||
Expect.equals(0.0, (2.0 * double.MIN_POSITIVE).roundToDouble());
|
||||
Expect.equals(0.0, (1.18e-38).roundToDouble());
|
||||
Expect.equals(0.0, (1.18e-38 * 2).roundToDouble());
|
||||
Expect.equals(1.0, 0.5.roundToDouble());
|
||||
Expect.equals(1.0, 0.9999999999999999.roundToDouble());
|
||||
Expect.equals(1.0, 1.0.roundToDouble());
|
||||
Expect.equals(1.0, 1.000000000000001.roundToDouble());
|
||||
Expect.equals(2.0, 1.5.roundToDouble());
|
||||
|
||||
Expect.equals(double.MAX_FINITE, double.MAX_FINITE.roundToDouble());
|
||||
|
||||
Expect.equals(0.0, (-double.MIN_POSITIVE).roundToDouble());
|
||||
Expect.equals(0.0, (2.0 * -double.MIN_POSITIVE).roundToDouble());
|
||||
Expect.equals(0.0, (-1.18e-38).roundToDouble());
|
||||
Expect.equals(0.0, (-1.18e-38 * 2).roundToDouble());
|
||||
Expect.equals(-1.0, (-0.5).roundToDouble());
|
||||
Expect.equals(-1.0, (-0.9999999999999999).roundToDouble());
|
||||
Expect.equals(-1.0, (-1.0).roundToDouble());
|
||||
Expect.equals(-1.0, (-1.000000000000001).roundToDouble());
|
||||
Expect.equals(-2.0, (-1.5).roundToDouble());
|
||||
Expect.equals(-double.MAX_FINITE, (-double.MAX_FINITE).roundToDouble());
|
||||
|
||||
Expect.equals(double.INFINITY, double.INFINITY.roundToDouble());
|
||||
Expect.equals(
|
||||
double.NEGATIVE_INFINITY, double.NEGATIVE_INFINITY.roundToDouble());
|
||||
Expect.isTrue(double.NAN.roundToDouble().isNaN);
|
||||
|
||||
Expect.isTrue(0.0.roundToDouble() is double);
|
||||
Expect.isTrue(double.MIN_POSITIVE.roundToDouble() is double);
|
||||
Expect.isTrue((2.0 * double.MIN_POSITIVE).roundToDouble() is double);
|
||||
Expect.isTrue((1.18e-38).roundToDouble() is double);
|
||||
Expect.isTrue((1.18e-38 * 2).roundToDouble() is double);
|
||||
Expect.isTrue(0.5.roundToDouble() is double);
|
||||
Expect.isTrue(0.9999999999999999.roundToDouble() is double);
|
||||
Expect.isTrue(1.0.roundToDouble() is double);
|
||||
Expect.isTrue(1.000000000000001.roundToDouble() is double);
|
||||
Expect.isTrue(double.MAX_FINITE.roundToDouble() is double);
|
||||
|
||||
Expect.isTrue((-double.MIN_POSITIVE).roundToDouble().isNegative);
|
||||
Expect.isTrue((2.0 * -double.MIN_POSITIVE).roundToDouble().isNegative);
|
||||
Expect.isTrue((-1.18e-38).roundToDouble().isNegative);
|
||||
Expect.isTrue((-1.18e-38 * 2).roundToDouble().isNegative);
|
||||
|
||||
Expect.isTrue((-double.MIN_POSITIVE).roundToDouble() is double);
|
||||
Expect.isTrue((2.0 * -double.MIN_POSITIVE).roundToDouble() is double);
|
||||
Expect.isTrue((-1.18e-38).roundToDouble() is double);
|
||||
Expect.isTrue((-1.18e-38 * 2).roundToDouble() is double);
|
||||
Expect.isTrue((-0.5).roundToDouble() is double);
|
||||
Expect.isTrue((-0.9999999999999999).roundToDouble() is double);
|
||||
Expect.isTrue((-1.0).roundToDouble() is double);
|
||||
Expect.isTrue((-1.000000000000001).roundToDouble() is double);
|
||||
Expect.isTrue((-double.MAX_FINITE).roundToDouble() is double);
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
// Copyright (c) 2013, 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() {
|
||||
Expect.throws(() => double.INFINITY.truncate(), (e) => e is UnsupportedError);
|
||||
Expect.throws(
|
||||
() => double.NEGATIVE_INFINITY.truncate(), (e) => e is UnsupportedError);
|
||||
Expect.throws(() => double.NAN.truncate(), (e) => e is UnsupportedError);
|
||||
}
|
||||
@@ -1,92 +0,0 @@
|
||||
// Copyright (c) 2013, 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() {
|
||||
Expect.equals(0, 0.0.truncate());
|
||||
Expect.equals(0, double.MIN_POSITIVE.truncate());
|
||||
Expect.equals(0, (2.0 * double.MIN_POSITIVE).truncate());
|
||||
Expect.equals(0, (1.18e-38).truncate());
|
||||
Expect.equals(0, (1.18e-38 * 2).truncate());
|
||||
Expect.equals(0, 0.49999999999999994.truncate());
|
||||
Expect.equals(0, 0.5.truncate());
|
||||
Expect.equals(0, 0.9999999999999999.truncate());
|
||||
Expect.equals(1, 1.0.truncate());
|
||||
Expect.equals(1, 1.000000000000001.truncate());
|
||||
// The following numbers are on the border of 52 bits.
|
||||
// For example: 4503599627370499 + 0.5 => 4503599627370500.
|
||||
Expect.equals(4503599627370496, 4503599627370496.0.truncate());
|
||||
Expect.equals(4503599627370497, 4503599627370497.0.truncate());
|
||||
Expect.equals(4503599627370498, 4503599627370498.0.truncate());
|
||||
Expect.equals(4503599627370499, 4503599627370499.0.truncate());
|
||||
|
||||
Expect.equals(9007199254740991, 9007199254740991.0.truncate());
|
||||
Expect.equals(9007199254740992, 9007199254740992.0.truncate());
|
||||
Expect.equals(
|
||||
179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368,
|
||||
double.MAX_FINITE.truncate());
|
||||
|
||||
Expect.equals(0, (-double.MIN_POSITIVE).truncate());
|
||||
Expect.equals(0, (2.0 * -double.MIN_POSITIVE).truncate());
|
||||
Expect.equals(0, (-1.18e-38).truncate());
|
||||
Expect.equals(0, (-1.18e-38 * 2).truncate());
|
||||
Expect.equals(0, (-0.49999999999999994).truncate());
|
||||
Expect.equals(0, (-0.5).truncate());
|
||||
Expect.equals(0, (-0.9999999999999999).truncate());
|
||||
Expect.equals(-1, (-1.0).truncate());
|
||||
Expect.equals(-1, (-1.000000000000001).truncate());
|
||||
Expect.equals(-4503599627370496, (-4503599627370496.0).truncate());
|
||||
Expect.equals(-4503599627370497, (-4503599627370497.0).truncate());
|
||||
Expect.equals(-4503599627370498, (-4503599627370498.0).truncate());
|
||||
Expect.equals(-4503599627370499, (-4503599627370499.0).truncate());
|
||||
Expect.equals(-9007199254740991, (-9007199254740991.0).truncate());
|
||||
Expect.equals(-9007199254740992, (-9007199254740992.0).truncate());
|
||||
Expect.equals(
|
||||
-179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368,
|
||||
(-double.MAX_FINITE).truncate());
|
||||
|
||||
Expect.isTrue(0.0.truncate() is int);
|
||||
Expect.isTrue(double.MIN_POSITIVE.truncate() is int);
|
||||
Expect.isTrue((2.0 * double.MIN_POSITIVE).truncate() is int);
|
||||
Expect.isTrue((1.18e-38).truncate() is int);
|
||||
Expect.isTrue((1.18e-38 * 2).truncate() is int);
|
||||
Expect.isTrue(0.49999999999999994.truncate() is int);
|
||||
Expect.isTrue(0.5.truncate() is int);
|
||||
Expect.isTrue(0.9999999999999999.truncate() is int);
|
||||
Expect.isTrue(1.0.truncate() is int);
|
||||
Expect.isTrue(1.000000000000001.truncate() is int);
|
||||
Expect.isTrue(4503599627370496.0.truncate() is int);
|
||||
Expect.isTrue(4503599627370497.0.truncate() is int);
|
||||
Expect.isTrue(4503599627370498.0.truncate() is int);
|
||||
Expect.isTrue(4503599627370499.0.truncate() is int);
|
||||
Expect.isTrue(9007199254740991.0.truncate() is int);
|
||||
Expect.isTrue(9007199254740992.0.truncate() is int);
|
||||
Expect.isTrue(double.MAX_FINITE.truncate() is int);
|
||||
|
||||
Expect.isTrue((-double.MIN_POSITIVE).truncateToDouble().isNegative);
|
||||
Expect.isTrue((2.0 * -double.MIN_POSITIVE).truncateToDouble().isNegative);
|
||||
Expect.isTrue((-1.18e-38).truncateToDouble().isNegative);
|
||||
Expect.isTrue((-1.18e-38 * 2).truncateToDouble().isNegative);
|
||||
Expect.isTrue((-0.49999999999999994).truncateToDouble().isNegative);
|
||||
Expect.isTrue((-0.5).truncateToDouble().isNegative);
|
||||
Expect.isTrue((-0.9999999999999999).truncateToDouble().isNegative);
|
||||
|
||||
Expect.isTrue((-double.MIN_POSITIVE).truncate() is int);
|
||||
Expect.isTrue((2.0 * -double.MIN_POSITIVE).truncate() is int);
|
||||
Expect.isTrue((-1.18e-38).truncate() is int);
|
||||
Expect.isTrue((-1.18e-38 * 2).truncate() is int);
|
||||
Expect.isTrue((-0.49999999999999994).truncate() is int);
|
||||
Expect.isTrue((-0.5).truncate() is int);
|
||||
Expect.isTrue((-0.9999999999999999).truncate() is int);
|
||||
Expect.isTrue((-1.0).truncate() is int);
|
||||
Expect.isTrue((-1.000000000000001).truncate() is int);
|
||||
Expect.isTrue((-4503599627370496.0).truncate() is int);
|
||||
Expect.isTrue((-4503599627370497.0).truncate() is int);
|
||||
Expect.isTrue((-4503599627370498.0).truncate() is int);
|
||||
Expect.isTrue((-4503599627370499.0).truncate() is int);
|
||||
Expect.isTrue((-9007199254740991.0).truncate() is int);
|
||||
Expect.isTrue((-9007199254740992.0).truncate() is int);
|
||||
Expect.isTrue((-double.MAX_FINITE).truncate() is int);
|
||||
}
|
||||
@@ -1,85 +0,0 @@
|
||||
// Copyright (c) 2013, 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() {
|
||||
Expect.equals(0.0, 0.0.truncateToDouble());
|
||||
Expect.equals(0.0, double.MIN_POSITIVE.truncateToDouble());
|
||||
Expect.equals(0.0, (2.0 * double.MIN_POSITIVE).truncateToDouble());
|
||||
Expect.equals(0.0, (1.18e-38).truncateToDouble());
|
||||
Expect.equals(0.0, (1.18e-38 * 2).truncateToDouble());
|
||||
Expect.equals(0.0, 0.49999999999999994.truncateToDouble());
|
||||
Expect.equals(0.0, 0.5.truncateToDouble());
|
||||
Expect.equals(0.0, 0.9999999999999999.truncateToDouble());
|
||||
Expect.equals(1.0, 1.0.truncateToDouble());
|
||||
Expect.equals(1.0, 1.000000000000001.truncateToDouble());
|
||||
// The following numbers are on the border of 52 bits.
|
||||
// For example: 4503599627370499 + 0.5 => 4503599627370500.
|
||||
Expect.equals(4503599627370496.0, 4503599627370496.0.truncateToDouble());
|
||||
Expect.equals(4503599627370497.0, 4503599627370497.0.truncateToDouble());
|
||||
Expect.equals(4503599627370498.0, 4503599627370498.0.truncateToDouble());
|
||||
Expect.equals(4503599627370499.0, 4503599627370499.0.truncateToDouble());
|
||||
|
||||
Expect.equals(9007199254740991.0, 9007199254740991.0.truncateToDouble());
|
||||
Expect.equals(9007199254740992.0, 9007199254740992.0.truncateToDouble());
|
||||
Expect.equals(double.MAX_FINITE, double.MAX_FINITE.truncateToDouble());
|
||||
|
||||
Expect.equals(0.0, (-double.MIN_POSITIVE).truncateToDouble());
|
||||
Expect.equals(0.0, (2.0 * -double.MIN_POSITIVE).truncateToDouble());
|
||||
Expect.equals(0.0, (-1.18e-38).truncateToDouble());
|
||||
Expect.equals(0.0, (-1.18e-38 * 2).truncateToDouble());
|
||||
Expect.equals(0.0, (-0.49999999999999994).truncateToDouble());
|
||||
Expect.equals(0.0, (-0.5).truncateToDouble());
|
||||
Expect.equals(0.0, (-0.9999999999999999).truncateToDouble());
|
||||
Expect.equals(-1.0, (-1.0).truncateToDouble());
|
||||
Expect.equals(-1.0, (-1.000000000000001).truncateToDouble());
|
||||
Expect.equals(-4503599627370496.0, (-4503599627370496.0).truncateToDouble());
|
||||
Expect.equals(-4503599627370497.0, (-4503599627370497.0).truncateToDouble());
|
||||
Expect.equals(-4503599627370498.0, (-4503599627370498.0).truncateToDouble());
|
||||
Expect.equals(-4503599627370499.0, (-4503599627370499.0).truncateToDouble());
|
||||
Expect.equals(-9007199254740991.0, (-9007199254740991.0).truncateToDouble());
|
||||
Expect.equals(-9007199254740992.0, (-9007199254740992.0).truncateToDouble());
|
||||
Expect.equals(-double.MAX_FINITE, (-double.MAX_FINITE).truncateToDouble());
|
||||
|
||||
Expect.equals(double.INFINITY, double.INFINITY.truncateToDouble());
|
||||
Expect.equals(
|
||||
double.NEGATIVE_INFINITY, double.NEGATIVE_INFINITY.truncateToDouble());
|
||||
Expect.isTrue(double.NAN.truncateToDouble().isNaN);
|
||||
|
||||
Expect.isTrue(0.0.truncateToDouble() is double);
|
||||
Expect.isTrue(double.MIN_POSITIVE.truncateToDouble() is double);
|
||||
Expect.isTrue((2.0 * double.MIN_POSITIVE).truncateToDouble() is double);
|
||||
Expect.isTrue((1.18e-38).truncateToDouble() is double);
|
||||
Expect.isTrue((1.18e-38 * 2).truncateToDouble() is double);
|
||||
Expect.isTrue(0.49999999999999994.truncateToDouble() is double);
|
||||
Expect.isTrue(0.5.truncateToDouble() is double);
|
||||
Expect.isTrue(0.9999999999999999.truncateToDouble() is double);
|
||||
Expect.isTrue(1.0.truncateToDouble() is double);
|
||||
Expect.isTrue(1.000000000000001.truncateToDouble() is double);
|
||||
Expect.isTrue(4503599627370496.0.truncateToDouble() is double);
|
||||
Expect.isTrue(4503599627370497.0.truncateToDouble() is double);
|
||||
Expect.isTrue(4503599627370498.0.truncateToDouble() is double);
|
||||
Expect.isTrue(4503599627370499.0.truncateToDouble() is double);
|
||||
Expect.isTrue(9007199254740991.0.truncateToDouble() is double);
|
||||
Expect.isTrue(9007199254740992.0.truncateToDouble() is double);
|
||||
Expect.isTrue(double.MAX_FINITE.truncateToDouble() is double);
|
||||
|
||||
Expect.isTrue((-double.MIN_POSITIVE).truncateToDouble() is double);
|
||||
Expect.isTrue((2.0 * -double.MIN_POSITIVE).truncateToDouble() is double);
|
||||
Expect.isTrue((-1.18e-38).truncateToDouble() is double);
|
||||
Expect.isTrue((-1.18e-38 * 2).truncateToDouble() is double);
|
||||
Expect.isTrue((-0.49999999999999994).truncateToDouble() is double);
|
||||
Expect.isTrue((-0.5).truncateToDouble() is double);
|
||||
Expect.isTrue((-0.9999999999999999).truncateToDouble() is double);
|
||||
Expect.isTrue((-1.0).truncateToDouble() is double);
|
||||
Expect.isTrue((-1.000000000000001).truncateToDouble() is double);
|
||||
Expect.isTrue((-4503599627370496.0).truncateToDouble() is double);
|
||||
Expect.isTrue((-4503599627370497.0).truncateToDouble() is double);
|
||||
Expect.isTrue((-4503599627370498.0).truncateToDouble() is double);
|
||||
Expect.isTrue((-4503599627370499.0).truncateToDouble() is double);
|
||||
Expect.isTrue((-9007199254740991.0).truncateToDouble() is double);
|
||||
Expect.isTrue((-9007199254740992.0).truncateToDouble() is double);
|
||||
Expect.isTrue((-double.MAX_FINITE).truncateToDouble() is double);
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
// Copyright (c) 2015, 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() {
|
||||
// If the duration class multiplies "str" * microseconds-per-day (instead of
|
||||
// (microseconds-per-day * "str") it will try to build up a huge string and
|
||||
// terminate with an out-of-memory exception instead of an ArgumentError or
|
||||
// TypeError.
|
||||
// See dartbug.com/22309
|
||||
|
||||
String longString = "str" * 1000;
|
||||
Expect.throws(() => new Duration(days: longString),
|
||||
(e) => e is ArgumentError || e is TypeError || e is NoSuchMethodError);
|
||||
Expect.throws(() => new Duration(hours: longString),
|
||||
(e) => e is ArgumentError || e is TypeError || e is NoSuchMethodError);
|
||||
Expect.throws(() => new Duration(minutes: longString),
|
||||
(e) => e is ArgumentError || e is TypeError || e is NoSuchMethodError);
|
||||
Expect.throws(() => new Duration(seconds: longString),
|
||||
(e) => e is ArgumentError || e is TypeError || e is NoSuchMethodError);
|
||||
Expect.throws(() => new Duration(milliseconds: longString),
|
||||
(e) => e is ArgumentError || e is TypeError || e is NoSuchMethodError);
|
||||
Expect.throws(() => new Duration(microseconds: longString),
|
||||
(e) => e is ArgumentError || e is TypeError || e is NoSuchMethodError);
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
// Copyright (c) 2013, 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";
|
||||
import 'dart:math';
|
||||
|
||||
main() {
|
||||
Duration d, d1;
|
||||
|
||||
d1 = new Duration(microseconds: pow(2, 53));
|
||||
d = d1 * 2;
|
||||
Expect.equals(pow(2, 54), d.inMicroseconds);
|
||||
d = d1 * 1.5;
|
||||
Expect.equals(pow(2, 53).toDouble() * 1.5, d.inMicroseconds);
|
||||
Expect.isTrue(d.inMicroseconds is int);
|
||||
|
||||
// Test that we lose precision when multiplying with a double.
|
||||
d = new Duration(microseconds: pow(2, 53) + 1) * 1.0;
|
||||
Expect.equals(0, d.inMicroseconds % 2);
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
// Copyright (c) 2013, 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() {
|
||||
Duration d, d1;
|
||||
|
||||
d1 = new Duration(milliseconds: 1);
|
||||
d = d1 * 0.005;
|
||||
Expect.equals(1000 * 0.005, d.inMicroseconds);
|
||||
d = d1 * 0.0;
|
||||
Expect.equals(0, d.inMicroseconds);
|
||||
d = d1 * -0.005;
|
||||
Expect.equals(1000 * -0.005, d.inMicroseconds);
|
||||
d = d1 * 0.0015;
|
||||
Expect.equals((1000 * 0.0015).round(), d.inMicroseconds);
|
||||
}
|
||||
@@ -1,293 +0,0 @@
|
||||
// Copyright (c) 2013, 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() {
|
||||
Duration d;
|
||||
d = new Duration(days: 1);
|
||||
Expect.equals(86400000000, d.inMicroseconds);
|
||||
Expect.equals(86400000, d.inMilliseconds);
|
||||
Expect.equals(86400, d.inSeconds);
|
||||
Expect.equals(1440, d.inMinutes);
|
||||
Expect.equals(24, d.inHours);
|
||||
Expect.equals(1, d.inDays);
|
||||
d = const Duration(hours: 1);
|
||||
Expect.equals(3600000000, d.inMicroseconds);
|
||||
Expect.equals(3600000, d.inMilliseconds);
|
||||
Expect.equals(3600, d.inSeconds);
|
||||
Expect.equals(60, d.inMinutes);
|
||||
Expect.equals(1, d.inHours);
|
||||
Expect.equals(0, d.inDays);
|
||||
d = new Duration(minutes: 1);
|
||||
Expect.equals(60000000, d.inMicroseconds);
|
||||
Expect.equals(60000, d.inMilliseconds);
|
||||
Expect.equals(60, d.inSeconds);
|
||||
Expect.equals(1, d.inMinutes);
|
||||
Expect.equals(0, d.inHours);
|
||||
Expect.equals(0, d.inDays);
|
||||
d = const Duration(seconds: 1);
|
||||
Expect.equals(1000000, d.inMicroseconds);
|
||||
Expect.equals(1000, d.inMilliseconds);
|
||||
Expect.equals(1, d.inSeconds);
|
||||
Expect.equals(0, d.inMinutes);
|
||||
Expect.equals(0, d.inHours);
|
||||
Expect.equals(0, d.inDays);
|
||||
d = new Duration(milliseconds: 1);
|
||||
Expect.equals(1000, d.inMicroseconds);
|
||||
Expect.equals(1, d.inMilliseconds);
|
||||
Expect.equals(0, d.inSeconds);
|
||||
Expect.equals(0, d.inMinutes);
|
||||
Expect.equals(0, d.inHours);
|
||||
Expect.equals(0, d.inDays);
|
||||
d = new Duration(microseconds: 1);
|
||||
Expect.equals(1, d.inMicroseconds);
|
||||
Expect.equals(0, d.inMilliseconds);
|
||||
Expect.equals(0, d.inSeconds);
|
||||
Expect.equals(0, d.inMinutes);
|
||||
Expect.equals(0, d.inHours);
|
||||
Expect.equals(0, d.inDays);
|
||||
|
||||
d = const Duration(milliseconds: 1, microseconds: 999);
|
||||
Expect.equals(1999, d.inMicroseconds);
|
||||
Expect.equals(1, d.inMilliseconds);
|
||||
d = const Duration(seconds: 1, milliseconds: 999);
|
||||
Expect.equals(1999, d.inMilliseconds);
|
||||
Expect.equals(1, d.inSeconds);
|
||||
d = new Duration(minutes: 1, seconds: 59);
|
||||
Expect.equals(119, d.inSeconds);
|
||||
Expect.equals(1, d.inMinutes);
|
||||
d = const Duration(hours: 1, minutes: 59);
|
||||
Expect.equals(119, d.inMinutes);
|
||||
Expect.equals(1, d.inHours);
|
||||
d = new Duration(days: 1, hours: 23);
|
||||
Expect.equals(47, d.inHours);
|
||||
Expect.equals(1, d.inDays);
|
||||
d = const Duration(
|
||||
days: 0,
|
||||
hours: 23,
|
||||
minutes: 59,
|
||||
seconds: 59,
|
||||
milliseconds: 999,
|
||||
microseconds: 999);
|
||||
Expect.equals(0, d.inDays);
|
||||
|
||||
d = new Duration(days: -1);
|
||||
Expect.equals(-86400000000, d.inMicroseconds);
|
||||
Expect.equals(-86400000, d.inMilliseconds);
|
||||
Expect.equals(-86400, d.inSeconds);
|
||||
Expect.equals(-1440, d.inMinutes);
|
||||
Expect.equals(-24, d.inHours);
|
||||
Expect.equals(-1, d.inDays);
|
||||
d = const Duration(hours: -1);
|
||||
Expect.equals(-3600000000, d.inMicroseconds);
|
||||
Expect.equals(-3600000, d.inMilliseconds);
|
||||
Expect.equals(-3600, d.inSeconds);
|
||||
Expect.equals(-60, d.inMinutes);
|
||||
Expect.equals(-1, d.inHours);
|
||||
Expect.equals(0, d.inDays);
|
||||
d = new Duration(minutes: -1);
|
||||
Expect.equals(-60000000, d.inMicroseconds);
|
||||
Expect.equals(-60000, d.inMilliseconds);
|
||||
Expect.equals(-60, d.inSeconds);
|
||||
Expect.equals(-1, d.inMinutes);
|
||||
Expect.equals(0, d.inHours);
|
||||
Expect.equals(0, d.inDays);
|
||||
d = const Duration(seconds: -1);
|
||||
Expect.equals(-1000000, d.inMicroseconds);
|
||||
Expect.equals(-1000, d.inMilliseconds);
|
||||
Expect.equals(-1, d.inSeconds);
|
||||
Expect.equals(0, d.inMinutes);
|
||||
Expect.equals(0, d.inHours);
|
||||
Expect.equals(0, d.inDays);
|
||||
d = new Duration(milliseconds: -1);
|
||||
Expect.equals(-1000, d.inMicroseconds);
|
||||
Expect.equals(-1, d.inMilliseconds);
|
||||
Expect.equals(0, d.inSeconds);
|
||||
Expect.equals(0, d.inMinutes);
|
||||
Expect.equals(0, d.inHours);
|
||||
Expect.equals(0, d.inDays);
|
||||
d = new Duration(microseconds: -1);
|
||||
Expect.equals(-1, d.inMicroseconds);
|
||||
Expect.equals(0, d.inMilliseconds);
|
||||
Expect.equals(0, d.inSeconds);
|
||||
Expect.equals(0, d.inMinutes);
|
||||
Expect.equals(0, d.inHours);
|
||||
Expect.equals(0, d.inDays);
|
||||
|
||||
d = const Duration(days: 1, hours: -24);
|
||||
Expect.equals(0, d.inMicroseconds);
|
||||
d = new Duration(hours: 1, minutes: -60);
|
||||
Expect.equals(0, d.inMicroseconds);
|
||||
d = const Duration(minutes: 1, seconds: -60);
|
||||
Expect.equals(0, d.inMicroseconds);
|
||||
d = new Duration(seconds: 1, milliseconds: -1000);
|
||||
Expect.equals(0, d.inMicroseconds);
|
||||
d = new Duration(milliseconds: 1, microseconds: -1000);
|
||||
Expect.equals(0, d.inMicroseconds);
|
||||
|
||||
d = const Duration(hours: 25);
|
||||
Expect.equals(1, d.inDays);
|
||||
Expect.equals(25, d.inHours);
|
||||
Expect.equals(1500, d.inMinutes);
|
||||
Expect.equals(90000, d.inSeconds);
|
||||
Expect.equals(90000000, d.inMilliseconds);
|
||||
Expect.equals(90000000000, d.inMicroseconds);
|
||||
d = new Duration(minutes: 61);
|
||||
Expect.equals(0, d.inDays);
|
||||
Expect.equals(1, d.inHours);
|
||||
Expect.equals(61, d.inMinutes);
|
||||
Expect.equals(3660, d.inSeconds);
|
||||
Expect.equals(3660000, d.inMilliseconds);
|
||||
Expect.equals(3660000000, d.inMicroseconds);
|
||||
d = const Duration(seconds: 61);
|
||||
Expect.equals(0, d.inDays);
|
||||
Expect.equals(0, d.inHours);
|
||||
Expect.equals(1, d.inMinutes);
|
||||
Expect.equals(61, d.inSeconds);
|
||||
Expect.equals(61000, d.inMilliseconds);
|
||||
Expect.equals(61000000, d.inMicroseconds);
|
||||
d = new Duration(milliseconds: 1001);
|
||||
Expect.equals(0, d.inDays);
|
||||
Expect.equals(0, d.inHours);
|
||||
Expect.equals(0, d.inMinutes);
|
||||
Expect.equals(1, d.inSeconds);
|
||||
Expect.equals(1001, d.inMilliseconds);
|
||||
Expect.equals(1001000, d.inMicroseconds);
|
||||
d = new Duration(microseconds: 1001);
|
||||
Expect.equals(0, d.inDays);
|
||||
Expect.equals(0, d.inHours);
|
||||
Expect.equals(0, d.inMinutes);
|
||||
Expect.equals(0, d.inSeconds);
|
||||
Expect.equals(1, d.inMilliseconds);
|
||||
Expect.equals(1001, d.inMicroseconds);
|
||||
|
||||
var d1 = const Duration(milliseconds: 1000);
|
||||
var d2 = const Duration(seconds: 1);
|
||||
Expect.identical(d1, d2);
|
||||
|
||||
d1 = const Duration(microseconds: 1000);
|
||||
d2 = const Duration(milliseconds: 1);
|
||||
Expect.identical(d1, d2);
|
||||
|
||||
d1 = new Duration(hours: 1);
|
||||
d2 = new Duration(hours: -1);
|
||||
d = d1 + d2;
|
||||
Expect.equals(0, d.inMicroseconds);
|
||||
d = d1 - d2;
|
||||
Expect.equals(3600000000 * 2, d.inMicroseconds);
|
||||
|
||||
d2 = new Duration(hours: 1);
|
||||
d = d1 + d2;
|
||||
Expect.equals(3600000000 * 2, d.inMicroseconds);
|
||||
d = d1 - d2;
|
||||
Expect.equals(0, d.inMicroseconds);
|
||||
|
||||
d = d1 * 2;
|
||||
Expect.equals(3600000000 * 2, d.inMicroseconds);
|
||||
d = d1 * -1;
|
||||
Expect.equals(-3600000000, d.inMicroseconds);
|
||||
d = d1 * 0;
|
||||
Expect.equals(0, d.inMicroseconds);
|
||||
|
||||
d = d1 ~/ 2;
|
||||
Expect.equals(1800000000, d.inMicroseconds);
|
||||
d = d1 ~/ 3600000001;
|
||||
Expect.equals(0, d.inMicroseconds);
|
||||
d = d1 ~/ -3600000001;
|
||||
Expect.equals(0, d.inMicroseconds);
|
||||
d = d1 ~/ 3599999999;
|
||||
Expect.equals(1, d.inMicroseconds);
|
||||
d = d1 ~/ -3599999999;
|
||||
Expect.equals(-1, d.inMicroseconds);
|
||||
d = d1 ~/ -1;
|
||||
Expect.equals(-3600000000, d.inMicroseconds);
|
||||
d = d1 * 0;
|
||||
Expect.equals(0, d.inMicroseconds);
|
||||
Expect.throws(() => d1 ~/ 0, (e) => e is IntegerDivisionByZeroException);
|
||||
|
||||
d = new Duration(microseconds: 0);
|
||||
Expect.isTrue(d < new Duration(microseconds: 1));
|
||||
Expect.isTrue(d <= new Duration(microseconds: 1));
|
||||
Expect.isTrue(d <= d);
|
||||
Expect.isTrue(d > new Duration(microseconds: -1));
|
||||
Expect.isTrue(d >= new Duration(microseconds: -1));
|
||||
Expect.isTrue(d >= d);
|
||||
|
||||
d = const Duration(
|
||||
days: 1,
|
||||
hours: 3,
|
||||
minutes: 17,
|
||||
seconds: 42,
|
||||
milliseconds: 823,
|
||||
microseconds: 127);
|
||||
Expect.equals("27:17:42.823127", d.toString());
|
||||
|
||||
d = const Duration(hours: 1999, minutes: 17, seconds: 42);
|
||||
Expect.equals("1999:17:42.000000", d.toString());
|
||||
|
||||
d = const Duration(
|
||||
days: -1,
|
||||
hours: -3,
|
||||
minutes: -17,
|
||||
seconds: -42,
|
||||
milliseconds: -823,
|
||||
microseconds: -127);
|
||||
Expect.equals("-27:17:42.823127", d.toString());
|
||||
|
||||
d = const Duration(hours: -1999, minutes: -17, seconds: -42);
|
||||
Expect.equals("-1999:17:42.000000", d.toString());
|
||||
|
||||
// Edge conditions for toString of microseconds.
|
||||
// Regression test for http://dartbug.com/15678
|
||||
|
||||
d = const Duration(microseconds: 1);
|
||||
Expect.equals("0:00:00.000001", d.toString());
|
||||
|
||||
d = const Duration(microseconds: 9);
|
||||
Expect.equals("0:00:00.000009", d.toString());
|
||||
|
||||
d = const Duration(microseconds: 10);
|
||||
Expect.equals("0:00:00.000010", d.toString());
|
||||
|
||||
d = const Duration(microseconds: 99);
|
||||
Expect.equals("0:00:00.000099", d.toString());
|
||||
|
||||
d = const Duration(microseconds: 100);
|
||||
Expect.equals("0:00:00.000100", d.toString());
|
||||
|
||||
d = const Duration(microseconds: 999);
|
||||
Expect.equals("0:00:00.000999", d.toString());
|
||||
|
||||
d = const Duration(microseconds: 1000);
|
||||
Expect.equals("0:00:00.001000", d.toString());
|
||||
|
||||
d = const Duration(microseconds: 9999);
|
||||
Expect.equals("0:00:00.009999", d.toString());
|
||||
|
||||
d = const Duration(microseconds: 10000);
|
||||
Expect.equals("0:00:00.010000", d.toString());
|
||||
|
||||
d = const Duration(microseconds: 99999);
|
||||
Expect.equals("0:00:00.099999", d.toString());
|
||||
|
||||
d = const Duration(microseconds: 100000);
|
||||
Expect.equals("0:00:00.100000", d.toString());
|
||||
|
||||
d = const Duration(microseconds: 999999);
|
||||
Expect.equals("0:00:00.999999", d.toString());
|
||||
|
||||
d = const Duration(microseconds: 1000000);
|
||||
Expect.equals("0:00:01.000000", d.toString());
|
||||
|
||||
d1 = const Duration(hours: 1);
|
||||
d2 = const Duration(hours: -1);
|
||||
Expect.isFalse(d1.isNegative);
|
||||
Expect.isTrue(d2.isNegative);
|
||||
Expect.equals(d1, d1.abs());
|
||||
Expect.equals(d1, d2.abs());
|
||||
|
||||
Expect.equals(d2, -d1);
|
||||
Expect.equals(d1, -d2);
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
// Copyright (c) 2013, 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";
|
||||
|
||||
class A {
|
||||
static Aa() => Ab();
|
||||
static Ab() => Ac();
|
||||
static Ac() => throw "abc";
|
||||
}
|
||||
|
||||
class B {
|
||||
static Ba() => Bb();
|
||||
static Bb() => Bc();
|
||||
static Bc() {
|
||||
try {
|
||||
A.Aa();
|
||||
} catch (e) {
|
||||
// This should produce a NoSuchMethodError.
|
||||
var trace = e.stackTrace;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
main() {
|
||||
bool hasThrown = false;
|
||||
try {
|
||||
B.Ba();
|
||||
} catch (e) {
|
||||
hasThrown = true;
|
||||
var trace = e.stackTrace.toString();
|
||||
print(trace);
|
||||
Expect.isTrue(trace.contains("Bc"));
|
||||
Expect.isTrue(trace.contains("Bb"));
|
||||
Expect.isTrue(trace.contains("Ba"));
|
||||
Expect.isTrue(trace.contains("main"));
|
||||
}
|
||||
Expect.isTrue(hasThrown);
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
// Copyright (c) 2013, 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";
|
||||
|
||||
class A {
|
||||
get foo => cyclicStatic;
|
||||
}
|
||||
|
||||
var a = new A();
|
||||
var cyclicStatic = (() => a.foo + 1)();
|
||||
|
||||
cyclicInitialization() {
|
||||
return cyclicStatic;
|
||||
}
|
||||
|
||||
main() {
|
||||
bool hasThrown = false;
|
||||
try {
|
||||
cyclicStatic + 1;
|
||||
} catch (e2) {
|
||||
var e = e2;
|
||||
hasThrown = true;
|
||||
Expect.isTrue(
|
||||
e.stackTrace is StackTrace, "$e doesn't have a non-null stack trace");
|
||||
}
|
||||
Expect.isTrue(hasThrown);
|
||||
}
|
||||
@@ -1,83 +0,0 @@
|
||||
// Copyright (c) 2013, 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";
|
||||
|
||||
void argument() {
|
||||
throw new ArgumentError(499);
|
||||
}
|
||||
|
||||
void noSuchMethod() {
|
||||
(499).doesNotExist();
|
||||
}
|
||||
|
||||
void nullThrown() {
|
||||
throw null;
|
||||
}
|
||||
|
||||
void range() {
|
||||
throw new RangeError.range(0, 1, 2);
|
||||
}
|
||||
|
||||
void fallThrough() {
|
||||
nested() {}
|
||||
|
||||
switch (5) {
|
||||
case 5:
|
||||
nested();
|
||||
default:
|
||||
Expect.fail("Should not reach");
|
||||
}
|
||||
}
|
||||
|
||||
abstract class A {
|
||||
foo();
|
||||
}
|
||||
|
||||
void abstractClassInstantiation() {
|
||||
new A();
|
||||
}
|
||||
|
||||
void unsupported() {
|
||||
throw new UnsupportedError("unsupported");
|
||||
}
|
||||
|
||||
void unimplemented() {
|
||||
throw new UnimplementedError("unimplemented");
|
||||
}
|
||||
|
||||
void state() {
|
||||
return [1, 2].single;
|
||||
}
|
||||
|
||||
void type() {
|
||||
return 1 + "string";
|
||||
}
|
||||
|
||||
main() {
|
||||
List<Function> errorFunctions = [
|
||||
argument,
|
||||
noSuchMethod,
|
||||
nullThrown,
|
||||
range,
|
||||
fallThrough,
|
||||
abstractClassInstantiation,
|
||||
unsupported,
|
||||
unimplemented,
|
||||
state,
|
||||
type
|
||||
];
|
||||
|
||||
for (var f in errorFunctions) {
|
||||
bool hasThrown = false;
|
||||
try {
|
||||
f();
|
||||
} catch (e) {
|
||||
hasThrown = true;
|
||||
Expect.isTrue(
|
||||
e.stackTrace is StackTrace, "$e doesn't have a non-null stack trace");
|
||||
}
|
||||
Expect.isTrue(hasThrown);
|
||||
}
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
// Copyright (c) 2015, 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";
|
||||
|
||||
// Test that error constructors do what they are documented as doing.
|
||||
|
||||
main() {
|
||||
Expect.equals("Invalid argument(s)", new ArgumentError().toString());
|
||||
Expect.equals(
|
||||
"Invalid argument(s): message", new ArgumentError("message").toString());
|
||||
Expect.equals(
|
||||
"Invalid argument: null", new ArgumentError.value(null).toString());
|
||||
Expect.equals("Invalid argument: 42", new ArgumentError.value(42).toString());
|
||||
Expect.equals(
|
||||
"Invalid argument: \"bad\"", new ArgumentError.value("bad").toString());
|
||||
Expect.equals("Invalid argument (foo): null",
|
||||
new ArgumentError.value(null, "foo").toString());
|
||||
Expect.equals("Invalid argument (foo): 42",
|
||||
new ArgumentError.value(42, "foo").toString());
|
||||
Expect.equals("Invalid argument (foo): message: 42",
|
||||
new ArgumentError.value(42, "foo", "message").toString());
|
||||
Expect.equals("Invalid argument: message: 42",
|
||||
new ArgumentError.value(42, null, "message").toString());
|
||||
Expect.equals("Invalid argument(s): Must not be null",
|
||||
new ArgumentError.notNull().toString());
|
||||
Expect.equals("Invalid argument(s) (foo): Must not be null",
|
||||
new ArgumentError.notNull("foo").toString());
|
||||
|
||||
Expect.equals("RangeError", new RangeError(null).toString());
|
||||
Expect.equals("RangeError: message", new RangeError("message").toString());
|
||||
Expect.equals("RangeError: Value not in range: 42",
|
||||
new RangeError.value(42).toString());
|
||||
Expect.equals("RangeError (foo): Value not in range: 42",
|
||||
new RangeError.value(42, "foo").toString());
|
||||
Expect.equals("RangeError (foo): message: 42",
|
||||
new RangeError.value(42, "foo", "message").toString());
|
||||
Expect.equals("RangeError: message: 42",
|
||||
new RangeError.value(42, null, "message").toString());
|
||||
|
||||
Expect.equals("RangeError: Invalid value: Not in range 2..9, inclusive: 42",
|
||||
new RangeError.range(42, 2, 9).toString());
|
||||
Expect.equals(
|
||||
"RangeError (foo): Invalid value: Not in range 2..9, "
|
||||
"inclusive: 42",
|
||||
new RangeError.range(42, 2, 9, "foo").toString());
|
||||
Expect.equals("RangeError (foo): message: Not in range 2..9, inclusive: 42",
|
||||
new RangeError.range(42, 2, 9, "foo", "message").toString());
|
||||
Expect.equals("RangeError: message: Not in range 2..9, inclusive: 42",
|
||||
new RangeError.range(42, 2, 9, null, "message").toString());
|
||||
|
||||
Expect.equals(
|
||||
"RangeError: Index out of range: "
|
||||
"index should be less than 3: 42",
|
||||
new RangeError.index(42, [1, 2, 3]).toString());
|
||||
Expect.equals(
|
||||
"RangeError (foo): Index out of range: "
|
||||
"index should be less than 3: 42",
|
||||
new RangeError.index(42, [1, 2, 3], "foo").toString());
|
||||
Expect.equals(
|
||||
"RangeError (foo): message: "
|
||||
"index should be less than 3: 42",
|
||||
new RangeError.index(42, [1, 2, 3], "foo", "message").toString());
|
||||
Expect.equals(
|
||||
"RangeError: message: "
|
||||
"index should be less than 3: 42",
|
||||
new RangeError.index(42, [1, 2, 3], null, "message").toString());
|
||||
Expect.equals(
|
||||
"RangeError (foo): message: "
|
||||
"index should be less than 2: 42",
|
||||
new RangeError.index(42, [1, 2, 3], "foo", "message", 2).toString());
|
||||
Expect.equals(
|
||||
"RangeError: Index out of range: "
|
||||
"index must not be negative: -5",
|
||||
new RangeError.index(-5, [1, 2, 3]).toString());
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
// 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.
|
||||
|
||||
library exception_implementation_test;
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
|
||||
main() {
|
||||
final msg = 1;
|
||||
try {
|
||||
throw new Exception(msg);
|
||||
Expect.fail("Unreachable");
|
||||
} on Exception catch (e) {
|
||||
Expect.isTrue(e is Exception);
|
||||
Expect.equals("Exception: $msg", e.toString());
|
||||
}
|
||||
}
|
||||
@@ -1,116 +0,0 @@
|
||||
// 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";
|
||||
|
||||
class ExpandoTest {
|
||||
static Expando<int> visits;
|
||||
|
||||
static testMain() {
|
||||
visits = new Expando<int>('visits');
|
||||
var legal = [
|
||||
new Object(),
|
||||
new List(),
|
||||
[1, 2, 3],
|
||||
const [1, 2, 3],
|
||||
new Map(),
|
||||
{'x': 1, 'y': 2},
|
||||
const {'x': 1, 'y': 2},
|
||||
new Expando(),
|
||||
new Expando('horse')
|
||||
];
|
||||
for (var object in legal) {
|
||||
testNamedExpando(object);
|
||||
testUnnamedExpando(object);
|
||||
}
|
||||
for (var object in legal) {
|
||||
Expect.equals(2, visits[object], "$object");
|
||||
}
|
||||
testIllegal();
|
||||
testIdentity();
|
||||
}
|
||||
|
||||
static visit(object) {
|
||||
int count = visits[object];
|
||||
count = (count == null) ? 1 : count + 1;
|
||||
visits[object] = count;
|
||||
}
|
||||
|
||||
static testNamedExpando(object) {
|
||||
Expando<int> expando = new Expando<int>('myexpando');
|
||||
Expect.equals('myexpando', expando.name);
|
||||
Expect.isTrue(expando.toString().startsWith('Expando:myexpando'));
|
||||
testExpando(expando, object);
|
||||
}
|
||||
|
||||
static testUnnamedExpando(object) {
|
||||
Expando<int> expando = new Expando<int>();
|
||||
Expect.isNull(expando.name);
|
||||
Expect.isTrue(expando.toString().startsWith('Expando:'));
|
||||
testExpando(expando, object);
|
||||
}
|
||||
|
||||
static testExpando(Expando<int> expando, object) {
|
||||
visit(object);
|
||||
|
||||
Expect.isNull(expando[object]);
|
||||
expando[object] = 42;
|
||||
Expect.equals(42, expando[object]);
|
||||
expando[object] = null;
|
||||
Expect.isNull(expando[object]);
|
||||
|
||||
Expando<int> alternative = new Expando('myexpando');
|
||||
Expect.isNull(alternative[object]);
|
||||
alternative[object] = 87;
|
||||
Expect.isNull(expando[object]);
|
||||
expando[object] = 99;
|
||||
Expect.equals(99, expando[object]);
|
||||
Expect.equals(87, alternative[object]);
|
||||
}
|
||||
|
||||
static testIllegal() {
|
||||
Expando<int> expando = new Expando<int>();
|
||||
Expect.throws(
|
||||
() => expando[null], (exception) => exception is ArgumentError, "null");
|
||||
Expect.throws(() => expando['string'],
|
||||
(exception) => exception is ArgumentError, "'string'");
|
||||
Expect.throws(() => expando['string'],
|
||||
(exception) => exception is ArgumentError, "'string'");
|
||||
Expect.throws(
|
||||
() => expando[42], (exception) => exception is ArgumentError, "42");
|
||||
Expect.throws(() => expando[42.87],
|
||||
(exception) => exception is ArgumentError, "42.87");
|
||||
Expect.throws(
|
||||
() => expando[true], (exception) => exception is ArgumentError, "true");
|
||||
Expect.throws(() => expando[false],
|
||||
(exception) => exception is ArgumentError, "false");
|
||||
}
|
||||
|
||||
static testIdentity() {
|
||||
// Expando only depends on identity of object.
|
||||
Expando<int> expando = new Expando<int>();
|
||||
var m1 = new Mutable(1);
|
||||
var m2 = new Mutable(7);
|
||||
var m3 = new Mutable(13);
|
||||
expando[m1] = 42;
|
||||
Expect.equals(42, expando[m1]);
|
||||
m1.id = 37;
|
||||
Expect.equals(42, expando[m1]);
|
||||
expando[m2] = 37;
|
||||
expando[m3] = 10;
|
||||
m3.id = 1;
|
||||
Expect.equals(42, expando[m1]);
|
||||
Expect.equals(37, expando[m2]);
|
||||
Expect.equals(10, expando[m3]);
|
||||
}
|
||||
}
|
||||
|
||||
main() => ExpandoTest.testMain();
|
||||
|
||||
class Mutable {
|
||||
int id;
|
||||
Mutable(this.id);
|
||||
int get hashCode => id;
|
||||
bool operator ==(other) => other is Mutable && other.id == id;
|
||||
}
|
||||
@@ -1,117 +0,0 @@
|
||||
// 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.
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
|
||||
// Tests basic expressions. Does not attempt to validate the details of arithmetic, coercion, and
|
||||
// so forth.
|
||||
class ExpressionTest {
|
||||
ExpressionTest() {}
|
||||
|
||||
int foo;
|
||||
|
||||
static testMain() {
|
||||
var test = new ExpressionTest();
|
||||
test.testBinary();
|
||||
test.testUnary();
|
||||
test.testShifts();
|
||||
test.testBitwise();
|
||||
test.testIncrement();
|
||||
test.testMangling();
|
||||
}
|
||||
|
||||
testBinary() {
|
||||
int x = 4, y = 2;
|
||||
Expect.equals(6, x + y);
|
||||
Expect.equals(2, x - y);
|
||||
Expect.equals(8, x * y);
|
||||
Expect.equals(2, x / y);
|
||||
Expect.equals(0, x % y);
|
||||
}
|
||||
|
||||
testUnary() {
|
||||
int x = 4, y = 2, z = -5;
|
||||
bool t = true, f = false;
|
||||
Expect.equals(-4, -x);
|
||||
Expect.equals(4, ~z);
|
||||
Expect.equals(f, !t);
|
||||
}
|
||||
|
||||
testShifts() {
|
||||
int x = 4, y = 2;
|
||||
Expect.equals(y, x >> 1);
|
||||
Expect.equals(x, y << 1);
|
||||
}
|
||||
|
||||
testBitwise() {
|
||||
int x = 4, y = 2;
|
||||
Expect.equals(6, (x | y));
|
||||
Expect.equals(0, (x & y));
|
||||
Expect.equals(6, (x ^ y));
|
||||
}
|
||||
|
||||
operator [](int index) {
|
||||
return foo;
|
||||
}
|
||||
|
||||
operator []=(int index, int value) {
|
||||
foo = value;
|
||||
}
|
||||
|
||||
testIncrement() {
|
||||
int x = 4, a = x++;
|
||||
Expect.equals(4, a);
|
||||
Expect.equals(5, x);
|
||||
Expect.equals(6, ++x);
|
||||
Expect.equals(6, x++);
|
||||
Expect.equals(7, x);
|
||||
Expect.equals(6, --x);
|
||||
Expect.equals(6, x--);
|
||||
Expect.equals(5, x);
|
||||
|
||||
this.foo = 0;
|
||||
Expect.equals(0, this.foo++);
|
||||
Expect.equals(1, this.foo);
|
||||
Expect.equals(2, ++this.foo);
|
||||
Expect.equals(2, this.foo);
|
||||
Expect.equals(2, this.foo--);
|
||||
Expect.equals(1, this.foo);
|
||||
Expect.equals(0, --this.foo);
|
||||
Expect.equals(0, this.foo);
|
||||
|
||||
Expect.equals(0, this[0]++);
|
||||
Expect.equals(1, this[0]);
|
||||
Expect.equals(2, ++this[0]);
|
||||
Expect.equals(2, this[0]);
|
||||
Expect.equals(2, this[0]--);
|
||||
Expect.equals(1, this[0]);
|
||||
Expect.equals(0, --this[0]);
|
||||
Expect.equals(0, this[0]);
|
||||
|
||||
int $0 = 42, $1 = 87, $2 = 117;
|
||||
Expect.equals(42, $0++);
|
||||
Expect.equals(43, $0);
|
||||
Expect.equals(44, ++$0);
|
||||
Expect.equals(88, $0 += $0);
|
||||
Expect.equals(87, $1++);
|
||||
Expect.equals(88, $1);
|
||||
Expect.equals(89, ++$1);
|
||||
Expect.equals(178, ($1 += $1));
|
||||
Expect.equals(117, $2++);
|
||||
Expect.equals(118, $2);
|
||||
Expect.equals(119, ++$2);
|
||||
}
|
||||
|
||||
void testMangling() {
|
||||
int $0 = 42, $1 = 87, $2 = 117;
|
||||
this[0] = 0;
|
||||
Expect.equals(42, (this[0] += $0));
|
||||
Expect.equals(129, (this[0] += $1));
|
||||
Expect.equals(246, (this[0] += $2));
|
||||
}
|
||||
}
|
||||
|
||||
main() {
|
||||
ExpressionTest.testMain();
|
||||
}
|
||||
@@ -1,96 +0,0 @@
|
||||
// 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.
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
|
||||
class ForInTest {
|
||||
static testMain() {
|
||||
testSimple();
|
||||
testBreak();
|
||||
testContinue();
|
||||
testClosure();
|
||||
}
|
||||
|
||||
static Set<int> getSmallSet() {
|
||||
Set<int> set = new Set<int>();
|
||||
set.add(1);
|
||||
set.add(2);
|
||||
set.add(4);
|
||||
return set;
|
||||
}
|
||||
|
||||
static void testSimple() {
|
||||
Set<int> set = getSmallSet();
|
||||
int count = 0;
|
||||
for (final i in set) {
|
||||
count += i;
|
||||
}
|
||||
Expect.equals(7, count);
|
||||
|
||||
count = 0;
|
||||
for (var i in set) {
|
||||
count += i;
|
||||
}
|
||||
Expect.equals(7, count);
|
||||
|
||||
count = 0;
|
||||
for (int i in set) {
|
||||
count += i;
|
||||
}
|
||||
Expect.equals(7, count);
|
||||
|
||||
count = 0;
|
||||
for (final int i in set) {
|
||||
count += i;
|
||||
}
|
||||
Expect.equals(7, count);
|
||||
|
||||
count = 0;
|
||||
int i = 0;
|
||||
Expect.equals(false, set.contains(i)); // Used to test [i] after loop.
|
||||
for (i in set) {
|
||||
count += i;
|
||||
}
|
||||
Expect.equals(7, count);
|
||||
Expect.equals(true, set.contains(i));
|
||||
// The default implementation of [Set] preserves order.
|
||||
Expect.equals(4, i);
|
||||
}
|
||||
|
||||
static void testBreak() {
|
||||
Set<int> set = getSmallSet();
|
||||
int count = 0;
|
||||
for (final i in set) {
|
||||
if (i == 4) break;
|
||||
count += i;
|
||||
}
|
||||
Expect.equals(true, count < 4);
|
||||
}
|
||||
|
||||
static void testContinue() {
|
||||
Set<int> set = getSmallSet();
|
||||
int count = 0;
|
||||
for (final i in set) {
|
||||
if (i < 4) continue;
|
||||
count += i;
|
||||
}
|
||||
Expect.equals(4, count);
|
||||
}
|
||||
|
||||
static void testClosure() {
|
||||
Set<int> set = getSmallSet();
|
||||
List<Function> closures = new List(set.length);
|
||||
int index = 0;
|
||||
for (var i in set) {
|
||||
closures[index++] = () => i;
|
||||
}
|
||||
|
||||
Expect.equals(index, set.length);
|
||||
Expect.equals(7, closures[0]() + closures[1]() + closures[2]());
|
||||
}
|
||||
}
|
||||
|
||||
main() {
|
||||
ForInTest.testMain();
|
||||
}
|
||||
@@ -1,108 +0,0 @@
|
||||
// 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.
|
||||
|
||||
library format_exception_test;
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
|
||||
test(exn, message, source, offset, toString) {
|
||||
Expect.equals(message, exn.message);
|
||||
Expect.equals(source, exn.source);
|
||||
Expect.equals(offset, exn.offset);
|
||||
Expect.equals(toString, exn.toString());
|
||||
}
|
||||
|
||||
main() {
|
||||
var e;
|
||||
e = new FormatException();
|
||||
test(e, "", null, null, "FormatException");
|
||||
e = new FormatException("");
|
||||
test(e, "", null, null, "FormatException");
|
||||
e = new FormatException(null);
|
||||
test(e, null, null, null, "FormatException");
|
||||
|
||||
e = new FormatException("message");
|
||||
test(e, "message", null, null, "FormatException: message");
|
||||
|
||||
e = new FormatException("message", "source");
|
||||
test(e, "message", "source", null, "FormatException: message\nsource");
|
||||
|
||||
e = new FormatException("message", "source" * 25);
|
||||
test(e, "message", "source" * 25, null,
|
||||
"FormatException: message\n" + "source" * 12 + "sou...");
|
||||
e = new FormatException("message", "source" * 25);
|
||||
test(e, "message", "source" * 25, null,
|
||||
"FormatException: message\n" + "source" * 12 + "sou...");
|
||||
e = new FormatException("message", "s1\nsource\ns2");
|
||||
test(e, "message", "s1\nsource\ns2", null,
|
||||
"FormatException: message\n" + "s1\nsource\ns2");
|
||||
|
||||
var o = new Object();
|
||||
e = new FormatException("message", o, 10);
|
||||
test(e, "message", o, 10, "FormatException: message (at offset 10)");
|
||||
|
||||
e = new FormatException("message", "source", 3);
|
||||
test(e, "message", "source", 3,
|
||||
"FormatException: message (at character 4)\nsource\n ^\n");
|
||||
|
||||
e = new FormatException("message", "s1\nsource\ns2", 6);
|
||||
test(e, "message", "s1\nsource\ns2", 6,
|
||||
"FormatException: message (at line 2, character 4)\nsource\n ^\n");
|
||||
|
||||
var longline = "watermelon cantaloupe " * 8 + "watermelon"; // Length > 160.
|
||||
var longsource = (longline + "\n") * 25;
|
||||
var line10 = (longline.length + 1) * 9;
|
||||
e = new FormatException("message", longsource, line10);
|
||||
test(
|
||||
e,
|
||||
"message",
|
||||
longsource,
|
||||
line10,
|
||||
"FormatException: message (at line 10, character 1)\n"
|
||||
"${longline.substring(0, 75)}...\n^\n");
|
||||
|
||||
e = new FormatException("message", longsource, line10 - 1);
|
||||
test(
|
||||
e,
|
||||
"message",
|
||||
longsource,
|
||||
line10 - 1,
|
||||
"FormatException: message (at line 9, "
|
||||
"character ${longline.length + 1})\n"
|
||||
"...${longline.substring(longline.length - 75)}\n"
|
||||
"${' ' * 78}^\n");
|
||||
|
||||
var half = longline.length ~/ 2;
|
||||
e = new FormatException("message", longsource, line10 + half);
|
||||
test(
|
||||
e,
|
||||
"message",
|
||||
longsource,
|
||||
line10 + half,
|
||||
"FormatException: message (at line 10, character ${half + 1})\n"
|
||||
"...${longline.substring(half - 36, half + 36)}...\n"
|
||||
"${' ' * 39}^\n");
|
||||
|
||||
var sourceNL = "\nsource with leading NL";
|
||||
e = new FormatException("message", sourceNL, 2);
|
||||
test(
|
||||
e,
|
||||
"message",
|
||||
sourceNL,
|
||||
2,
|
||||
"FormatException: message (at line 2, character 2)\n"
|
||||
"source with leading NL\n"
|
||||
" ^\n");
|
||||
|
||||
var sourceNL2 = "\n\nsource with leading NL";
|
||||
e = new FormatException("message", sourceNL2, 2);
|
||||
test(
|
||||
e,
|
||||
"message",
|
||||
sourceNL2,
|
||||
2,
|
||||
"FormatException: message (at line 3, character 1)\n"
|
||||
"source with leading NL\n"
|
||||
"^\n");
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
// Copyright (c) 2014, 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.
|
||||
// SharedOptions=-Da=true -Db=false -Dc=3 -Dd=STRING
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
|
||||
class Foo {}
|
||||
|
||||
const
|
||||
bool // //# 01: ok
|
||||
int // //# 02: static type warning, checked mode compile-time error
|
||||
String // //# 03: static type warning, checked mode compile-time error
|
||||
Foo // //# 04: static type warning, checked mode compile-time error
|
||||
a = const bool.fromEnvironment('a');
|
||||
|
||||
const
|
||||
bool // //# 05: ok
|
||||
int // //# 06: static type warning, checked mode compile-time error
|
||||
String // //# 07: static type warning, checked mode compile-time error
|
||||
Foo // //# 08: static type warning, checked mode compile-time error
|
||||
b = const bool.fromEnvironment('b');
|
||||
|
||||
const
|
||||
bool // //# 09: static type warning, checked mode compile-time error
|
||||
int // //# 10: ok
|
||||
String // //# 11: static type warning, checked mode compile-time error
|
||||
Foo // //# 12: static type warning, checked mode compile-time error
|
||||
c = const int.fromEnvironment('c');
|
||||
|
||||
const
|
||||
bool // //# 13: static type warning, checked mode compile-time error
|
||||
int // //# 14: static type warning, checked mode compile-time error
|
||||
String // //# 15: ok
|
||||
Foo // //# 16: static type warning, checked mode compile-time error
|
||||
d = const String.fromEnvironment('d');
|
||||
|
||||
main() {
|
||||
Expect.equals(a, true);
|
||||
Expect.equals(b, false);
|
||||
Expect.equals(c, 3);
|
||||
Expect.equals(d, 'STRING');
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
// Copyright (c) 2014, 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";
|
||||
|
||||
class Foo {}
|
||||
|
||||
const
|
||||
bool // //# 01: ok
|
||||
int // //# 02: static type warning, checked mode compile-time error
|
||||
String //# 03: static type warning, checked mode compile-time error
|
||||
Foo // //# 04: static type warning, checked mode compile-time error
|
||||
a = const bool.fromEnvironment('a');
|
||||
|
||||
const
|
||||
bool // //# 05: ok
|
||||
int // //# 06: static type warning, checked mode compile-time error
|
||||
String //# 07: static type warning, checked mode compile-time error
|
||||
Foo // //# 08: static type warning, checked mode compile-time error
|
||||
b = const bool.fromEnvironment('b');
|
||||
|
||||
const
|
||||
bool // //# 09: static type warning
|
||||
int // //# 10: ok
|
||||
String //# 11: static type warning
|
||||
Foo // //# 12: static type warning
|
||||
c = const int.fromEnvironment('c');
|
||||
|
||||
const
|
||||
bool // //# 13: static type warning
|
||||
int // //# 14: static type warning
|
||||
String //# 15: ok
|
||||
Foo // //# 16: static type warning
|
||||
d = const String.fromEnvironment('d');
|
||||
|
||||
main() {
|
||||
Expect.equals(a, false);
|
||||
Expect.equals(b, false);
|
||||
Expect.equals(c, null);
|
||||
Expect.equals(d, null);
|
||||
}
|
||||
@@ -1,187 +0,0 @@
|
||||
// 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.
|
||||
|
||||
// Sanity check on the growing behavior of a growable list.
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
|
||||
void main() {
|
||||
testConstructor();
|
||||
|
||||
bool checked = false;
|
||||
assert((checked = true));
|
||||
// Concurrent modification checks are only guaranteed in checked mode.
|
||||
if (checked) testConcurrentModification();
|
||||
}
|
||||
|
||||
// Iterable generating numbers in range [0..count).
|
||||
// May perform callback at some point underways.
|
||||
class TestIterableBase extends Iterable<int> {
|
||||
final int length;
|
||||
final int count;
|
||||
// call [callback] if generating callbackIndex.
|
||||
final int callbackIndex;
|
||||
final Function callback;
|
||||
TestIterableBase(this.length, this.count, this.callbackIndex, this.callback);
|
||||
Iterator<int> get iterator => new CallbackIterator(this);
|
||||
}
|
||||
|
||||
class TestIterable extends TestIterableBase {
|
||||
TestIterable(count, [callbackIndex = -1, callback])
|
||||
: super(-1, count, callbackIndex, callback);
|
||||
int get length => throw "SHOULD NOT BE CALLED";
|
||||
}
|
||||
|
||||
// Implement Set for private EfficientLengthIterable interface.
|
||||
class EfficientTestIterable extends TestIterableBase implements Set<int> {
|
||||
EfficientTestIterable(length, count, [callbackIndex = -1, callback])
|
||||
: super(length, count, callbackIndex, callback);
|
||||
// Avoid warnings because we don't actually implement Set.
|
||||
noSuchMethod(i) => super.noSuchMethod(i);
|
||||
}
|
||||
|
||||
class CallbackIterator implements Iterator<int> {
|
||||
TestIterableBase _iterable;
|
||||
int _current = null;
|
||||
int _nextIndex = 0;
|
||||
CallbackIterator(this._iterable);
|
||||
bool moveNext() {
|
||||
if (_nextIndex >= _iterable.count) {
|
||||
_current = null;
|
||||
return false;
|
||||
}
|
||||
_current = _nextIndex;
|
||||
_nextIndex++;
|
||||
if (_current == _iterable.callbackIndex) {
|
||||
_iterable.callback();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
int get current => _current;
|
||||
}
|
||||
|
||||
void testConstructor() {
|
||||
// Constructor can make both growable and fixed-length lists.
|
||||
testGrowable(list) {
|
||||
Expect.isTrue(list is List<int>);
|
||||
Expect.isFalse(list is List<String>);
|
||||
int length = list.length;
|
||||
list.add(42);
|
||||
Expect.equals(list.length, length + 1);
|
||||
}
|
||||
|
||||
testFixedLength(list) {
|
||||
Expect.isTrue(list is List<int>);
|
||||
int length = list.length;
|
||||
Expect.throws(() {
|
||||
list.add(42);
|
||||
}, null, "adding to fixed-length list");
|
||||
Expect.equals(length, list.length);
|
||||
}
|
||||
|
||||
bool checked = false;
|
||||
assert((checked = true));
|
||||
testThrowsOrTypeError(fn, test, [name]) {
|
||||
Expect.throws(
|
||||
fn, checked ? null : test, checked ? name : "$name w/ TypeError");
|
||||
}
|
||||
|
||||
testFixedLength(new List<int>(0));
|
||||
testFixedLength(new List<int>(5));
|
||||
testFixedLength(new List<int>.filled(5, null)); // default growable: false.
|
||||
testGrowable(new List<int>());
|
||||
testGrowable(new List<int>()..length = 5);
|
||||
testGrowable(new List<int>.filled(5, null, growable: true));
|
||||
Expect.throws(() => new List<int>(-1), (e) => e is ArgumentError, "-1");
|
||||
// There must be limits. Fix this test if we ever allow 10^30 elements.
|
||||
Expect.throws(() => new List<int>(0x7fffffffffffffff),
|
||||
(e) => e is ArgumentError, "bignum");
|
||||
Expect.throws(() => new List<int>(null), (e) => e is ArgumentError, "null");
|
||||
testThrowsOrTypeError(
|
||||
() => new List([] as Object), // Cast to avoid warning.
|
||||
(e) => e is ArgumentError,
|
||||
'list');
|
||||
testThrowsOrTypeError(
|
||||
() => new List([42] as Object), (e) => e is ArgumentError, "list2");
|
||||
}
|
||||
|
||||
void testConcurrentModification() {
|
||||
// Without EfficientLengthIterable interface
|
||||
{
|
||||
// Change length of list after 200 additions.
|
||||
var l = [];
|
||||
var ci = new TestIterable(257, 200, () {
|
||||
l.add("X");
|
||||
});
|
||||
Expect.throws(() {
|
||||
l.addAll(ci);
|
||||
}, (e) => e is ConcurrentModificationError, "cm1");
|
||||
}
|
||||
|
||||
{
|
||||
// Change length of list after 200 additions.
|
||||
var l = [];
|
||||
var ci = new TestIterable(257, 200, () {
|
||||
l.length = 0;
|
||||
});
|
||||
Expect.throws(() {
|
||||
l.addAll(ci);
|
||||
}, (e) => e is ConcurrentModificationError, "cm2");
|
||||
}
|
||||
|
||||
// With EfficientLengthIterable interface (uses length).
|
||||
{
|
||||
// Change length of list after 20 additions.
|
||||
var l = [];
|
||||
var ci = new EfficientTestIterable(257, 257, 20, () {
|
||||
l.add("X");
|
||||
});
|
||||
Expect.throws(() {
|
||||
l.addAll(ci);
|
||||
}, (e) => e is ConcurrentModificationError, "cm3");
|
||||
}
|
||||
|
||||
{
|
||||
var l = [];
|
||||
var ci = new EfficientTestIterable(257, 257, 20, () {
|
||||
l.length = 0;
|
||||
});
|
||||
Expect.throws(() {
|
||||
l.addAll(ci);
|
||||
}, (e) => e is ConcurrentModificationError, "cm4");
|
||||
}
|
||||
|
||||
{
|
||||
// Length 500, only 250 elements.
|
||||
var l = [];
|
||||
var ci = new EfficientTestIterable(500, 250);
|
||||
l.addAll(ci);
|
||||
Expect.listEquals(new List.generate(250, (x) => x), l, "cm5");
|
||||
}
|
||||
|
||||
{
|
||||
// Length 250, but 500 elements.
|
||||
var l = [];
|
||||
var ci = new EfficientTestIterable(250, 500);
|
||||
l.addAll(ci);
|
||||
Expect.listEquals(new List.generate(500, (x) => x), l, "cm6");
|
||||
}
|
||||
|
||||
{
|
||||
// Adding to yourself.
|
||||
var l = [1];
|
||||
Expect.throws(() {
|
||||
l.addAll(l);
|
||||
}, (e) => e is ConcurrentModificationError, "cm7");
|
||||
}
|
||||
|
||||
{
|
||||
// Adding to yourself.
|
||||
var l = [1, 2, 3];
|
||||
Expect.throws(() {
|
||||
l.addAll(l);
|
||||
}, (e) => e is ConcurrentModificationError, "cm8");
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
// 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.
|
||||
|
||||
library hasNextIterator.test;
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
import 'dart:collection';
|
||||
|
||||
main() {
|
||||
var it = new HasNextIterator([].iterator);
|
||||
Expect.isFalse(it.hasNext);
|
||||
Expect.isFalse(it.hasNext);
|
||||
Expect.throws(() => it.next(), (e) => e is StateError);
|
||||
Expect.isFalse(it.hasNext);
|
||||
|
||||
it = new HasNextIterator([1].iterator);
|
||||
Expect.isTrue(it.hasNext);
|
||||
Expect.isTrue(it.hasNext);
|
||||
Expect.equals(1, it.next());
|
||||
Expect.isFalse(it.hasNext);
|
||||
Expect.isFalse(it.hasNext);
|
||||
Expect.throws(() => it.next(), (e) => e is StateError);
|
||||
Expect.isFalse(it.hasNext);
|
||||
|
||||
it = new HasNextIterator([1, 2].iterator);
|
||||
Expect.isTrue(it.hasNext);
|
||||
Expect.isTrue(it.hasNext);
|
||||
Expect.equals(1, it.next());
|
||||
Expect.isTrue(it.hasNext);
|
||||
Expect.isTrue(it.hasNext);
|
||||
Expect.equals(2, it.next());
|
||||
Expect.isFalse(it.hasNext);
|
||||
Expect.isFalse(it.hasNext);
|
||||
Expect.throws(() => it.next(), (e) => e is StateError);
|
||||
Expect.isFalse(it.hasNext);
|
||||
}
|
||||
@@ -1,308 +0,0 @@
|
||||
// Copyright (c) 2013, 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.
|
||||
|
||||
// Tests of hash map behavior, with focus in iteration and concurrent
|
||||
// modification errors.
|
||||
|
||||
library hash_map2_test;
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
import 'dart:collection';
|
||||
|
||||
testMap(Map newMap(), Map newMapFrom(Map map)) {
|
||||
Map gen(int from, int to) {
|
||||
Map map = new LinkedHashMap();
|
||||
for (int i = from; i < to; i++) map[i] = i;
|
||||
return map;
|
||||
}
|
||||
|
||||
bool odd(int n) => (n & 1) == 1;
|
||||
bool even(int n) => (n & 1) == 0;
|
||||
void addAll(Map toMap, Map fromMap) {
|
||||
fromMap.forEach((k, v) {
|
||||
toMap[k] = v;
|
||||
});
|
||||
}
|
||||
|
||||
{
|
||||
// Test growing to largish capacity.
|
||||
Map map = newMap();
|
||||
|
||||
for (int i = 0; i < 256; i++) {
|
||||
map[i] = i;
|
||||
}
|
||||
addAll(map, gen(256, 512));
|
||||
addAll(map, newMapFrom(gen(512, 1000)));
|
||||
Expect.equals(1000, map.length);
|
||||
|
||||
// Remove half.
|
||||
for (int i = 0; i < 1000; i += 2) map.remove(i);
|
||||
Expect.equals(500, map.length);
|
||||
Expect.isFalse(map.keys.any(even));
|
||||
Expect.isTrue(map.keys.every(odd));
|
||||
|
||||
// Re-add all.
|
||||
addAll(map, gen(0, 1000));
|
||||
Expect.equals(1000, map.length);
|
||||
}
|
||||
|
||||
{
|
||||
// Test having many deleted elements.
|
||||
Map map = newMap();
|
||||
map[0] = 0;
|
||||
for (int i = 0; i < 1000; i++) {
|
||||
map[i + 1] = i + 1;
|
||||
map.remove(i);
|
||||
Expect.equals(1, map.length);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
// Test having many elements with same hashCode
|
||||
Map map = newMap();
|
||||
for (int i = 0; i < 1000; i++) {
|
||||
map[new BadHashCode()] = 0;
|
||||
}
|
||||
Expect.equals(1000, map.length);
|
||||
}
|
||||
|
||||
{
|
||||
// Check concurrent modification
|
||||
Map map = newMap()
|
||||
..[0] = 0
|
||||
..[1] = 1;
|
||||
|
||||
{
|
||||
// Test adding before a moveNext.
|
||||
Iterator iter = map.keys.iterator;
|
||||
iter.moveNext();
|
||||
map[1] = 9; // Updating existing key isn't a modification.
|
||||
iter.moveNext();
|
||||
map[2] = 2;
|
||||
Expect.throws(iter.moveNext, (e) => e is Error);
|
||||
}
|
||||
|
||||
{
|
||||
// Test adding after last element.
|
||||
Iterator iter = map.keys.iterator;
|
||||
Expect.equals(3, map.length);
|
||||
iter.moveNext();
|
||||
iter.moveNext();
|
||||
iter.moveNext();
|
||||
map[3] = 3;
|
||||
Expect.throws(iter.moveNext, (e) => e is Error);
|
||||
}
|
||||
|
||||
{
|
||||
// Test removing during iteration.
|
||||
Iterator iter = map.keys.iterator;
|
||||
iter.moveNext();
|
||||
map.remove(1000); // Not a modification if it's not there.
|
||||
iter.moveNext();
|
||||
int n = iter.current;
|
||||
map.remove(n);
|
||||
// Removing doesn't change current.
|
||||
Expect.equals(n, iter.current);
|
||||
Expect.throws(iter.moveNext, (e) => e is Error);
|
||||
}
|
||||
|
||||
{
|
||||
// Test removing after last element.
|
||||
Iterator iter = map.keys.iterator;
|
||||
Expect.equals(3, map.length);
|
||||
iter.moveNext();
|
||||
iter.moveNext();
|
||||
iter.moveNext();
|
||||
int n = iter.current;
|
||||
map.remove(n);
|
||||
// Removing doesn't change current.
|
||||
Expect.equals(n, iter.current);
|
||||
Expect.throws(iter.moveNext, (e) => e is Error);
|
||||
}
|
||||
|
||||
{
|
||||
// Test that updating value of existing key doesn't cause concurrent
|
||||
// modification error.
|
||||
Iterator iter = map.keys.iterator;
|
||||
Expect.equals(2, map.length);
|
||||
iter.moveNext();
|
||||
int n = iter.current;
|
||||
map[n] = n * 2;
|
||||
iter.moveNext();
|
||||
Expect.equals(map[iter.current], iter.current);
|
||||
}
|
||||
|
||||
{
|
||||
// Test that modification during putIfAbsent is not an error.
|
||||
map.putIfAbsent(4, () {
|
||||
map[5] = 5;
|
||||
map[4] = -1;
|
||||
return 4;
|
||||
});
|
||||
Expect.equals(4, map[4]);
|
||||
Expect.equals(5, map[5]);
|
||||
}
|
||||
|
||||
{
|
||||
// Check adding many existing keys isn't considered modification.
|
||||
Map map2 = newMap();
|
||||
for (var key in map.keys) {
|
||||
map2[key] = map[key] + 1;
|
||||
}
|
||||
Iterator iter = map.keys.iterator;
|
||||
addAll(map, map2);
|
||||
// Shouldn't throw.
|
||||
iter.moveNext();
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
// Regression test for bug in putIfAbsent where adding an element
|
||||
// that make the table grow, can be lost.
|
||||
Map map = newMap();
|
||||
map.putIfAbsent("S", () => 0);
|
||||
map.putIfAbsent("T", () => 0);
|
||||
map.putIfAbsent("U", () => 0);
|
||||
map.putIfAbsent("C", () => 0);
|
||||
map.putIfAbsent("a", () => 0);
|
||||
map.putIfAbsent("b", () => 0);
|
||||
map.putIfAbsent("n", () => 0);
|
||||
Expect.isTrue(map.containsKey("n"));
|
||||
}
|
||||
|
||||
{
|
||||
// Check that putIfAbsent works just as well as put.
|
||||
Map map = newMap();
|
||||
for (int i = 0; i < 128; i++) {
|
||||
map.putIfAbsent(i, () => i);
|
||||
Expect.isTrue(map.containsKey(i));
|
||||
map.putIfAbsent(i >> 1, () => -1); // Never triggers.
|
||||
}
|
||||
for (int i = 0; i < 128; i++) {
|
||||
Expect.equals(i, map[i]);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
// Check that updating existing elements is not a modification.
|
||||
// This must be the case even if the underlying data structure is
|
||||
// nearly full.
|
||||
for (int i = 1; i < 128; i++) {
|
||||
// Create maps of different sizes, some of which should be
|
||||
// at a limit of the underlying data structure.
|
||||
Map map = newMapFrom(gen(0, i));
|
||||
|
||||
// ForEach-iteration.
|
||||
map.forEach((key, v) {
|
||||
Expect.equals(key, map[key]);
|
||||
map[key] = key + 1;
|
||||
map.remove(1000); // Removing something not there.
|
||||
map.putIfAbsent(key, () => Expect.fail("SHOULD NOT BE ABSENT"));
|
||||
// Doesn't cause ConcurrentModificationError.
|
||||
});
|
||||
|
||||
// for-in iteration.
|
||||
for (int key in map.keys) {
|
||||
Expect.equals(key + 1, map[key]);
|
||||
map[key] = map[key] + 1;
|
||||
map.remove(1000); // Removing something not there.
|
||||
map.putIfAbsent(key, () => Expect.fail("SHOULD NOT BE ABSENT"));
|
||||
// Doesn't cause ConcurrentModificationError.
|
||||
}
|
||||
|
||||
// Raw iterator.
|
||||
Iterator iter = map.keys.iterator;
|
||||
for (int key = 0; key < i; key++) {
|
||||
Expect.equals(key + 2, map[key]);
|
||||
map[key] = key + 3;
|
||||
map.remove(1000); // Removing something not there.
|
||||
map.putIfAbsent(key, () => Expect.fail("SHOULD NOT BE ABSENT"));
|
||||
// Doesn't cause ConcurrentModificationError on the moveNext.
|
||||
}
|
||||
iter.moveNext(); // Should not throw.
|
||||
|
||||
// Remove a lot of elements, which can cause a re-tabulation.
|
||||
for (int key = 1; key < i; key++) {
|
||||
Expect.equals(key + 3, map[key]);
|
||||
map.remove(key);
|
||||
}
|
||||
iter = map.keys.iterator;
|
||||
map[0] = 2;
|
||||
iter.moveNext(); // Should not throw.
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
// Check that null can be in the map.
|
||||
Map map = newMap();
|
||||
map[null] = 0;
|
||||
Expect.equals(1, map.length);
|
||||
Expect.isTrue(map.containsKey(null));
|
||||
Expect.isNull(map.keys.first);
|
||||
Expect.isNull(map.keys.last);
|
||||
map[null] = 1;
|
||||
Expect.equals(1, map.length);
|
||||
Expect.isTrue(map.containsKey(null));
|
||||
map.remove(null);
|
||||
Expect.isTrue(map.isEmpty);
|
||||
Expect.isFalse(map.containsKey(null));
|
||||
|
||||
// Created using map.from.
|
||||
map = newMapFrom(new Map()..[null] = 0);
|
||||
Expect.equals(1, map.length);
|
||||
Expect.isTrue(map.containsKey(null));
|
||||
Expect.isNull(map.keys.first);
|
||||
Expect.isNull(map.keys.last);
|
||||
map[null] = 1;
|
||||
Expect.equals(1, map.length);
|
||||
Expect.isTrue(map.containsKey(null));
|
||||
map.remove(null);
|
||||
Expect.isTrue(map.isEmpty);
|
||||
Expect.isFalse(map.containsKey(null));
|
||||
|
||||
Map fromMap = new Map();
|
||||
fromMap[1] = 0;
|
||||
fromMap[2] = 0;
|
||||
fromMap[3] = 0;
|
||||
fromMap[null] = 0;
|
||||
fromMap[4] = 0;
|
||||
fromMap[5] = 0;
|
||||
fromMap[6] = 0;
|
||||
Expect.equals(7, fromMap.length);
|
||||
|
||||
// map that grows with null in it.
|
||||
map = newMapFrom(fromMap);
|
||||
Expect.equals(7, map.length);
|
||||
for (int i = 7; i < 128; i++) {
|
||||
map[i] = 0;
|
||||
}
|
||||
Expect.equals(128, map.length);
|
||||
Expect.isTrue(map.containsKey(null));
|
||||
map[null] = 1;
|
||||
Expect.equals(128, map.length);
|
||||
Expect.isTrue(map.containsKey(null));
|
||||
map.remove(null);
|
||||
Expect.equals(127, map.length);
|
||||
Expect.isFalse(map.containsKey(null));
|
||||
}
|
||||
}
|
||||
|
||||
void main() {
|
||||
Expect.isTrue(new HashMap<int, String>() is Map<int, String>);
|
||||
Expect.isTrue(new LinkedHashMap<int, String>() is Map<int, String>);
|
||||
Expect.isTrue(new HashMap<String, int>.from({}) is Map<String, int>);
|
||||
Expect.isTrue(new LinkedHashMap<String, int>.from({}) is Map<String, int>);
|
||||
Expect.isTrue(<String, int>{} is Map<String, int>);
|
||||
Expect.isTrue(const <String, int>{} is Map<String, int>);
|
||||
|
||||
testMap(() => new HashMap(), (m) => new HashMap.from(m));
|
||||
testMap(() => new LinkedHashMap(), (m) => new LinkedHashMap.from(m));
|
||||
}
|
||||
|
||||
class BadHashCode {
|
||||
static int idCounter = 0;
|
||||
final int id;
|
||||
BadHashCode() : id = idCounter++;
|
||||
int get hashCode => 42;
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
// 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.
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
|
||||
// Test program for the HashMap class.
|
||||
|
||||
class HashMapTest {
|
||||
static testMain() {
|
||||
var m = new Map();
|
||||
Expect.equals(0, m.length);
|
||||
Expect.equals(true, m.isEmpty);
|
||||
m["one"] = 1;
|
||||
Expect.equals(1, m.length);
|
||||
Expect.equals(false, m.isEmpty);
|
||||
Expect.equals(1, m["one"]);
|
||||
}
|
||||
}
|
||||
|
||||
main() {
|
||||
HashMapTest.testMain();
|
||||
}
|
||||
@@ -1,363 +0,0 @@
|
||||
// Copyright (c) 2013, 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.
|
||||
//
|
||||
// VMOptions=
|
||||
|
||||
// Tests of hash set behavior, with focus in iteration and concurrent
|
||||
// modification errors.
|
||||
|
||||
library hash_map2_test;
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
import 'dart:collection';
|
||||
import 'dart:math' as math;
|
||||
|
||||
testSet(Set newSet(), Set newSetFrom(Iterable from)) {
|
||||
Set gen(int from, int to) =>
|
||||
new Set.from(new Iterable.generate(to - from, (n) => n + from));
|
||||
|
||||
bool odd(int n) => (n & 1) == 1;
|
||||
bool even(int n) => (n & 1) == 0;
|
||||
|
||||
{
|
||||
// Test growing to largish capacity.
|
||||
Set set = newSet();
|
||||
|
||||
for (int i = 0; i < 256; i++) {
|
||||
set.add(i);
|
||||
}
|
||||
|
||||
set.addAll(gen(256, 512));
|
||||
set.addAll(newSetFrom(gen(512, 1000)));
|
||||
Expect.equals(1000, set.length);
|
||||
|
||||
// Remove half.
|
||||
for (int i = 0; i < 1000; i += 2) set.remove(i);
|
||||
Expect.equals(500, set.length);
|
||||
Expect.isFalse(set.any(even));
|
||||
Expect.isTrue(set.every(odd));
|
||||
|
||||
// Re-add all.
|
||||
set.addAll(gen(0, 1000));
|
||||
Expect.equals(1000, set.length);
|
||||
}
|
||||
|
||||
{
|
||||
// Test having many deleted elements.
|
||||
Set set = newSet();
|
||||
set.add(0);
|
||||
for (int i = 0; i < 1000; i++) {
|
||||
set.add(i + 1);
|
||||
set.remove(i);
|
||||
Expect.equals(1, set.length);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
// Test having many elements with same hashCode
|
||||
Set set = newSet();
|
||||
for (int i = 0; i < 1000; i++) {
|
||||
set.add(new BadHashCode());
|
||||
}
|
||||
Expect.equals(1000, set.length);
|
||||
}
|
||||
|
||||
{
|
||||
// Check concurrent modification
|
||||
Set set = newSet()..add(0)..add(1);
|
||||
|
||||
{
|
||||
// Test adding before a moveNext.
|
||||
Iterator iter = set.iterator;
|
||||
iter.moveNext();
|
||||
set.add(1); // Updating existing key isn't a modification.
|
||||
iter.moveNext();
|
||||
set.add(2);
|
||||
Expect.throws(iter.moveNext, (e) => e is Error);
|
||||
}
|
||||
|
||||
{
|
||||
// Test adding after last element.
|
||||
Iterator iter = set.iterator;
|
||||
Expect.equals(3, set.length);
|
||||
iter.moveNext();
|
||||
iter.moveNext();
|
||||
iter.moveNext();
|
||||
set.add(3);
|
||||
Expect.throws(iter.moveNext, (e) => e is Error);
|
||||
}
|
||||
|
||||
{
|
||||
// Test removing during iteration.
|
||||
Iterator iter = set.iterator;
|
||||
iter.moveNext();
|
||||
set.remove(1000); // Not a modification if it's not there.
|
||||
iter.moveNext();
|
||||
int n = iter.current;
|
||||
set.remove(n);
|
||||
// Removing doesn't change current.
|
||||
Expect.equals(n, iter.current);
|
||||
Expect.throws(iter.moveNext, (e) => e is Error);
|
||||
}
|
||||
|
||||
{
|
||||
// Test removing after last element.
|
||||
Iterator iter = set.iterator;
|
||||
Expect.equals(3, set.length);
|
||||
iter.moveNext();
|
||||
iter.moveNext();
|
||||
iter.moveNext();
|
||||
int n = iter.current;
|
||||
set.remove(n);
|
||||
// Removing doesn't change current.
|
||||
Expect.equals(n, iter.current);
|
||||
Expect.throws(iter.moveNext, (e) => e is Error);
|
||||
}
|
||||
|
||||
{
|
||||
// Test that updating value doesn't cause error.
|
||||
Iterator iter = set.iterator;
|
||||
Expect.equals(2, set.length);
|
||||
iter.moveNext();
|
||||
int n = iter.current;
|
||||
set.add(n);
|
||||
iter.moveNext();
|
||||
Expect.isTrue(set.contains(iter.current));
|
||||
}
|
||||
|
||||
{
|
||||
// Check adding many existing values isn't considered modification.
|
||||
Set set2 = newSet();
|
||||
for (var value in set) {
|
||||
set2.add(value);
|
||||
}
|
||||
Iterator iter = set.iterator;
|
||||
set.addAll(set2);
|
||||
// Shouldn't throw.
|
||||
iter.moveNext();
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
// Check that updating existing elements is not a modification.
|
||||
// This must be the case even if the underlying data structure is
|
||||
// nearly full.
|
||||
for (int i = 1; i < 128; i++) {
|
||||
// Create maps of different sizes, some of which should be
|
||||
// at a limit of the underlying data structure.
|
||||
Set set = newSetFrom(gen(0, i));
|
||||
Iterator iter = set.iterator;
|
||||
for (int j = 0; j < i; j++) {
|
||||
set.add(j);
|
||||
}
|
||||
iter.moveNext(); // Should not throw.
|
||||
|
||||
for (int j = 1; j < i; j++) {
|
||||
set.remove(j);
|
||||
}
|
||||
iter = set.iterator;
|
||||
set.add(0);
|
||||
iter.moveNext(); // Should not throw.
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
// Check that null can be in the set.
|
||||
Set set = newSet();
|
||||
set.add(null);
|
||||
Expect.equals(1, set.length);
|
||||
Expect.isTrue(set.contains(null));
|
||||
Expect.isNull(set.first);
|
||||
Expect.isNull(set.last);
|
||||
set.add(null);
|
||||
Expect.equals(1, set.length);
|
||||
Expect.isTrue(set.contains(null));
|
||||
set.remove(null);
|
||||
Expect.isTrue(set.isEmpty);
|
||||
Expect.isFalse(set.contains(null));
|
||||
|
||||
// Created using Set.from.
|
||||
set = newSetFrom([null]);
|
||||
Expect.equals(1, set.length);
|
||||
Expect.isTrue(set.contains(null));
|
||||
Expect.isNull(set.first);
|
||||
Expect.isNull(set.last);
|
||||
set.add(null);
|
||||
Expect.equals(1, set.length);
|
||||
Expect.isTrue(set.contains(null));
|
||||
set.remove(null);
|
||||
Expect.isTrue(set.isEmpty);
|
||||
Expect.isFalse(set.contains(null));
|
||||
|
||||
// Set that grows with null in it.
|
||||
set = newSetFrom([1, 2, 3, null, 4, 5, 6]);
|
||||
Expect.equals(7, set.length);
|
||||
for (int i = 7; i < 128; i++) {
|
||||
set.add(i);
|
||||
}
|
||||
Expect.equals(128, set.length);
|
||||
Expect.isTrue(set.contains(null));
|
||||
set.add(null);
|
||||
Expect.equals(128, set.length);
|
||||
Expect.isTrue(set.contains(null));
|
||||
set.remove(null);
|
||||
Expect.equals(127, set.length);
|
||||
Expect.isFalse(set.contains(null));
|
||||
}
|
||||
|
||||
{
|
||||
// Check that addAll and clear works.
|
||||
Set set = newSet();
|
||||
set.addAll([]);
|
||||
Expect.isTrue(set.isEmpty);
|
||||
set.addAll([1, 3, 2]);
|
||||
Expect.equals(3, set.length);
|
||||
Expect.isTrue(set.contains(1));
|
||||
Expect.isTrue(set.contains(3));
|
||||
Expect.isTrue(set.contains(2));
|
||||
Expect.isFalse(set.contains(4));
|
||||
set.clear();
|
||||
Expect.isTrue(set.isEmpty);
|
||||
}
|
||||
|
||||
{
|
||||
// Check that removeWhere and retainWhere work.
|
||||
Set set = newSetFrom([1, 2, 3]);
|
||||
set.removeWhere((each) => each == 2);
|
||||
Expect.equals(2, set.length);
|
||||
Expect.isTrue(set.contains(1));
|
||||
Expect.isFalse(set.contains(2));
|
||||
Expect.isTrue(set.contains(3));
|
||||
set.retainWhere((each) => each == 3);
|
||||
Expect.equals(1, set.length);
|
||||
Expect.isFalse(set.contains(1));
|
||||
Expect.isFalse(set.contains(2));
|
||||
Expect.isTrue(set.contains(3));
|
||||
}
|
||||
|
||||
{
|
||||
// Test lookup
|
||||
Set set = newSet();
|
||||
var m1a = new Mutable(1);
|
||||
var m1b = new Mutable(1);
|
||||
var m2a = new Mutable(2);
|
||||
var m2b = new Mutable(2);
|
||||
Expect.isNull(set.lookup(m1a));
|
||||
Expect.isNull(set.lookup(m1b));
|
||||
set.add(m1a);
|
||||
Expect.identical(m1a, set.lookup(m1a));
|
||||
Expect.identical(m1a, set.lookup(m1b));
|
||||
|
||||
Expect.isNull(set.lookup(m2a));
|
||||
Expect.isNull(set.lookup(m2b));
|
||||
set.add(m2a);
|
||||
Expect.identical(m2a, set.lookup(m2a));
|
||||
Expect.identical(m2a, set.lookup(m2b));
|
||||
|
||||
set.add(m2b); // Adding doesn't change element.
|
||||
Expect.identical(m2a, set.lookup(m2a));
|
||||
Expect.identical(m2a, set.lookup(m2b));
|
||||
|
||||
set.remove(m1a);
|
||||
set.add(m1b);
|
||||
Expect.identical(m1b, set.lookup(m1a));
|
||||
Expect.identical(m1b, set.lookup(m1b));
|
||||
|
||||
set.add(1);
|
||||
Expect.identical(1, set.lookup(1.0));
|
||||
set.add(-0.0);
|
||||
Expect.identical(-0.0, set.lookup(0.0));
|
||||
}
|
||||
|
||||
{
|
||||
// Test special hash codes
|
||||
Set set = newSet();
|
||||
List keys = [];
|
||||
// Powers of two
|
||||
for (int i = 63; i >= 2; --i) {
|
||||
keys.add(new Mutable(math.pow(2, i)));
|
||||
}
|
||||
for (var key in keys) {
|
||||
Expect.isTrue(set.add(key));
|
||||
}
|
||||
for (var key in keys) {
|
||||
Expect.isTrue(set.contains(key));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void testIdentitySet(Set create()) {
|
||||
Set set = create();
|
||||
set.add(1);
|
||||
set.add(2);
|
||||
set.add(1); // Integers are identical if equal.
|
||||
Expect.equals(2, set.length);
|
||||
var complex = 4;
|
||||
complex = set.length == 2 ? complex ~/ 4 : 87; // Avoid compile-time constant.
|
||||
Expect.isTrue(set.contains(complex)); // 1 is in set, even if computed.
|
||||
set.clear();
|
||||
|
||||
// All compile time constants are identical to themselves.
|
||||
var constants = [
|
||||
double.INFINITY,
|
||||
double.NAN, -0.0, //# 01: ok
|
||||
0.0, 42, "", null, false, true, #bif, testIdentitySet
|
||||
];
|
||||
set.addAll(constants);
|
||||
Expect.equals(constants.length, set.length);
|
||||
for (var c in constants) {
|
||||
Expect.isTrue(set.contains(c), "constant: $c");
|
||||
}
|
||||
Expect.isTrue(set.containsAll(constants), "constants: $set");
|
||||
set.clear();
|
||||
|
||||
var m1 = new Mutable(1);
|
||||
var m2 = new Mutable(2);
|
||||
var m3 = new Mutable(3);
|
||||
var m4 = new Mutable(2); // Equal to m2, but not identical.
|
||||
set.addAll([m1, m2, m3, m4]);
|
||||
Expect.equals(4, set.length);
|
||||
Expect.equals(3, m3.hashCode);
|
||||
m3.id = 1;
|
||||
Expect.equals(1, m3.hashCode);
|
||||
// Changing hashCode doesn't affect lookup.
|
||||
Expect.isTrue(set.contains(m3));
|
||||
Expect.isTrue(set.contains(m1));
|
||||
set.remove(m3);
|
||||
Expect.isFalse(set.contains(m3));
|
||||
Expect.isTrue(set.contains(m1));
|
||||
|
||||
Expect.identical(m1, set.lookup(m1));
|
||||
Expect.identical(null, set.lookup(m3));
|
||||
}
|
||||
|
||||
void main() {
|
||||
testSet(() => new Set(), (m) => new Set.from(m));
|
||||
testSet(() => new HashSet(), (m) => new HashSet.from(m));
|
||||
testSet(() => new LinkedHashSet(), (m) => new LinkedHashSet.from(m));
|
||||
testIdentitySet(() => new Set.identity());
|
||||
testIdentitySet(() => new HashSet.identity());
|
||||
testIdentitySet(() => new LinkedHashSet.identity());
|
||||
testIdentitySet(() => new HashSet(
|
||||
equals: (x, y) => identical(x, y), hashCode: (x) => identityHashCode(x)));
|
||||
testIdentitySet(() => new LinkedHashSet(
|
||||
equals: (x, y) => identical(x, y), hashCode: (x) => identityHashCode(x)));
|
||||
}
|
||||
|
||||
class BadHashCode {
|
||||
static int idCounter = 0;
|
||||
final int id;
|
||||
BadHashCode() : id = idCounter++;
|
||||
int get hashCode => 42;
|
||||
// operator == is identity.
|
||||
// Can't make a bad compareTo that isn't invalid.
|
||||
int compareTo(BadHashCode other) => id - other.id;
|
||||
}
|
||||
|
||||
class Mutable {
|
||||
int id;
|
||||
Mutable(this.id);
|
||||
int get hashCode => id;
|
||||
bool operator ==(other) => other is Mutable && id == other.id;
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
// Copyright (c) 2015, 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.
|
||||
|
||||
// Tests of hash set type checking.
|
||||
|
||||
library hash_set_type_check_test;
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
import 'dart:collection';
|
||||
|
||||
testSet(Set<String> newSet()) {
|
||||
Set<String> s = newSet();
|
||||
Expect.throws(() => s.add(1), (e) => e is Error);
|
||||
Expect.isNull(s.lookup(1));
|
||||
}
|
||||
|
||||
void testIdentitySet(Set create()) {
|
||||
Set<String> s = create();
|
||||
Expect.throws(() => s.add(1), (e) => e is Error);
|
||||
Expect.isNull(s.lookup(1));
|
||||
}
|
||||
|
||||
bool get inCheckedMode {
|
||||
try {
|
||||
var i = 1;
|
||||
String j = i;
|
||||
} catch (_) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void main() {
|
||||
if (!inCheckedMode) return;
|
||||
|
||||
testSet(() => new Set<String>());
|
||||
testSet(() => new HashSet<String>());
|
||||
testSet(() => new LinkedHashSet<String>());
|
||||
testIdentitySet(() => new Set<String>.identity());
|
||||
testIdentitySet(() => new HashSet<String>.identity());
|
||||
testIdentitySet(() => new LinkedHashSet<String>.identity());
|
||||
testIdentitySet(() => new HashSet<String>(
|
||||
equals: (x, y) => identical(x, y), hashCode: (x) => identityHashCode(x)));
|
||||
testIdentitySet(() => new LinkedHashSet<String>(
|
||||
equals: (x, y) => identical(x, y), hashCode: (x) => identityHashCode(x)));
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
// Copyright (c) 2013, 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";
|
||||
|
||||
double fib(double n) {
|
||||
return n <= 1.0 ? 1.0 : fib(n - 1) + fib(n - 2);
|
||||
}
|
||||
|
||||
main() {
|
||||
// Compute the same value in a way that won't be optimized away so the results
|
||||
// are different objects in memory.
|
||||
var a = fib(5.0) + 1.0;
|
||||
var b = fib(4.0) + 4.0;
|
||||
|
||||
Expect.isTrue(identical(a, b));
|
||||
Expect.equals(identityHashCode(a), identityHashCode(b));
|
||||
Expect.equals(a, b);
|
||||
Expect.equals(a.hashCode, b.hashCode);
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
// Copyright (c) 2013, 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";
|
||||
|
||||
class Override {
|
||||
int hash;
|
||||
int get superHash => super.hashCode;
|
||||
int get hashCode => hash;
|
||||
|
||||
int foo() => hash; // Just some function that can be closurized.
|
||||
|
||||
bool operator ==(Object other) =>
|
||||
other is Override && (other as Override).hash == hash;
|
||||
}
|
||||
|
||||
int bar() => 42; // Some global function.
|
||||
|
||||
main() {
|
||||
var o = new Object();
|
||||
var hash = o.hashCode;
|
||||
// Doesn't change.
|
||||
Expect.equals(hash, o.hashCode);
|
||||
Expect.equals(hash, identityHashCode(o));
|
||||
|
||||
var c = new Override();
|
||||
int identityHash = c.superHash;
|
||||
hash = (identityHash == 42) ? 37 : 42;
|
||||
c.hash = hash;
|
||||
Expect.equals(hash, c.hashCode);
|
||||
Expect.equals(identityHash, identityHashCode(c));
|
||||
|
||||
// These classes don't override hashCode.
|
||||
var samples = [0, 0x10000000, 1.5, -0, null, true, false, const Object()];
|
||||
for (var v in samples) {
|
||||
print(v);
|
||||
Expect.equals(v.hashCode, identityHashCode(v));
|
||||
}
|
||||
// These do, or might do, but we can still use hashCodeOf and get the same
|
||||
// result each time.
|
||||
samples = ["string", "", (x) => 42, c.foo, bar];
|
||||
for (var v in samples) {
|
||||
print(v);
|
||||
Expect.equals(v.hashCode, v.hashCode);
|
||||
Expect.equals(identityHashCode(v), identityHashCode(v));
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
// Copyright (c) 2013, 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.
|
||||
|
||||
// Test that the internal hidden library doesn't make problems with taking
|
||||
// stack-traces.
|
||||
|
||||
main() {
|
||||
print(['x'].where((_) {
|
||||
// We actually don't really care for the successful case. We just want to
|
||||
// make sure that the test doesn't crash when it is negative.
|
||||
throw 'fisk'; // //# 01: runtime error
|
||||
return true;
|
||||
}).toList());
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
// 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.
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
|
||||
// Check that indexed access to lists throws correct exception if index
|
||||
// is not int.
|
||||
|
||||
main() {
|
||||
checkList(new List(10));
|
||||
var growable = new List();
|
||||
growable.add(1);
|
||||
growable.add(1);
|
||||
checkList(growable);
|
||||
}
|
||||
|
||||
checkList(var list) {
|
||||
// Check unoptimized.
|
||||
Expect.isFalse(checkCatch(getIt, list, 1));
|
||||
Expect.isTrue(checkCatch(getIt, list, "hi"));
|
||||
Expect.isFalse(checkCatch(putIt, list, 1));
|
||||
Expect.isTrue(checkCatch(putIt, list, "hi"));
|
||||
// Optimize 'getIt' and 'putIt'.
|
||||
for (int i = 0; i < 2000; i++) {
|
||||
putIt(list, 1);
|
||||
getIt(list, 1);
|
||||
}
|
||||
Expect.isTrue(checkCatch(getIt, list, "hi"));
|
||||
Expect.isTrue(checkCatch(putIt, list, "hi"));
|
||||
}
|
||||
|
||||
checkCatch(var f, var list, var index) {
|
||||
try {
|
||||
f(list, index);
|
||||
} on ArgumentError catch (e) {
|
||||
return true;
|
||||
} on TypeError catch (t) {
|
||||
return true; // thrown in type checked mode.
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
getIt(var a, var i) {
|
||||
return a[i];
|
||||
}
|
||||
|
||||
putIt(var a, var i) {
|
||||
a[i] = null;
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
// Copyright (c) 2013, 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() {
|
||||
Expect.equals(0, 0.ceil());
|
||||
Expect.equals(1, 1.ceil());
|
||||
Expect.equals(0x1234, 0x1234.ceil());
|
||||
Expect.equals(0x12345678, 0x12345678.ceil());
|
||||
Expect.equals(0x123456789AB, 0x123456789AB.ceil());
|
||||
Expect.equals(0x123456789ABCDEF, 0x123456789ABCDEF.ceil());
|
||||
Expect.equals(0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF,
|
||||
0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF.ceil());
|
||||
Expect.equals(-1, -1.ceil());
|
||||
Expect.equals(-0x1234, -0x1234.ceil());
|
||||
Expect.equals(-0x12345678, -0x12345678.ceil());
|
||||
Expect.equals(-0x123456789AB, -0x123456789AB.ceil());
|
||||
Expect.equals(-0x123456789ABCDEF, -0x123456789ABCDEF.ceil());
|
||||
Expect.equals(-0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF,
|
||||
-0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF.ceil());
|
||||
|
||||
Expect.isTrue(0.ceil() is int);
|
||||
Expect.isTrue(1.ceil() is int);
|
||||
Expect.isTrue(0x1234.ceil() is int);
|
||||
Expect.isTrue(0x12345678.ceil() is int);
|
||||
Expect.isTrue(0x123456789AB.ceil() is int);
|
||||
Expect.isTrue(0x123456789ABCDEF.ceil() is int);
|
||||
Expect
|
||||
.isTrue(0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF.ceil() is int);
|
||||
Expect.isTrue(-1.ceil() is int);
|
||||
Expect.isTrue(-0x1234.ceil() is int);
|
||||
Expect.isTrue(-0x12345678.ceil() is int);
|
||||
Expect.isTrue(-0x123456789AB.ceil() is int);
|
||||
Expect.isTrue(-0x123456789ABCDEF.ceil() is int);
|
||||
Expect
|
||||
.isTrue(-0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF.ceil() is int);
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
// Copyright (c) 2013, 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() {
|
||||
Expect.equals(0.0, 0.ceilToDouble());
|
||||
Expect.equals(1.0, 1.ceilToDouble());
|
||||
Expect.equals(0x1234, 0x1234.ceilToDouble());
|
||||
Expect.equals(0x12345678, 0x12345678.ceilToDouble());
|
||||
Expect.equals(0x123456789AB, 0x123456789AB.ceilToDouble());
|
||||
Expect.equals(81985529216486900.0, 0x123456789ABCDEF.ceilToDouble());
|
||||
Expect.equals(2.7898229935051914e+55,
|
||||
0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF.ceilToDouble());
|
||||
Expect.equals(-1.0, -1.ceilToDouble());
|
||||
Expect.equals(-0x1234, -0x1234.ceilToDouble());
|
||||
Expect.equals(-0x12345678, -0x12345678.ceilToDouble());
|
||||
Expect.equals(-0x123456789AB, -0x123456789AB.ceilToDouble());
|
||||
Expect.equals(-81985529216486900.0, -0x123456789ABCDEF.ceilToDouble());
|
||||
Expect.equals(-2.7898229935051914e+55,
|
||||
-0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF.ceilToDouble());
|
||||
|
||||
Expect.isTrue(0.ceilToDouble() is double);
|
||||
Expect.isTrue(1.ceilToDouble() is double);
|
||||
Expect.isTrue(0x1234.ceilToDouble() is double);
|
||||
Expect.isTrue(0x12345678.ceilToDouble() is double);
|
||||
Expect.isTrue(0x123456789AB.ceilToDouble() is double);
|
||||
Expect.isTrue(0x123456789ABCDEF.ceilToDouble() is double);
|
||||
Expect.isTrue(0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF.ceilToDouble()
|
||||
is double);
|
||||
Expect.isTrue(-1.ceilToDouble() is double);
|
||||
Expect.isTrue(-0x1234.ceilToDouble() is double);
|
||||
Expect.isTrue(-0x12345678.ceilToDouble() is double);
|
||||
Expect.isTrue(-0x123456789AB.ceilToDouble() is double);
|
||||
Expect.isTrue(-0x123456789ABCDEF.ceilToDouble() is double);
|
||||
Expect.isTrue(-0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF
|
||||
.ceilToDouble() is double);
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
// Copyright (c) 2013, 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() {
|
||||
Expect.equals(0, 0.floor());
|
||||
Expect.equals(1, 1.floor());
|
||||
Expect.equals(0x1234, 0x1234.floor());
|
||||
Expect.equals(0x12345678, 0x12345678.floor());
|
||||
Expect.equals(0x123456789AB, 0x123456789AB.floor());
|
||||
Expect.equals(0x123456789ABCDEF, 0x123456789ABCDEF.floor());
|
||||
Expect.equals(0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF,
|
||||
0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF.floor());
|
||||
Expect.equals(-1, -1.floor());
|
||||
Expect.equals(-0x1234, -0x1234.floor());
|
||||
Expect.equals(-0x12345678, -0x12345678.floor());
|
||||
Expect.equals(-0x123456789AB, -0x123456789AB.floor());
|
||||
Expect.equals(-0x123456789ABCDEF, -0x123456789ABCDEF.floor());
|
||||
Expect.equals(-0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF,
|
||||
-0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF.floor());
|
||||
|
||||
Expect.isTrue(0.floor() is int);
|
||||
Expect.isTrue(1.floor() is int);
|
||||
Expect.isTrue(0x1234.floor() is int);
|
||||
Expect.isTrue(0x12345678.floor() is int);
|
||||
Expect.isTrue(0x123456789AB.floor() is int);
|
||||
Expect.isTrue(0x123456789ABCDEF.floor() is int);
|
||||
Expect
|
||||
.isTrue(0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF.floor() is int);
|
||||
Expect.isTrue(-1.floor() is int);
|
||||
Expect.isTrue(-0x1234.floor() is int);
|
||||
Expect.isTrue(-0x12345678.floor() is int);
|
||||
Expect.isTrue(-0x123456789AB.floor() is int);
|
||||
Expect.isTrue(-0x123456789ABCDEF.floor() is int);
|
||||
Expect.isTrue(
|
||||
-0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF.floor() is int);
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
// Copyright (c) 2013, 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() {
|
||||
Expect.equals(0.0, 0.floorToDouble());
|
||||
Expect.equals(1.0, 1.floorToDouble());
|
||||
Expect.equals(0x1234, 0x1234.floorToDouble());
|
||||
Expect.equals(0x12345678, 0x12345678.floorToDouble());
|
||||
Expect.equals(0x123456789AB, 0x123456789AB.floorToDouble());
|
||||
Expect.equals(81985529216486900.0, 0x123456789ABCDEF.floorToDouble());
|
||||
Expect.equals(2.7898229935051914e+55,
|
||||
0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF.floorToDouble());
|
||||
Expect.equals(-1.0, -1.floorToDouble());
|
||||
Expect.equals(-0x1234, -0x1234.floorToDouble());
|
||||
Expect.equals(-0x12345678, -0x12345678.floorToDouble());
|
||||
Expect.equals(-0x123456789AB, -0x123456789AB.floorToDouble());
|
||||
Expect.equals(-81985529216486900.0, -0x123456789ABCDEF.floorToDouble());
|
||||
Expect.equals(-2.7898229935051914e+55,
|
||||
-0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF.floorToDouble());
|
||||
|
||||
Expect.isTrue(0.floorToDouble() is double);
|
||||
Expect.isTrue(1.floorToDouble() is double);
|
||||
Expect.isTrue(0x1234.floorToDouble() is double);
|
||||
Expect.isTrue(0x12345678.floorToDouble() is double);
|
||||
Expect.isTrue(0x123456789AB.floorToDouble() is double);
|
||||
Expect.isTrue(0x123456789ABCDEF.floorToDouble() is double);
|
||||
Expect.isTrue(0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF
|
||||
.floorToDouble() is double);
|
||||
Expect.isTrue(-1.floorToDouble() is double);
|
||||
Expect.isTrue(-0x1234.floorToDouble() is double);
|
||||
Expect.isTrue(-0x12345678.floorToDouble() is double);
|
||||
Expect.isTrue(-0x123456789AB.floorToDouble() is double);
|
||||
Expect.isTrue(-0x123456789ABCDEF.floorToDouble() is double);
|
||||
Expect.isTrue(-0x123456789ABCDEF0123456789ABCDEF0123456789ABCDEF
|
||||
.floorToDouble() is double);
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
// Copyright (c) 2013, 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.
|
||||
// SharedOptions=-Da=x -Db=- -Dc=0xg -Dd=+ -Dd=
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
|
||||
main() {
|
||||
Expect.isNull(const int.fromEnvironment('a'));
|
||||
Expect.isNull(const int.fromEnvironment('b'));
|
||||
Expect.isNull(const int.fromEnvironment('c'));
|
||||
Expect.isNull(const int.fromEnvironment('d'));
|
||||
Expect.isNull(const int.fromEnvironment('e'));
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
// Copyright (c) 2013, 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.
|
||||
|
||||
main() {
|
||||
const int.fromEnvironment('NOT_FOUND', defaultValue: ''); // //# 01: compile-time error
|
||||
const int.fromEnvironment('NOT_FOUND', defaultValue: true); // //# 02: compile-time error
|
||||
const int.fromEnvironment(null); // //# 03: compile-time error
|
||||
const int.fromEnvironment(1); // //# 04: compile-time error
|
||||
const int.fromEnvironment([]); // //# 05: compile-time error
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user