1
0
mirror of https://github.com/dart-lang/sdk synced 2024-07-03 08:19:13 +00:00

Revert "Migrate test batch 226 to Dart 2.0"

This reverts commit 77a7ca98a2.

Reason for revert: Migrated a test file that's still being used by the unmigrated tests.

Original change's description:
> Migrate test batch 226 to Dart 2.0
> 
> Specifically skipped formatting these files, since there are tests that depend
> on non-standard source formatting.
> 
> Bug:
> Change-Id: I3058984458a9c63b239ed8714828ec42d33316c5
> Reviewed-on: https://dart-review.googlesource.com/3440
> Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>

TBR=jakobr@google.com,lrn@google.com

Change-Id: If4d0b44f81cfadf290bf72b23765fa85a6580937
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/3900
Reviewed-by: Jakob Roland Andersen <jakobr@google.com>
This commit is contained in:
Jakob Roland Andersen 2017-09-07 09:34:17 +00:00
parent 77a7ca98a2
commit b4835cce26
28 changed files with 78 additions and 115 deletions

8
.gitattributes vendored
View File

@ -42,12 +42,8 @@ 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/language_strong/multiline_newline_crlf.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_strong/mirrors/method_mirror_source_line_ending_cr.dart -text
tests/lib_strong/mirrors/method_mirror_source_line_ending_crlf.dart -text
# Files to leave alone and not diff.
*.png binary

View File

