Remove Expect from core library.

Committed: https://code.google.com/p/dart/source/detail?r=19755
Reverted: http://code.google.com/p/dart/source/detail?r=19756

Review URL: https://codereview.chromium.org//12212016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20996 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
floitsch@google.com 2013-04-05 19:43:16 +00:00
parent c5c15b0881
commit 8fd6d0aafd
1242 changed files with 2505 additions and 33 deletions

303
pkg/expect/lib/expect.dart Normal file
View file

@ -0,0 +1,303 @@
// 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 library contains an Expect class with static methods that can be used
* for simple unit-tests.
*/
library expect;
/**
* Expect is used for tests that do not want to make use of the
* Dart unit test library - for example, the core language tests.
* Third parties are discouraged from using this, and should use
* the expect() function in the unit test library instead for
* test assertions.
*/
class Expect {
/**
* Checks whether the expected and actual values are equal (using `==`).
*/
static void equals(var expected, var actual, [String reason = null]) {
if (expected == actual) return;
String msg = _getMessage(reason);
_fail("Expect.equals(expected: <$expected>, actual: <$actual>$msg) fails.");
}
/**
* Checks whether the actual value is a bool and its value is true.
*/
static void isTrue(var actual, [String reason = null]) {
if (_identical(actual, true)) return;
String msg = _getMessage(reason);
_fail("Expect.isTrue($actual$msg) fails.");
}
/**
* Checks whether the actual value is a bool and its value is false.
*/
static void isFalse(var actual, [String reason = null]) {
if (_identical(actual, false)) return;
String msg = _getMessage(reason);
_fail("Expect.isFalse($actual$msg) fails.");
}
/**
* Checks whether [actual] is null.
*/
static void isNull(actual, [String reason = null]) {
if (null == actual) return;
String msg = _getMessage(reason);
_fail("Expect.isNull(actual: <$actual>$msg) fails.");
}
/**
* Checks whether [actual] is not null.
*/
static void isNotNull(actual, [String reason = null]) {
if (null != actual) return;
String msg = _getMessage(reason);
_fail("Expect.isNotNull(actual: <$actual>$msg) fails.");
}
/**
* Checks whether the expected and actual values are identical
* (using `identical`).
*/
static void identical(var expected, var actual, [String reason = null]) {
if (_identical(expected, actual)) return;
String msg = _getMessage(reason);
_fail("Expect.identical(expected: <$expected>, actual: <$actual>$msg) "
"fails.");
}
// Unconditional failure.
static void fail(String msg) {
_fail("Expect.fail('$msg')");
}
/**
* Failure if the difference between expected and actual is greater than the
* given tolerance. If no tolerance is given, tolerance is assumed to be the
* value 4 significant digits smaller than the value given for expected.
*/
static void approxEquals(num expected,
num actual,
[num tolerance = null,
String reason = null]) {
if (tolerance == null) {
tolerance = (expected / 1e4).abs();
}
// Note: use !( <= ) rather than > so we fail on NaNs
if ((expected - actual).abs() <= tolerance) return;
String msg = _getMessage(reason);
_fail('Expect.approxEquals(expected:<$expected>, actual:<$actual>, '
'tolerance:<$tolerance>$msg) fails');
}
static void notEquals(unexpected, actual, [String reason = null]) {
if (unexpected != actual) return;
String msg = _getMessage(reason);
_fail("Expect.notEquals(unexpected: <$unexpected>, actual:<$actual>$msg) "
"fails.");
}
/**
* Checks that all elements in [expected] and [actual] are equal `==`.
* This is different than the typical check for identity equality `identical`
* used by the standard list implementation. It should also produce nicer
* error messages than just calling `Expect.equals(expected, actual)`.
*/
static void listEquals(List expected, List actual, [String reason = null]) {
String msg = _getMessage(reason);
int n = (expected.length < actual.length) ? expected.length : actual.length;
for (int i = 0; i < n; i++) {
if (expected[i] != actual[i]) {
_fail('Expect.listEquals(at index $i, '
'expected: <${expected[i]}>, actual: <${actual[i]}>$msg) fails');
}
}
// We check on length at the end in order to provide better error
// messages when an unexpected item is inserted in a list.
if (expected.length != actual.length) {
_fail('Expect.listEquals(list length, '
'expected: <${expected.length}>, actual: <${actual.length}>$msg) '
'fails: Next element <'
'${expected.length > n ? expected[n] : actual[n]}>');
}
}
/**
* Checks that all [expected] and [actual] have the same set of keys (using
* the semantics of [Map.containsKey] to determine what "same" means. For
* each key, checks that the values in both maps are equal using `==`.
*/
static void mapEquals(Map expected, Map actual, [String reason = null]) {
String msg = _getMessage(reason);
// Make sure all of the values are present in both and match.
for (final key in expected.keys) {
if (!actual.containsKey(key)) {
_fail('Expect.mapEquals(missing expected key: <$key>$msg) fails');
}
Expect.equals(expected[key], actual[key]);
}
// Make sure the actual map doesn't have any extra keys.
for (final key in actual.keys) {
if (!expected.containsKey(key)) {
_fail('Expect.mapEquals(unexpected key: <$key>$msg) fails');
}
}
}
/**
* Specialized equality test for strings. When the strings don't match,
* this method shows where the mismatch starts and ends.
*/
static void stringEquals(String expected,
String actual,
[String reason = null]) {
String msg = _getMessage(reason);
String defaultMessage =
'Expect.stringEquals(expected: <$expected>", <$actual>$msg) fails';
if (expected == actual) return;
if ((expected == null) || (actual == null)) {
_fail('$defaultMessage');
}
// scan from the left until we find a mismatch
int left = 0;
int eLen = expected.length;
int aLen = actual.length;
while (true) {
if (left == eLen) {
assert (left < aLen);
String snippet = actual.substring(left, aLen);
_fail('$defaultMessage\nDiff:\n...[ ]\n...[ $snippet ]');
return;
}
if (left == aLen) {
assert (left < eLen);
String snippet = expected.substring(left, eLen);
_fail('$defaultMessage\nDiff:\n...[ ]\n...[ $snippet ]');
return;
}
if (expected[left] != actual[left]) {
break;
}
left++;
}
// scan from the right until we find a mismatch
int right = 0;
while (true) {
if (right == eLen) {
assert (right < aLen);
String snippet = actual.substring(0, aLen - right);
_fail('$defaultMessage\nDiff:\n[ ]...\n[ $snippet ]...');
return;
}
if (right == aLen) {
assert (right < eLen);
String snippet = expected.substring(0, eLen - right);
_fail('$defaultMessage\nDiff:\n[ ]...\n[ $snippet ]...');
return;
}
// stop scanning if we've reached the end of the left-to-right match
if (eLen - right <= left || aLen - right <= left) {
break;
}
if (expected[eLen - right - 1] != actual[aLen - right - 1]) {
break;
}
right++;
}
String eSnippet = expected.substring(left, eLen - right);
String aSnippet = actual.substring(left, aLen - right);
String diff = '\nDiff:\n...[ $eSnippet ]...\n...[ $aSnippet ]...';
_fail('$defaultMessage$diff');
}
/**
* Checks that every element of [expected] is also in [actual], and that
* every element of [actual] is also in [expected].
*/
static void setEquals(Iterable expected,
Iterable actual,
[String reason = null]) {
final missingSet = new Set.from(expected);
missingSet.removeAll(actual);
final extraSet = new Set.from(actual);
extraSet.removeAll(expected);
if (extraSet.isEmpty && missingSet.isEmpty) return;
String msg = _getMessage(reason);
StringBuffer sb = new StringBuffer("Expect.setEquals($msg) fails");
// Report any missing items.
if (!missingSet.isEmpty) {
sb.write('\nExpected collection does not contain: ');
}
for (final val in missingSet) {
sb.write('$val ');
}
// Report any extra items.
if (!extraSet.isEmpty) {
sb.write('\nExpected collection should not contain: ');
}
for (final val in extraSet) {
sb.write('$val ');
}
_fail(sb.toString());
}
/**
* Calls the function [f] and verifies that it throws an exception.
* The optional [check] function can provide additional validation
* that the correct exception is being thrown. For example, to check
* the type of the exception you could write this:
*
* Expect.throws(myThrowingFunction, (e) => e is MyException);
*/
static void throws(void f(),
[_CheckExceptionFn check = null,
String reason = null]) {
try {
f();
} catch (e, s) {
if (check != null) {
if (!check(e)) {
String msg = reason == null ? "" : reason;
_fail("Expect.throws($msg): Unexpected '$e'\n$s");
}
}
return;
}
String msg = reason == null ? "" : reason;
_fail('Expect.throws($msg) fails');
}
static String _getMessage(String reason)
=> (reason == null) ? "" : ", '$reason'";
static void _fail(String message) {
throw new ExpectException(message);
}
}
bool _identical(a, b) => identical(a, b);
typedef bool _CheckExceptionFn(exception);
class ExpectException implements Exception {
ExpectException(this.message);
String toString() => message;
String message;
}