@ -24,30 +24,9 @@ async/future_or_strong_test: RuntimeError
math/random_big_test: RuntimeError # Using bigint seeds for random.
mirrors/*: SkipByDesign # Mirrors not supported on web in Dart 2.0.
convert/chunked_conversion_utf88_test: Slow, Pass
mirrors/metadata_scope_test/none: RuntimeError # Issue 10905
mirrors/method_mirror_name_test: RuntimeError # Issue 6335
mirrors/method_mirror_properties_test: RuntimeError # Issue 11861
mirrors/method_mirror_source_test : RuntimeError # Issue 6490
mirrors/method_mirror_source_line_ending_test : RuntimeError # Issue 6490
mirrors/method_mirror_location_test: RuntimeError # Issue 6490
[ $compiler == dart2js ]
async/future_or_strong_test: RuntimeError
[ $compiler != dart2js ]
async/dart2js_uncaught_error_test: Skip # JS-integration only test
[ $compiler == dart2js && $fast_startup ]
mirrors/metadata_allowed_values_test/0*: Pass # expects failure, but it fails for the wrong reason
mirrors/metadata_allowed_values_test/1*: Pass # expects failure, but it fails for the wrong reason
mirrors/metadata_allowed_values_test/2*: Pass # expects failure, but it fails for the wrong reason
mirrors/metadata_allowed_values_test/3*: Pass # expects failure, but it fails for the wrong reason
mirrors/metadata_constructor_arguments_test/0*: Pass # expects failure, but it fails for the wrong reason
mirrors/metadata_nested_constructor_call_test/0*: Pass # expects failure, but it fails for the wrong reason
mirrors/metadata_scope_test/01: Pass # expects failure, but it fails for the wrong reason
[ $compiler == dart2js && $host_checked ]
mirrors/metadata_allowed_values_test/28: Crash # Issue 25911
mirrors/metadata_allowed_values_test/29: Crash # Issue 25911
mirrors/metadata_allowed_values_test/30: Crash # Issue 25911
mirrors/metadata_allowed_values_test/31: Crash # Issue 25911

View File

@ -13,10 +13,3 @@ async/futures_test: RuntimeError # Issue 29922
async/slow_consumer_test: Pass, Timeout # Issue 29922
math/random_big_test: RuntimeError # Issue 29922
typed_data/typed_data_list_test: RuntimeError # Issue 29922
mirrors/local_isolate_test: RuntimeError # Issue 29922
mirrors/metadata_constructed_constant_test: RuntimeError # Issue 29922
mirrors/metadata_test: RuntimeError # Issue 29922
mirrors/method_mirror_location_test: RuntimeError # Issue 29922
mirrors/method_mirror_returntype_test: RuntimeError # Issue 29922
mirrors/method_mirror_source_line_ending_test: RuntimeError # Issue 29922
mirrors/method_mirror_source_test: RuntimeError # Issue 29922

View File

@ -27,17 +27,6 @@ mirrors/deferred_mirrors_update_test: CompileTimeError # Deferred loading kernel
mirrors/generic_mixin_applications_test: RuntimeError
mirrors/generic_mixin_test: RuntimeError
mirrors/mirrors_test: Crash
mirrors/metadata_allowed_values_test/02: MissingCompileTimeError
mirrors/metadata_allowed_values_test/13: MissingCompileTimeError
mirrors/metadata_allowed_values_test/14: MissingCompileTimeError
mirrors/metadata_allowed_values_test/16: Skip # Flaky, crashes.
mirrors/metadata_allowed_values_test/27: Crash
mirrors/metadata_constructed_constant_test: Crash
mirrors/metadata_constructor_arguments_test/04: MissingCompileTimeError
mirrors/metadata_scope_test/none: RuntimeError
mirrors/method_mirror_location_test: RuntimeError
mirrors/method_mirror_source_line_ending_test: Crash
mirrors/method_mirror_source_test: Crash
[ $compiler == dartk && $runtime == vm ]
mirrors/class_mirror_location_test: RuntimeError
@ -53,7 +42,3 @@ mirrors/empty_test: RuntimeError
mirrors/equality_test: RuntimeError
mirrors/generic_mixin_applications_test: RuntimeError
mirrors/generic_mixin_test: RuntimeError
mirrors/metadata_constructed_constant_test: RuntimeError
mirrors/method_mirror_location_test: RuntimeError
mirrors/method_mirror_source_line_ending_test: Crash
mirrors/method_mirror_source_test: Crash

View File

@ -1 +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. // Note: This test relies on CR line endings in the source file. library line_endings.cr; oneLineCR(x) => x; multiLineCR(y) { return y + 1; } b (){ }

View File

@ -91,6 +91,12 @@ mirrors/library_imports_prefixed_test: Skip
mirrors/library_imports_shown_test: Skip
mirrors/library_metadata2_test: Skip
mirrors/load_library_test: Skip
mirrors/metadata_allowed_values_test: Skip
mirrors/metadata_constructor_arguments_test: Skip
mirrors/metadata_nested_constructor_call_test: Skip
mirrors/metadata_scope_test: Skip
mirrors/method_mirror_name_test: Skip
mirrors/method_mirror_properties_test: Skip
mirrors/mirror_in_static_init_test: Skip
mirrors/mirrors_nsm_mismatch_test: Skip
mirrors/mirrors_nsm_test: Skip
@ -245,6 +251,13 @@ mirrors/library_metadata_test: RuntimeError # Issue 29922
mirrors/library_uri_io_test: RuntimeError # Issue 29922
mirrors/library_uri_package_test: RuntimeError # Issue 29922
mirrors/local_function_is_static_test: RuntimeError # Issue 29922
mirrors/local_isolate_test: RuntimeError # Issue 29922
mirrors/metadata_constructed_constant_test: RuntimeError # Issue 29922
mirrors/metadata_test: RuntimeError # Issue 29922
mirrors/method_mirror_location_test: RuntimeError # Issue 29922
mirrors/method_mirror_returntype_test: RuntimeError # Issue 29922
mirrors/method_mirror_source_line_ending_test: RuntimeError # Issue 29922
mirrors/method_mirror_source_test: RuntimeError # Issue 29922
mirrors/mirrors_reader_test: RuntimeError # Issue 29922
mirrors/mirrors_used_typedef_declaration_test/01: RuntimeError # Issue 29922
mirrors/mirrors_used_typedef_declaration_test/none: RuntimeError # Issue 29922

View File

@ -201,6 +201,12 @@ mirrors/library_uri_io_test: DartkCompileTimeError
mirrors/library_uri_package_test: DartkCompileTimeError
mirrors/list_constructor_test/01: RuntimeError
mirrors/list_constructor_test/none: RuntimeError
mirrors/metadata_constructed_constant_test: RuntimeError
mirrors/metadata_test: RuntimeError
mirrors/method_mirror_location_test: RuntimeError
mirrors/method_mirror_returntype_test: RuntimeError
mirrors/method_mirror_source_line_ending_test: Crash
mirrors/method_mirror_source_test: Crash
mirrors/mirrors_reader_test: Crash
mirrors/mirrors_used_typedef_declaration_test/01: RuntimeError
mirrors/mirrors_used_typedef_declaration_test/none: RuntimeError

View File

@ -4,9 +4,6 @@
// Regression test for http://dartbug.com/19173
library lib;
@MirrorsUsed(targets: "lib")
import 'dart:mirrors';
class A {

View File

@ -5,7 +5,6 @@
library test.metadata_constructed_constant_test;
@MirrorsUsed(targets: "test.metadata_constructed_constant_test")
import 'dart:mirrors';
import 'package:expect/expect.dart';

View File

@ -7,7 +7,6 @@
library test.metadata_constructor_arguments;
@MirrorsUsed(targets: "test.metadata_constructor_arguments")
import 'dart:mirrors';
import 'package:expect/expect.dart';

View File

@ -7,7 +7,6 @@
library test.metadata_nested_constructor_call;
@MirrorsUsed(targets: "test.metadata_nested_constructor_call")
import 'dart:mirrors';
import 'package:expect/expect.dart';

View File

@ -4,7 +4,6 @@
library test.metadata_scope;
@MirrorsUsed(targets: "test.metadata_scope")
import 'dart:mirrors';
import 'package:expect/expect.dart';

View File

@ -4,7 +4,6 @@
library test.metadata_test;
@MirrorsUsed(targets: "test.metadata_test")
import 'dart:mirrors';
const string = 'a metadata string';

View File

@ -12,6 +12,6 @@ class ClassInOtherFile {
topLevelInOtherFile() {}
spaceIdentedInOtherFile() {}
spaceIdentedInOtherFile() {}
tabIdentedInOtherFile() {}
tabIdentedInOtherFile() {}

View File

@ -27,15 +27,14 @@ expectLocation(Mirror mirror, String uriSuffix, int line, int column) {
}
class ClassInMainFile {
ClassInMainFile();
method() {}
}
void topLevelInMainFile() {}
spaceIdentedInMainFile() {}
tabIdentedInMainFile() {}
spaceIdentedInMainFile() {}
tabIdentedInMainFile() {}
class HasImplicitConstructor {}
@ -61,12 +60,12 @@ main() {
// Another part.
expectLocation(reflectClass(ClassInOtherFile).declarations[#ClassInOtherFile],
otherSuffix, 8, 3);
otherSuffix, 9, 3);
expectLocation(
reflectClass(ClassInOtherFile).declarations[#method], otherSuffix, 10, 3);
expectLocation(reflect(topLevelInOtherFile), otherSuffix, 13, 1);
expectLocation(reflect(spaceIdentedInOtherFile), otherSuffix, 15, 3);
expectLocation(reflect(tabIdentedInOtherFile), otherSuffix, 17, 2);
reflectClass(ClassInOtherFile).declarations[#method], otherSuffix, 11, 3);
expectLocation(reflect(topLevelInOtherFile), otherSuffix, 14, 1);
expectLocation(reflect(spaceIdentedInOtherFile), otherSuffix, 16, 3);
expectLocation(reflect(tabIdentedInOtherFile), otherSuffix, 18, 2);
// Synthetic methods.
Expect.isNull(reflectClass(HasImplicitConstructor)

View File

@ -2,9 +2,6 @@
// 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 lib;
@MirrorsUsed(targets: "lib")
import "dart:mirrors";
import "package:expect/expect.dart";
@ -14,7 +11,7 @@ doNothing42() {}
main() {
// Regression test for http://www.dartbug.com/6335
var closureMirror = reflect(doNothing42) as ClosureMirror;
var closureMirror = reflect(doNothing42);
Expect.equals(
stringifySymbol(closureMirror.function.simpleName), "s(doNothing42)");
}

View File

@ -2,9 +2,6 @@
// 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 lib;
@MirrorsUsed(targets: "lib")
import "dart:mirrors";
import "package:expect/expect.dart";
@ -47,9 +44,9 @@ checkKinds(method, kinds) {
main() {
// Top level functions should be static.
var closureMirror = reflect(doNothing42) as ClosureMirror;
var closureMirror = reflect(doNothing42);
checkKinds(closureMirror.function, [true, false, false, false, false]);
var libraryMirror = reflectClass(C).owner as LibraryMirror;
var libraryMirror = reflectClass(C).owner;
checkKinds(libraryMirror.declarations[#topGetter],
[true, false, true, false, false]);
checkKinds(libraryMirror.declarations[const Symbol("topSetter=")],

View File

@ -2,9 +2,6 @@
// 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 lib;
@MirrorsUsed(targets: "lib")
import "dart:mirrors";
import "package:expect/expect.dart";

View File

@ -0,0 +1,14 @@
// 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.
// Note: This test relies on CR line endings in the source file.
library line_endings.cr;
oneLineCR(x) => x;
multiLineCR(y) {
return y + 1;
}
b() {}

View File

@ -10,6 +10,5 @@ oneLineCRLF(x) => x;
multiLineCRLF(y) {
return y + 1;
}
c
(){
}
c() {}

View File

@ -10,6 +10,5 @@ oneLineLF(x) => x;
multiLineLF(y) {
return y + 1;
}
a
(){
}
a() {}

View File

@ -23,18 +23,17 @@ foo1() {}
doSomething(e) => e;
int get x => 42;
set x(value) { }
set x(value) {}
class S {}
class C extends S {
var _x;
var _y;
C(this._x, y)
: _y = y,
super();
: _y = y,
super();
factory C.other(num z) {}
factory C.other2() {}
@ -46,65 +45,64 @@ class C extends S {
// Some comment.
void bar() { /* Not so happy bar. */ }
void bar() {/* Not so happy bar. */}
num get someX =>
181;
num get someX => 181;
set someX(v) {
// Discard this one.
}
}
main() {
// Top-level members
LibraryMirror lib = reflectClass(C).owner;
expectSource(lib.declarations[#foo1],
"foo1() {}");
expectSource(lib.declarations[#x],
"int get x => 42;");
expectSource(lib.declarations[const Symbol("x=")],
"set x(value) { }");
expectSource(lib.declarations[#foo1], "foo1() {}");
expectSource(lib.declarations[#x], "int get x => 42;");
expectSource(lib.declarations[const Symbol("x=")], "set x(value) { }");
// Class members
ClassMirror cm = reflectClass(C);
expectSource(cm.declarations[#foo],
expectSource(
cm.declarations[#foo],
"static dynamic foo() {\n"
" // Happy foo.\n"
" }");
expectSource(cm.declarations[#bar],
"void bar() { /* Not so happy bar. */ }");
expectSource(cm.declarations[#someX],
expectSource(cm.declarations[#bar], "void bar() { /* Not so happy bar. */ }");
expectSource(
cm.declarations[#someX],
"num get someX =>\n"
" 181;");
expectSource(cm.declarations[const Symbol("someX=")],
expectSource(
cm.declarations[const Symbol("someX=")],
"set someX(v) {\n"
" // Discard this one.\n"
" }");
expectSource(cm.declarations[#C],
expectSource(
cm.declarations[#C],
"C(this._x, y)\n"
" : _y = y,\n"
" super();");
expectSource(cm.declarations[#C.other],
"factory C.other(num z) {}");
expectSource(cm.declarations[#C.other3],
"factory C.other3() = C.other2;");
expectSource(cm.declarations[#C.other], "factory C.other(num z) {}");
expectSource(cm.declarations[#C.other3], "factory C.other3() = C.other2;");
// Closures
expectSource(reflect((){}), "(){}");
expectSource(reflect((x,y,z) { return x*y*z; }), "(x,y,z) { return x*y*z; }");
expectSource(reflect(() {}), "(){}");
expectSource(reflect((x, y, z) {
return x * y * z;
}), "(x,y,z) { return x*y*z; }");
expectSource(reflect((e) => doSomething(e)), "(e) => doSomething(e)");
namedClosure(x,y,z) => 1;
namedClosure(x, y, z) => 1;
var a = () {};
expectSource(reflect(namedClosure), "namedClosure(x,y,z) => 1;");
expectSource(reflect(a), "() {}");
// Function at first line.
LibraryMirror otherLib = reflectClass(SomethingInOther).owner;
expectSource(otherLib.declarations[#main],
"""main() {
expectSource(
otherLib.declarations[#main],
"""main() {
print("Blah");
}""");
}