9
pkg/expect/pubspec.yaml Normal file
View file

@ -0,0 +1,9 @@
name: expect
author: "Dart Team <misc@dartlang.org>"
homepage: http://www.dartlang.org
description: >
Expect is used for tests that do not want to make use of the
Dart unit test library - for example, the core language tests.
Third parties are discouraged from using this, and should use
the expect() function in the unit test library instead for
test assertions.

View file

@ -3,6 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
library int32test;
import "package:expect/expect.dart";
import 'package:fixnum/fixnum.dart';
void main() {

View file

@ -3,6 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
library int64test;
import "package:expect/expect.dart";
import 'package:fixnum/fixnum.dart';
void main() {

View file

@ -6,6 +6,7 @@
library int64vmtest;
import "package:expect/expect.dart";
import 'dart:math' as math;
part 'package:fixnum/src/int32.dart';

View file

@ -4,6 +4,8 @@
library yaml_test;
// TODO(rnystrom): rewrite tests so that they don't need "Expect".
import "package:expect/expect.dart";
import 'package:unittest/unittest.dart';
import 'package:yaml/yaml.dart';
import 'package:yaml/deep_equals.dart';

View file

@ -5,6 +5,7 @@
// Library tag to be able to run in html test framework.
library byte_array_test;
import "package:expect/expect.dart";
import 'dart:typeddata';
// This test exercises optimized [] and []= operators

View file

@ -5,6 +5,7 @@
// Library tag to be able to run in html test framework.
library byte_array_test;
import "package:expect/expect.dart";
import 'dart:typeddata';
class ByteArrayTest {

View file

@ -2,6 +2,8 @@
// 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";
// This test tries to verify that we produce the correct stack trace when
// throwing exceptions even when functions are inlined.
// The test invokes a bunch of functions and then does a throw. There is a

View file

@ -9,6 +9,7 @@
library isolate_mirror_local_test;
import "package:expect/expect.dart";
import 'dart:async';
import 'dart:isolate';
import 'dart:mirrors';

View file

@ -7,6 +7,7 @@
library isolate_mirror_local_test;
import "package:expect/expect.dart";
import 'dart:isolate';
import 'dart:mirrors';

View file

@ -4,6 +4,7 @@
library isolate_unhandled_exception_test;
import "package:expect/expect.dart";
import 'dart:async';
import 'dart:isolate';

View file

@ -4,6 +4,7 @@
library isolate_unhandled_exception_uri_helper;
import "package:expect/expect.dart";
import 'dart:async';
import 'dart:isolate';

View file

@ -1,8 +1,8 @@
// 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 correct source positions in stack trace with optimized functions.
import "package:expect/expect.dart";
// (1) Test normal exception.
foo(x) => bar(x);

View file

@ -6648,6 +6648,11 @@ TEST_CASE(NativeFunctionClosure) {
" int bar43(int i, int j, int k) {\n"
" var func = foo4; return func(i, j, k); }\n"
"}\n"
"class Expect {\n"
" static void equals(x, y) {\n"
" if (x != y) throw new Error('not equal');\n"
" }\n"
"}\n"
"int testMain() {\n"
" Test obj = new Test();\n"
" Expect.equals(1, obj.foo1());\n"
@ -6786,6 +6791,11 @@ TEST_CASE(NativeStaticFunctionClosure) {
" int bar43(int i, int j, int k) {\n"
" var func = foo4; return func(i, j, k); }\n"
"}\n"
"class Expect {\n"
" static void equals(x, y) {\n"
" if (x != y) throw new Error('not equal');\n"
" }\n"
"}\n"
"int testMain() {\n"
" Test obj = new Test();\n"
" Expect.equals(0, Test.foo1());\n"

View file

@ -917,6 +917,11 @@ UNIT_TEST_CASE(FullSnapshot) {
" static const int smi_sfld = 10;\n"
" static const int bigint_sfld = 0xfffffffffff;\n"
"}\n"
"class Expect {\n"
" static void equals(x, y) {\n"
" if (x != y) throw new RuntimeError('not equal');\n"
" }\n"
"}\n"
"class FieldsTest {\n"
" static Fields testMain() {\n"
" Expect.equals(true, Fields.bigint_sfld == 0xfffffffffff);\n"

View file

@ -5,6 +5,12 @@
import 'dart:isolate';
import 'dart:async';
class Expect {
static void equals(x, y) {
if (x != y) throw new RuntimeError('not equal');
}
}
class Fields {
Fields(int i, int j) : fld1 = i, fld2 = j, fld5 = true {}
int fld1;

View file

@ -5,6 +5,7 @@
library dartdoc_search_test;
// TODO(rnystrom): Use "package:" URL (#4968).
import '../../../../../pkg/expect/lib/expect.dart';
import '../lib/src/dartdoc/nav.dart';
import '../lib/src/client/search.dart';

View file

@ -309,6 +309,7 @@ bool _identical(a, b) => identical(a, b);
typedef bool _CheckExceptionFn(exception);
/** This class is *deprecated*. */
@deprecated
class ExpectException implements Exception {
ExpectException(this.message);

View file

@ -8,6 +8,7 @@ library benchmarksmoketest;
import 'benchmark_lib.dart';
import 'dart:async';
import 'dart:html';
import '../../pkg/expect/lib/expect.dart';
import '../../pkg/unittest/lib/unittest.dart';
import '../../pkg/unittest/lib/html_config.dart';

View file

@ -2,6 +2,7 @@
// 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 'compiler_helper.dart';
const String SOURCE = """

View file

@ -4,6 +4,7 @@
library analyze_api;
import "package:expect/expect.dart";
import 'dart:uri';
import 'dart:io';
import '../../../sdk/lib/_internal/compiler/compiler.dart' as api;

View file

@ -5,6 +5,7 @@
// Smoke test of the dart2js compiler API.
library analyze_only;
import "package:expect/expect.dart";
import 'dart:async';
import 'dart:uri';

View file

@ -2,6 +2,7 @@
// 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 'compiler_helper.dart';
const String TEST_ONE = r"""

View file

@ -2,6 +2,7 @@
// 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 '../../../sdk/lib/_internal/compiler/implementation/js_backend/js_backend.dart';
import '../../../sdk/lib/_internal/compiler/implementation/ssa/ssa.dart';

View file

@ -2,6 +2,7 @@
// 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 'parser_helper.dart';
import '../../../sdk/lib/_internal/compiler/implementation/tree/tree.dart';

View file

@ -3,6 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
library boolified_operator_test;
import "package:expect/expect.dart";
import 'compiler_helper.dart';
const String TEST_EQUAL = r"""

View file

@ -3,6 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
library boolified_operator_test;
import "package:expect/expect.dart";
import 'compiler_helper.dart';
const String TEST = r"""

View file

@ -2,6 +2,7 @@
// 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 'compiler_helper.dart';
const String TEST = r"""

View file

@ -2,6 +2,7 @@
// 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 'compiler_helper.dart';
const String TEST_ONE = r"""

View file

@ -2,6 +2,7 @@
// 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 "../../../sdk/lib/_internal/compiler/implementation/js_backend/js_backend.dart";
import "../../../sdk/lib/_internal/compiler/implementation/ssa/ssa.dart";

View file

@ -2,6 +2,7 @@
// 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 '../../../sdk/lib/_internal/compiler/implementation/js_backend/js_backend.dart';
import '../../../sdk/lib/_internal/compiler/implementation/ssa/ssa.dart';

View file

@ -3,6 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
// Test that parameters keep their names in the output.
import "package:expect/expect.dart";
import 'compiler_helper.dart';
import 'parser_helper.dart';

View file

@ -3,6 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
// Test that parameters keep their names in the output.
import "package:expect/expect.dart";
import 'compiler_helper.dart';
import 'parser_helper.dart';

View file

@ -3,6 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
// Test that parameters keep their names in the output.
import "package:expect/expect.dart";
import 'compiler_helper.dart';
const String TEST_ONE = r"""

View file

@ -3,6 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
// Test that parameters keep their names in the output.
import "package:expect/expect.dart";
import 'compiler_helper.dart';
import 'parser_helper.dart';

View file

@ -2,6 +2,7 @@
// 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 'compiler_helper.dart';
const String TEST_ONE = r"""

View file

@ -5,6 +5,7 @@
library compiler_helper;
import "package:expect/expect.dart";
import 'dart:uri';
export 'dart:uri' show Uri;

View file

@ -2,6 +2,7 @@
// 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 "../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart";
import "../../../sdk/lib/_internal/compiler/implementation/elements/elements.dart";
import "../../../sdk/lib/_internal/compiler/implementation/resolution/resolution.dart";

View file

@ -2,6 +2,7 @@
// 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 'compiler_helper.dart';
import 'parser_helper.dart';

View file

@ -3,6 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
// Test constant folding on numbers.
import "package:expect/expect.dart";
import 'compiler_helper.dart';
const String NUMBER_FOLDING = """

View file

@ -2,6 +2,7 @@
// 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 '../../../sdk/lib/_internal/compiler/implementation/scanner/scannerlib.dart';
import '../../../sdk/lib/_internal/compiler/implementation/source_file.dart';
import '../../../sdk/lib/_internal/compiler/implementation/types/types.dart';

View file

@ -2,6 +2,7 @@
// 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:async';
import 'dart:uri';
import 'parser_helper.dart';

View file

@ -5,6 +5,7 @@
// This unit test of dart2js checks that a SSA bailout target
// instruction gets removed from the graph when it's not used.
import "package:expect/expect.dart";
import 'compiler_helper.dart';
String TEST = r'''

View file

@ -2,6 +2,7 @@
// 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 'compiler_helper.dart';
const String TEST_ONE = r"""

View file

@ -4,6 +4,7 @@
// Test that deprecated language features are diagnosed correctly.
import "package:expect/expect.dart";
import 'dart:async';
import 'dart:uri';

View file

@ -3,6 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
// Test that unused static consts are not emitted.
import "package:expect/expect.dart";
import 'compiler_helper.dart';
const String TEST_GUIDE = r"""

View file

@ -2,6 +2,7 @@
// 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 '../../../sdk/lib/_internal/compiler/implementation/elements/elements.dart';
import 'parser_helper.dart';

View file

@ -3,6 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
// Test that parameters keep their names in the output.
import "package:expect/expect.dart";
import 'compiler_helper.dart';
import 'parser_helper.dart';

View file

@ -2,6 +2,7 @@
// 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 '../../../sdk/lib/_internal/compiler/implementation/js_backend/js_backend.dart';
import '../../../sdk/lib/_internal/compiler/implementation/ssa/ssa.dart';
import '../../../sdk/lib/_internal/compiler/implementation/scanner/scannerlib.dart';

View file

@ -2,6 +2,7 @@
// 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 "../../../sdk/lib/_internal/compiler/implementation/elements/elements.dart";
import "mock_compiler.dart";
import "parser_helper.dart";

View file

@ -2,6 +2,7 @@
// 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 'compiler_helper.dart';
const String TEST_ONE = r"""

View file

@ -4,6 +4,7 @@
// Test that dart2js gvns dynamic getters that don't have side
// effects.
import "package:expect/expect.dart";
import 'compiler_helper.dart';
import 'parser_helper.dart';

View file

@ -2,6 +2,7 @@
// 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 'compiler_helper.dart';
const String TEST_ONE = r"""

View file

@ -2,6 +2,7 @@
// 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 'compiler_helper.dart';
const String TEST_ONE = r"""

View file

@ -2,6 +2,7 @@
// 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 'compiler_helper.dart';
const String TEST_IF_BOOL_FIRST_INSTRUCTION = r"""

View file

@ -2,6 +2,7 @@
// 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 'compiler_helper.dart';
const String TEST_IF = r"""

View file

@ -2,6 +2,7 @@
// 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 '../../../sdk/lib/_internal/compiler/implementation/util/util.dart';
import '../../../sdk/lib/_internal/compiler/implementation/util/util_implementation.dart';

View file

@ -2,6 +2,7 @@
// 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 'compiler_helper.dart';
const String TEST_ONE = r"""

View file

@ -2,6 +2,7 @@
// 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 'compiler_helper.dart';
const String TEST_ONE = r"""

View file

@ -2,6 +2,7 @@
// 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 'compiler_helper.dart';
import 'parser_helper.dart';

View file

@ -3,6 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
// Test that parameters keep their names in the output.
import "package:expect/expect.dart";
import 'compiler_helper.dart';
main() {

View file

@ -2,6 +2,7 @@
// 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 '../../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors.dart';
import '../../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors_util.dart';
import '../../../sdk/lib/_internal/compiler/implementation/mirrors/dart2js_mirror.dart';

View file

@ -4,6 +4,7 @@
library mock_compiler;
import "package:expect/expect.dart";
import 'dart:collection';
import 'dart:uri';

View file

@ -2,6 +2,7 @@
// 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 'compiler_helper.dart';
const String TEST = r"""

View file

@ -2,6 +2,7 @@
// 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 'compiler_helper.dart';
const String TEST_ONE = r"""

View file

@ -4,6 +4,7 @@
library parser_helper;
import "package:expect/expect.dart";
import "dart:uri";
import "../../../sdk/lib/_internal/compiler/implementation/elements/elements.dart";

View file

@ -2,6 +2,7 @@
// 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 'parser_helper.dart';
import '../../../sdk/lib/_internal/compiler/implementation/tree/tree.dart';

View file

@ -4,6 +4,7 @@
library part_of_test;
import "package:expect/expect.dart";
import 'dart:uri';
import 'mock_compiler.dart';
import '../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart'

View file

@ -2,6 +2,7 @@
// 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 'parser_helper.dart';
void main() {

View file

@ -2,6 +2,7 @@
// 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 "../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart";
import "../../../sdk/lib/_internal/compiler/implementation/elements/elements.dart";
import "../../../sdk/lib/_internal/compiler/implementation/tree/tree.dart";

View file

@ -3,6 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
// Test that parameters keep their names in the output.
import "package:expect/expect.dart";
import 'compiler_helper.dart';
const String FOO = r"""

View file

@ -2,6 +2,7 @@
// 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 'compiler_helper.dart';
const String TEST_ONE = r"""

View file

@ -4,6 +4,7 @@
library reexport_handled_test;
import "package:expect/expect.dart";
import 'dart:uri';
import 'mock_compiler.dart';
import '../../../sdk/lib/_internal/compiler/implementation/elements/elements.dart'

View file

@ -2,6 +2,7 @@
// 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:collection';
import "../../../sdk/lib/_internal/compiler/implementation/resolution/resolution.dart";

View file

@ -2,6 +2,7 @@
// 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 '../../../sdk/lib/_internal/compiler/implementation/ssa/ssa.dart';
import 'compiler_helper.dart';

View file

@ -2,6 +2,7 @@
// 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 '../../../sdk/lib/_internal/compiler/implementation/scanner/scannerlib.dart';
import '../../../sdk/lib/_internal/compiler/implementation/scanner/scanner_implementation.dart';

View file

@ -2,6 +2,7 @@
// 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:utf';
import '../../../sdk/lib/_internal/compiler/implementation/scanner/scannerlib.dart';
import '../../../sdk/lib/_internal/compiler/implementation/scanner/scanner_implementation.dart';

View file

@ -2,6 +2,7 @@
// 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:uri';
import "../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart";

View file

@ -4,6 +4,7 @@
// Test that static functions are closurized as expected.
import "package:expect/expect.dart";
import 'compiler_helper.dart';
main() {

View file

@ -2,6 +2,7 @@
// 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 'compiler_helper.dart';
// Test that the compiler handles string literals containing line terminators.

View file

@ -2,6 +2,7 @@
// 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 'compiler_helper.dart';
main() {

View file

@ -4,6 +4,7 @@
library strip_comment_test;
import "package:expect/expect.dart";
import '../../../sdk/lib/_internal/compiler/implementation/mirrors/mirrors_util.dart';
testComment(String strippedText, String commentText) {

View file

@ -2,6 +2,7 @@
// 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 'compiler_helper.dart';
const String TEST = r"""

View file

@ -2,6 +2,7 @@
// 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 '../../../sdk/lib/_internal/compiler/implementation/elements/elements.dart';
import '../../../sdk/lib/_internal/compiler/implementation/tree/tree.dart';
import '../../../sdk/lib/_internal/compiler/implementation/util/util.dart';

View file

@ -2,6 +2,7 @@
// 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 "compiler_helper.dart";
import "parser_helper.dart";
import "../../../sdk/lib/_internal/compiler/implementation/ssa/ssa.dart";

View file

@ -2,6 +2,7 @@
// 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 '../../../sdk/lib/_internal/compiler/implementation/dart_types.dart';
import "compiler_helper.dart";
import "parser_helper.dart";

View file

@ -2,6 +2,7 @@
// 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 'compiler_helper.dart';
const String TEST_ONE = r"""

View file

@ -2,6 +2,7 @@
// 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 'compiler_helper.dart';
const String TEST_ONE = r"""

View file

@ -2,6 +2,7 @@
// 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 'compiler_helper.dart';
const String TEST_ONE = r"""

View file

@ -2,6 +2,7 @@
// 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 'compiler_helper.dart';
const String TEST_ONE = r"""

View file

@ -2,6 +2,7 @@
// 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 'compiler_helper.dart';
const String TEST_ONE = r"""

View file

@ -4,6 +4,7 @@
library type_substitution_test;
import "package:expect/expect.dart";
import '../../../sdk/lib/_internal/compiler/implementation/dart_types.dart';
import "compiler_helper.dart";
import "parser_helper.dart";

View file

@ -2,6 +2,7 @@
// 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 "../../../sdk/lib/_internal/compiler/implementation/scanner/scannerlib.dart";
import "../../../sdk/lib/_internal/compiler/implementation/tree/tree.dart";

View file

@ -2,6 +2,7 @@
// 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:uri';
import 'parser_helper.dart';
import 'mock_compiler.dart';

View file

@ -2,6 +2,7 @@
// 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:uri';
import '../../../sdk/lib/_internal/compiler/implementation/util/uri_extras.dart';

View file

@ -2,6 +2,7 @@
// 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 "../../../sdk/lib/_internal/compiler/implementation/ssa/ssa.dart";
import "../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart";
import "../../../sdk/lib/_internal/compiler/implementation/js_backend/js_backend.dart";

View file

@ -2,6 +2,7 @@
// 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 'compiler_helper.dart';
const int REMOVED = 0;

View file

@ -2,6 +2,8 @@
// 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";
bar() => {'bar' : 21};
foo() => 'bar';

View file

@ -2,6 +2,8 @@
// 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 {
operator+(arg) => 42;
}

Some files were not shown because too many files have changed in this diff Show more