Migrate test block 147.

Change-Id: I811e8dd4c44d42e6d0ffc94635c6922a21627c46
Reviewed-on: https://dart-review.googlesource.com/12297
Commit-Queue: Florian Loitsch <floitsch@google.com>
Reviewed-by: Jakob Roland Andersen <jakobr@google.com>
This commit is contained in:
Florian Loitsch
2017-10-10 11:25:03 +00:00
committed by commit-bot@chromium.org
parent a771e05fa4
commit 5b01aaa4e5
72 changed files with 884 additions and 22 deletions
+2
View File
@@ -58,6 +58,8 @@ issue_22780_test/01: Pass, Crash # Issue 29094
issue_1751477_test: Crash # Requires deferred libraries
vm/regress_27201_test: Pass, Crash # Requires deferred libraries
vm/optimized_stacktrace_test: Pass, Slow
regress_23408_test: Crash # Requires deferred libraries
regress_22443_test: Crash # Requires deferred libraries
[ $checked && ! $strong ]
type_parameter_test/05: Pass
@@ -803,6 +803,8 @@ private_member1_negative_test: fail # Issue 14021
private_member2_negative_test: fail # Issue 14021
private_member3_negative_test: fail # Issue 14021
prefix7_negative_test: CompileTimeError
regress_27617_test/1: MissingCompileTimeError
regress_23408_test: Skip # don't care about the static warning.
[ $strong && $compiler == dart2analyzer ]
accessor_conflict_export2_test: CompileTimeError # Issue 25626
@@ -1089,6 +1091,10 @@ prefix16_test/01: MissingCompileTimeError
prefix18_negative_test: CompileTimeError, OK
prefix22_test/00: MissingCompileTimeError
prefix23_test/00: MissingCompileTimeError
regress_22936_test: MissingCompileTimeError
regress_23089_test: MissingCompileTimeError
regress_26133_test: MissingCompileTimeError
regress_27572_test: MissingCompileTimeError
string_interpolation_test/01: MissingCompileTimeError
string_no_operator_test/01: MissingCompileTimeError
string_no_operator_test/02: MissingCompileTimeError
@@ -447,6 +447,11 @@ override_inheritance_no_such_method_test/12: MissingCompileTimeError
override_inheritance_no_such_method_test/13: MissingCompileTimeError
override_method_with_field_test/02: MissingCompileTimeError
part2_test/01: MissingCompileTimeError
regress_26133_test: MissingCompileTimeError
regress_22936_test: MissingCompileTimeError
regress_23089_test: MissingCompileTimeError
regress_23408_test: RuntimeError
regress_27572_test: MissingCompileTimeError
static_field3_test/01: MissingCompileTimeError
static_field3_test/02: MissingCompileTimeError
static_field3_test/03: MissingCompileTimeError
@@ -714,6 +719,8 @@ list_literal4_test/05: MissingCompileTimeError
list_literal_syntax_test/01: MissingCompileTimeError
list_literal_syntax_test/02: MissingCompileTimeError
list_literal_syntax_test/03: MissingCompileTimeError
regress_22976_test: CompileTimeError # Issue 23132
regress_24283_test: RuntimeError # Issue 1533
external_test/10: CompileTimeError # Issue 12887
external_test/13: CompileTimeError # Issue 12887
external_test/20: CompileTimeError # Issue 12887
@@ -1189,6 +1196,18 @@ external_test/10: MissingRuntimeError
external_test/13: MissingRuntimeError
external_test/20: MissingRuntimeError
factory_redirection_test/07: MissingCompileTimeError
regress_22443_test: CompileTimeError
regress_22976_test/01: CompileTimeError
regress_22976_test/02: CompileTimeError
regress_22976_test/none: CompileTimeError
regress_23408_test: CompileTimeError
regress_23996_test: RuntimeError
regress_24283_test: RuntimeError
regress_27572_test: RuntimeError
regress_27617_test/1: Crash # Assertion failure: Unexpected constructor j:constructor(Foo._) in ConstructorDataImpl._getConstructorConstant
regress_28217_test/01: MissingCompileTimeError
regress_28217_test/none: MissingCompileTimeError
regress_28255_test: RuntimeError
[ $compiler == dart2js && $dart2js_with_kernel && $minified ]
assertion_initializer_const_error2_test/none: CompileTimeError
@@ -1493,6 +1512,16 @@ external_test/20: MissingRuntimeError
f_bounded_quantification4_test: RuntimeError
f_bounded_quantification5_test: RuntimeError
factory_redirection_test/07: MissingCompileTimeError
regress_22443_test: CompileTimeError
regress_22976_test: CompileTimeError
regress_23408_test: CompileTimeError
regress_23996_test: RuntimeError
regress_24283_test: RuntimeError, OK # Requires 64 bit numbers.
regress_27572_test: RuntimeError
regress_27617_test/1: Crash # Assertion failure: Unexpected constructor j:constructor(Foo._) in ConstructorDataImpl._getConstructorConstant
regress_28217_test/01: MissingCompileTimeError
regress_28217_test/none: MissingCompileTimeError
regress_28255_test: RuntimeError
[ $compiler == dart2js && $dart2js_with_kernel && $minified && $checked ]
inline_super_field_test: Crash
@@ -1509,6 +1538,7 @@ async_star_await_pauses_test: RuntimeError # Need triage
async_star_no_cancel2_test: RuntimeError # Need triage
async_star_no_cancel_test: RuntimeError # Need triage
await_for_test: Skip # Jsshell does not provide periodic timers, Issue 7728
regress_23996_test: RuntimeError # Jsshell does not provide non-zero timers, Issue 7728
[ $compiler == dart2js && $runtime == jsshell ]
async_star_test/01: RuntimeError
@@ -1523,6 +1553,7 @@ async_return_types_test/nestedFuture: Fail # Issue 26429
async_return_types_test/wrongTypeParameter: Fail # Issue 26429
covariant_subtyping_test: CompileTimeError
default_factory2_test/01: Fail # Issue 14121
regress_26133_test: RuntimeError # Issue 26429
[ $compiler == dart2js && !$checked && !$dart2js_with_kernel ]
bool_check_test: RuntimeError # Issue 29647
@@ -1555,6 +1586,7 @@ null_test/0*: Pass # mirrors not supported, fails for the wrong reason
null_test/none: Fail # mirrors not supported
overridden_no_such_method_test: Fail # mirrors not supported
vm/reflect_core_vm_test: Fail # mirrors not supported
regress_28255_test: Fail # mirrors not supported
[ $compiler == dart2js && $runtime == chrome && $system == macos && !$dart2js_with_kernel ]
await_future_test: Pass, Timeout # Issue 26735
@@ -1592,3 +1624,9 @@ round_test: Pass, Fail, OK # Fixed in ff 35. Common JavaScript engine Math.round
[ $compiler == dart2js && $minified && ! $dart2js_with_kernel ]
f_bounded_quantification4_test: Fail, Pass # Issue 12605
symbol_conflict_test: RuntimeError # Issue 23857
[ $compiler == dart2js && $host_checked && !$dart2js_with_kernel ]
regress_26855_test/1: Crash # Issue 26867
regress_26855_test/2: Crash # Issue 26867
regress_26855_test/3: Crash # Issue 26867
regress_26855_test/4: Crash # Issue 26867
@@ -102,6 +102,11 @@ parameter_initializer_test: CompileTimeError
parser_quirks_test: CompileTimeError
part_refers_to_core_library_test/01: Crash
export_private_test/01: MissingCompileTimeError # Issue 29920
regress_22443_test: RuntimeError
regress_24283_test: RuntimeError, OK # Requires 64 bit numbers.
regress_23408_test: CompileTimeError
regress_25568_test: RuntimeError
regress_27617_test/1: MissingCompileTimeError
[ $strong && $compiler == dartdevc ]
accessor_conflict_export2_test: CompileTimeError # Issue 25626
@@ -274,6 +274,8 @@ wrong_number_type_arguments_test/01: CompileTimeError
wrong_number_type_arguments_test/02: CompileTimeError
new_expression_type_args_test/02: CompileTimeError
no_such_method_test: CompileTimeError
regress_28255_test: CompileTimeError
regress_23408_test: CompileTimeError
private_access_test/03: CompileTimeError
private_access_test/04: CompileTimeError
list_literal_syntax_test/03: CompileTimeError
+10
View File
@@ -250,6 +250,8 @@ map_literal1_test/01: MissingCompileTimeError
type_parameter_test/05: MissingCompileTimeError
type_parameter_test/none: RuntimeError
type_variable_bounds4_test/01: RuntimeError
regress_22728_test: RuntimeError
regress_26133_test: RuntimeError
factory_redirection_test/08: Fail
factory_redirection_test/09: Fail
factory_redirection_test/10: Fail
@@ -426,6 +428,11 @@ external_test/10: MissingRuntimeError # KernelVM bug: Unbound external.
external_test/13: MissingRuntimeError # KernelVM bug: Unbound external.
external_test/20: MissingRuntimeError # KernelVM bug: Unbound external.
factory_redirection_test/07: MissingCompileTimeError # Fasta bug: Bad constructor redirection.
regress_22443_test: CompileTimeError # Fasta/KernelVM bug: Deferred loading kernel issue 28335.
regress_23408_test: CompileTimeError # Fasta/KernelVM bug: Deferred loading kernel issue 28335.
regress_27617_test/1: MissingCompileTimeError # Fasta bug: Bad constructor redirection.
regress_28217_test/01: MissingCompileTimeError # Fasta bug: Bad constructor redirection.
regress_28217_test/none: MissingCompileTimeError # Fasta bug: Bad constructor redirection.
[ $checked && ($compiler == dartk || $compiler == dartkp) ]
assign_static_type_test/02: MissingCompileTimeError
@@ -504,5 +511,8 @@ deopt_inlined_function_lazy_test: Skip
[ $compiler == dartkp || $compiler == dartk ]
async_star_test/01: Pass
[ ($compiler == dartk || $compiler == dartkp) && $checked ]
regress_22728_test: Fail # Dartk Issue 28498
[ $compiler == dartkp && $mode == debug ]
external_test/13: Crash
@@ -429,6 +429,10 @@ prefix16_test/00: MissingCompileTimeError
prefix16_test/01: MissingCompileTimeError
prefix22_test/00: MissingCompileTimeError
prefix23_test/00: MissingCompileTimeError
regress_22936_test: MissingCompileTimeError
regress_23089_test: MissingCompileTimeError
regress_27572_test: MissingCompileTimeError
regress_26133_test: MissingCompileTimeError
static_field3_test/01: MissingCompileTimeError
static_field3_test/02: MissingCompileTimeError
static_field3_test/03: MissingCompileTimeError
@@ -574,6 +578,7 @@ void_block_return_test/00: MissingCompileTimeError
void_block_return_test/00: MissingCompileTimeError
wrong_number_type_arguments_test/*: MissingCompileTimeError
library_env_test/has_mirror_support: RuntimeError, OK
regress_28255_test: SkipByDesign
export_ambiguous_main_test: Crash
f_bounded_quantification_test/01: MissingCompileTimeError
f_bounded_quantification_test/02: MissingCompileTimeError
@@ -744,6 +749,7 @@ deferred_global_test: Fail
deopt_inlined_function_lazy_test: Skip # Incompatible flag: --deoptimize-alot
implicit_closure_test: Skip # Incompatible flag: --use_slow_path
vm/regress_27201_test: Fail
regress_23408_test: RuntimeError
[ $mode == product || $compiler == app_jit || $compiler == precompiler ]
deferred_load_constants_test/02: Fail
+6
View File
@@ -415,6 +415,11 @@ prefix16_test/00: MissingCompileTimeError
prefix16_test/01: MissingCompileTimeError
prefix22_test/00: MissingCompileTimeError
prefix23_test/00: MissingCompileTimeError
regress_22936_test: MissingCompileTimeError
regress_23089_test: MissingCompileTimeError
regress_23408_test: RuntimeError
regress_27572_test: MissingCompileTimeError
regress_26133_test: MissingCompileTimeError
static_field3_test/01: MissingCompileTimeError
static_field3_test/02: MissingCompileTimeError
static_field3_test/03: MissingCompileTimeError
@@ -814,6 +819,7 @@ type_parameter_test/05: MissingCompileTimeError
[ $compiler == app_jit && $runtime == vm ]
generic_methods_reuse_type_variables_test: RuntimeError
type_parameter_test/05: MissingCompileTimeError
regress_23408_test: Crash
[ $compiler == app_jit && $runtime == vm && !$checked ]
assertion_initializer_const_error2_test/cc02: MissingCompileTimeError
@@ -19,7 +19,6 @@ main() {
} catch (e) {
caughtIt = true;
}
;
D.loadLibrary().then((_) {
foo();
Expect.isTrue(caughtIt);
@@ -16,8 +16,7 @@ foo() {
main() {
final x = null;
try {
x = // //# 01: static type warning
foo();
x = /*@compile-error=unspecified*/ foo();
} on NoSuchMethodError {}
Expect.isTrue(fooCalled);
}
@@ -11,6 +11,8 @@ class B<T> implements A<T> {}
class C<S, T> implements B<S>, A<T> {}
main() {
A<int> a0 = new C<int, String>(); //# 01: ok
A<int> a1 = new C<String, int>(); //# 02: ok
C<int, String> c1 = new C<int, String>();
C<String, int> c2 = new C<String, int>();
A<int> a0 = c1; //# 01: ok
A<int> a1 = c2; //# 02: ok
}
@@ -9,7 +9,7 @@ main() {
}
class A { // //# 01: continued
// Note the trailing ' in the next line. //# 01: continued
// Note the trailing ' in the next line. //# 01: continued
get foo => bar();' // //# 01: continued
/// 01: continued
// //# 01: continued
String bar( // //# 01: continued
@@ -2,7 +2,11 @@
// 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.
abstract class IPeer<C extends IP2PClient> {}
// Test doesn't cover http://dartbug.com/23089 anymore.
// Generic bounds now must be fully instantiated. This means that the
// cycle is not possible anymore.
abstract class IPeer<C extends IP2PClient /*@compile-error=unspecified*/ > {}
abstract class IPeerRoom<P extends IPeer, C extends IP2PClient> {}
@@ -2,6 +2,9 @@
// 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 test has been modified: it is now ok to use deferred types as long as
// they aren't instantiated.
library regress_23408_test;
import 'package:expect/expect.dart';
@@ -9,7 +12,7 @@ import 'package:expect/expect.dart';
import 'regress_23408_lib.dart' deferred as lib;
class A<T> extends C {
get t => "$T";
get t => T;
}
class C {
@@ -20,12 +23,12 @@ class C {
}
void main() {
var a = new C.l(); // Redirects to A<dynamic>
Expect.equals("dynamic", a.t);
var a = new C.l();
Expect.equals(lib.K, a.t);
Expect.throws(() => new C.c());
lib.loadLibrary().then((_) {
var b = new C.l(); // Still redirects to A<dynamic>
Expect.equals("dynamic", b.t);
var b = new C.l();
Expect.equals(lib.K, b.t);
var z = new C.c();
Expect.equals(55, z.v);
});
+77
View File
@@ -0,0 +1,77 @@
// 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 "dart:async";
import "package:async_helper/async_helper.dart";
/// This test verifies that an await for loop sends the correct
/// signals to the stream it iterates over:
/// 1) A listen event.
/// 2) A pause event when the loop body is awaiting something,
/// and more elements arrive on the stream. See issue
/// https://github.com/dart-lang/sdk/issues/23996 .
/// 3) A resume event, when the loop is again ready to iterate.
main() {
Completer listenEventReceived = new Completer();
Completer pauseEventReceived = new Completer();
Completer resumeEventReceived = new Completer();
StreamController controller = new StreamController(
onListen: () => listenEventReceived.complete(),
onPause: () => pauseEventReceived.complete(),
onResume: () => resumeEventReceived.complete());
Completer forLoopEntered = new Completer();
/// The send function puts items on the stream. It waits for a
/// listener, puts "first" on the stream, waits for the for loop
/// to start (and eventually block), puts "second" on the stream
/// multiple times, letting the event loop run, until the for loop
/// pauses the stream because it it blocked.
/// The for loop unblocks after the pause message is received, and
/// reads the stream items, sending a stream resume message when it
/// is ready for more.
/// Then the send function puts a final "third" on the stream, and
/// closes the stream.
send() async {
await listenEventReceived.future;
controller.add('first');
await forLoopEntered.future;
var timer = new Timer.periodic(new Duration(milliseconds: 10), (timer) {
controller.add('second');
});
await pauseEventReceived.future;
// pauseEventReceived.future completes when controller.stream is
// paused by the await-for loop below. What's specified is that
// await-for must pause immediately on an "await", but instead
// the implementations agree on not pausing until receiving the
// next event. For this reason, [timer] will call its callback at
// least once before we cancel it again.
timer.cancel();
await resumeEventReceived.future;
controller.add('third');
controller.close();
}
receive() async {
bool thirdReceived = false;
await for (var entry in controller.stream) {
if (entry == 'first') {
forLoopEntered.complete();
await pauseEventReceived.future;
} else if (entry == 'third') {
thirdReceived = true;
}
}
if (!thirdReceived) {
throw "Error in await-for loop: 'third' not received";
}
}
asyncTest(() async {
// We need to start both functions in parallel, and wait on them both.
var f = send();
await receive();
await f;
});
}
+18
View File
@@ -0,0 +1,18 @@
// 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() {
// Smi
var i = 1 << 30;
var j = -i;
Expect.equals(0, i >> 37);
Expect.equals(-1, j >> 37);
// Mint
i = 1 << 50;
j = -i;
Expect.equals(0, i >> 67);
Expect.equals(-1, j >> 67);
}
+17
View File
@@ -0,0 +1,17 @@
// 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";
import 'dart:math' as math;
class Random {}
typedef F(Random r);
main() {
f(Random r) {}
g(math.Random r) {}
Expect.isTrue(f is F);
Expect.isFalse(g is F);
}
+23
View File
@@ -0,0 +1,23 @@
// 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 'dart:async';
S() => new Stream.fromIterable([1]);
Future main() async {
L:
for (var s = 0; s < 10; s++) {
await for (var s1 in S()) {
await for (var s2 in S()) {
continue L;
}
}
}
// Regression check: make sure throwing an exception
// after breaking out of the innermost loop does not
// crash the VM. In other words, the expected test
// outcome is an unhandled exception.
throw "ball"; //# 01: runtime error
}
+10
View File
@@ -0,0 +1,10 @@
// 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.
main() {}
class AbstractListMember<E, M extends AbstractListMember<E, M>> {}
class RepoListMember<M extends RepoListMember<M>>
extends AbstractListMember<String, M> {}
@@ -0,0 +1,11 @@
// 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 'regress_25246_2.dart';
class ConcreteClass extends Object with MixIn {}
void main() {
new ConcreteClass().test();
}
+12
View File
@@ -0,0 +1,12 @@
// 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 'regress_25246_3.dart';
class MixIn {
var test3 = new Test3(() {});
void test() {
test3.test();
}
}
+11
View File
@@ -0,0 +1,11 @@
// 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.
class Test3 {
final fn;
Test3(this.fn);
void test() {
fn();
}
}
+14
View File
@@ -0,0 +1,14 @@
// 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.
part of regress_25389;
abstract class ComponentState<S extends ComponentState<S>> {}
abstract class AbstractListEditorState<D,
S extends AbstractListEditorState<D, S>> extends ComponentState<S> {}
class IssueListEditorState
extends AbstractListEditorState<String, IssueListEditorState>
implements ComponentState<IssueListEditorState> {}
+14
View File
@@ -0,0 +1,14 @@
// 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.
// VMOptions=--error-on-bad-type
library regress_25389;
part 'regress_25389_part.dart';
main() {
new IssueListEditorState();
}
abstract class AbstractListEditor<D, S extends AbstractListEditorState<D, S>> {}
+17
View File
@@ -0,0 +1,17 @@
// 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.
typedef int Adder(int a, int b);
class Mock {
noSuchMethod(i) => null;
}
class MockAdder extends Mock {
int call(int a, int b);
}
main() {
Adder adder = new MockAdder();
}
+24
View File
@@ -0,0 +1,24 @@
// 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.
main() {
var c1 = new BacklogListEditorState();
var c2 = new BacklogsState();
}
class BacklogListEditorState
extends AbstractListEditorState<BacklogsState, BacklogListEditorState> {}
class BacklogsState extends MutableEntityState<BacklogsState> {}
abstract class AbstractListEditorState<ES extends ComponentState<ES>,
S extends AbstractListEditorState<ES, S>> extends ComponentState<S> {}
abstract class ComponentState<S extends ComponentState<S>> {}
abstract class EntityState<ES extends EntityState<ES>>
extends ComponentState<ES> {}
abstract class MutableEntityState<S extends MutableEntityState<S>>
extends EntityState<S> implements ComponentState<S> {}
+9
View File
@@ -0,0 +1,9 @@
// 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.
library regress_25609_lib1;
import 'regress_25609_lib2.dart';
typedef Bar Foo(int y);
+7
View File
@@ -0,0 +1,7 @@
// 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.
library regress_25609_lib2;
typedef void Bar(double x);
+13
View File
@@ -0,0 +1,13 @@
// 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.
// VMOptions=--error-on-bad-type
import 'regress_25609_lib1.dart';
Foo baz() => null;
main() {
baz();
}
+8
View File
@@ -0,0 +1,8 @@
// 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 "dart:async";
typedef Future<T> SyncedExecutionFn<T>(Future<T> fn());
main() {}
+25
View File
@@ -0,0 +1,25 @@
// 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.
main() {
AddIssueSourceMember2 m = new AddIssueSourceMember2();
}
abstract class RepoListEditorState2<M extends RepoListMember2<M>,
S extends RepoListEditorState2<M, S>>
extends AbstractListEditorState2<M, S> {}
abstract class AbstractListEditorState2<
M extends AbstractListMember2<Object, M>,
S extends AbstractListEditorState2<M, S>> extends ComponentState2<S> {}
class AddIssueSourceMember2 extends RepoListMember2<AddIssueSourceMember2> {}
class RepoListMember2<M extends RepoListMember2<M>>
extends AbstractListMember2<Object, M> {}
abstract class AbstractListMember2<E, M extends AbstractListMember2<E, M>>
extends ComponentState2<M> {}
abstract class ComponentState2<S extends ComponentState2<S>> {}
+15
View File
@@ -0,0 +1,15 @@
// 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 'dart:async';
var x = 'a';
Future<int> foo() async {
return x; /*@compile-error=unspecified*/
}
main() {
foo();
}
+74
View File
@@ -0,0 +1,74 @@
// 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 'dart:async';
import "package:expect/expect.dart";
import "package:async_helper/async_helper.dart";
// Test that local variable reads and writes are sequenced correctly with
// respect to reads and writes in an awaited Future. See issue 26175.
// Reads are sequenced correctly with respect to writes in a Future.
Future test1() async {
var x = 'a';
f() async => x = 'b';
Expect.equals('abb', '${x}${await f()}${x}');
}
// Writes are sequenced correctly with respect to writes in a Future.
Future test2(ignore) async {
var x;
f() async => x = 'b';
Expect.equals('abb', '${x = 'a'}${await f()}${x}');
}
// Writes are sequenced correctly with respect to reads in a Future.
Future test3(ignore) async {
var x = 'a';
f() async => x;
Expect.equals('bbb', '${x = 'b'}${await f()}${x}');
}
// Repeat the same tests for static variables.
var cell = 'a';
asyncReadCell() async => cell;
asyncWriteCell(value) async => cell = value;
Future test4(ignore) async {
// This test assumes that it can read the initial value of cell.
Expect.equals('abb', '${cell}${await asyncWriteCell('b')}${cell}');
}
Future test5(ignore) async {
Expect.equals('abb', '${cell = 'a'}${await asyncWriteCell('b')}${cell}');
}
Future test6(ignore) async {
Expect.equals('bbb', '${cell = 'b'}${await asyncReadCell()}${cell}');
}
// Test that throwing is sequenced correctly with respect to other effects.
Future test7(ignore) async {
cell = 'a';
try {
Expect.equals(
'unreachable', '${throw 0}${await asyncWriteCell('b')}${cell}');
} catch (_) {
Expect.equals('a', cell);
}
}
main() {
asyncStart();
test1()
.then(test2)
.then(test3)
.then(test4)
.then(test5)
.then(test6)
.then(test7)
.then((_) => asyncEnd());
}
+48
View File
@@ -0,0 +1,48 @@
// 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.
class _RenderTabBar extends RenderBox
with
ContainerRenderObjectMixin<RenderBox, _TabBarParentData>,
RenderBoxContainerDefaultsMixin<RenderBox, _TabBarParentData> {}
class RenderObject {}
class RenderSector extends RenderObject {}
class RenderBox extends RenderObject {}
class ParentData {}
class BoxParentData extends ParentData {}
class SectorParentData extends ParentData {}
class ContainerParentDataMixin<ChildType extends RenderObject> {}
class ContainerRenderObjectMixin<ChildType extends RenderObject,
ParentDataType extends ContainerParentDataMixin<ChildType>> {}
class SectorChildListParentData extends SectorParentData
with ContainerParentDataMixin<RenderSector> {}
class RenderDecoratedSector extends RenderSector {}
class RenderSectorWithChildren extends RenderDecoratedSector
with ContainerRenderObjectMixin<RenderSector, SectorChildListParentData> {}
class ContainerBoxParentDataMixin<ChildType extends RenderObject>
extends BoxParentData with ContainerParentDataMixin<ChildType> {}
class RenderBoxContainerDefaultsMixin<ChildType extends RenderBox,
ParentDataType extends ContainerBoxParentDataMixin<ChildType>>
implements ContainerRenderObjectMixin<ChildType, ParentDataType> {}
class FlexParentData extends ContainerBoxParentDataMixin<RenderBox> {}
class _TabBarParentData extends ContainerBoxParentDataMixin<RenderBox> {}
main() {
new _RenderTabBar();
}
+33
View File
@@ -0,0 +1,33 @@
// 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.
// The program crashed with segfault because we when we first compile foo
// and bar we allocate all four variables (a, b, c and d) to the context.
// When we compile foo the second time (with optimizations) we allocate
// only c and d to the context. This happened because parser folds away
// "${a}" and "${b}" as constant expressions when parsing bar on its own,
// i.e. the expressions were not parsed again and thus a and b were not
// marked as captured.
// This caused a mismatch between a context that bar expects and that
// the optimized version of foo produces.
foo() {
const a = 1;
const b = 2;
var c = 3;
var d = 4;
bar() {
if ("${a}" != "1") throw "failed";
if ("${b}" != "2") throw "failed";
if ("${c}" != "3") throw "failed";
if ("${d}" != "4") throw "failed";
}
bar();
}
main() {
for (var i = 0; i < 50000; i++) foo();
}
+32
View File
@@ -0,0 +1,32 @@
// 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";
var trace = "";
main() {
var x = 0;
try {
try {
throw x++; // 1
} on int catch (e) {
trace += "$e";
trace += "-$x";
x++; // 2
try {
x++; // 3
rethrow;
} finally {
trace += "-f";
x++; // 4
}
}
} catch (e) {
trace += "-c";
trace += "-$e";
trace += "-$x";
}
Expect.equals("0-1-f-c-0-4", trace);
}
@@ -0,0 +1,14 @@
// 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.
// Regression test for issue 26543
class C {
var x;
C() : x = null ?? <int, int>{} {}
}
main() {
print(new C());
}
@@ -0,0 +1,16 @@
// 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.
// Regression test for issue 26543
class C {
var x, y;
C()
: x = null ?? <int, int>{},
y = 0 {}
}
main() {
print(new C());
}
@@ -0,0 +1,16 @@
// 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.
// Regression test for issue 26543
class C {
var x, y;
C()
: x = 0,
y = null ?? <int, int>{} {}
}
main() {
print(new C());
}
+16
View File
@@ -0,0 +1,16 @@
// 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 'dart:async';
main() async {
var myClass = new CustomClass<int>();
await myClass.processData();
}
class CustomClass<T> {
Future<T> processData() async {
return null;
}
}
+25
View File
@@ -0,0 +1,25 @@
// 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.
void f0(this.x) {} // //# 0: compile-time error
void f1(int g(this.x)) {} // //# 1: compile-time error
void f2(int g(int this.x)) {} // //# 2: compile-time error
class C {
C();
var x;
void f3(int g(this.x)) {} // //# 3: compile-time error
C.f4(int g(this.x)); // //# 4: compile-time error
}
main() {
f0(null); // //# 0: continued
f1(null); // //# 1: continued
f2(null); // //# 2: continued
C c = new C();
c.f3(null); // //# 3: continued
new C.f4(null); // //# 4: continued
}
+26
View File
@@ -0,0 +1,26 @@
// 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.
// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
import 'dart:async';
import "package:expect/expect.dart";
void check(Function f) {
Expect.isTrue(f());
}
Future doSync() async {
try {
await 123;
} finally {
var next = 5.0;
check(() => next == 5.0);
}
}
main() async {
for (int i = 0; i < 20; i++) {
await doSync();
}
}
+19
View File
@@ -0,0 +1,19 @@
// 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.
// Regression test for issue 27164.
import 'package:expect/expect.dart';
String simpleEcho(String arg) => arg;
class Echo {
final echo;
// Check that the expression simpleEcho is a compile-time constant.
const Echo() : echo = simpleEcho;
}
void main() {
Expect.equals("hello", const Echo().echo("hello"));
}
+14
View File
@@ -0,0 +1,14 @@
// 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.
// Test has been modified and doesn't test http://dartbug.com/275272 anymore.
// Static unresolved calls are not allowed anymore.
import "package:expect/expect.dart";
import 'dart:collection' as col;
main() {
col.foobar(1234567); /*@compile-error=unspecified*/
}
+15
View File
@@ -0,0 +1,15 @@
// 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.
class Foo {
final String greeting;
Foo._(this.greeting) {}
// Const constructor must not redirect to non-const constructor.
const Foo.hi() : this._('hi'); // //# 1: compile-time error
}
main() {
const h = const Foo.hi(); // //# 1: continued
}
+28
View File
@@ -0,0 +1,28 @@
// 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.
const String lineLength = '120';
foo({lineLength: lineLength}) {
print(lineLength);
}
bar({lineLength: lineLength}) async {
print(lineLength);
}
baz([lineLength = lineLength]) {
print(lineLength);
}
qux([lineLength = lineLength]) async {
print(lineLength);
}
main() {
foo();
bar();
baz();
qux();
}
+10
View File
@@ -0,0 +1,10 @@
// Copyright (c) 2017, 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.
// Regression test for issue 27700.
main() {
var x = new List(0);
var z = "$x";
}
+9
View File
@@ -0,0 +1,9 @@
// 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.
library regress_27957_lib1;
class Superclass {
int m() => 1;
}
+9
View File
@@ -0,0 +1,9 @@
// 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.
library regress_27957_lib2;
class Superclass {
int m() => 2;
}
+18
View File
@@ -0,0 +1,18 @@
// 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";
import 'regress_27957_lib1.dart' as s1;
import 'regress_27957_lib2.dart' as s2;
class Mixin {}
class C1 = s1.Superclass with Mixin;
class C2 = s2.Superclass with Mixin;
main() {
var c1 = new C1(), c2 = new C2();
Expect.equals(1, c1.m());
Expect.equals(2, c2.m());
}
+14
View File
@@ -0,0 +1,14 @@
// Copyright (c) 2017, 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 non-existing redirecting constructor and
// redirecting to a factory constructor.
class B {
B() : this.a(); // //# none: compile-time error
factory B.a() {} // //# 01: compile-time error
B.a(); // //# 02: ok
}
main() => new B();
+23
View File
@@ -0,0 +1,23 @@
// Copyright (c) 2017, 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.
// Regression test for issue 28255
import 'dart:mirrors';
import 'package:expect/expect.dart';
class Class {
noSuchMethod(i) => true;
foo() {
dynamic o = this;
Expect.isFalse(o.bar is Null);
Expect.isTrue(o.bar != null);
Expect.equals(true.runtimeType, o.bar.runtimeType);
}
}
main() {
reflectClass(Class).newInstance(const Symbol(''), []).reflectee.foo();
}
+5
View File
@@ -0,0 +1,5 @@
// Copyright (c) 2017, 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.
foo(x) => x + "Hello";
@@ -184,10 +184,6 @@ regress_20394_test: Skip
regress_21793_test: Skip
regress_21912_test: Skip
regress_22438_test: Skip
regress_22936_test: Skip
regress_23038_test: Skip
regress_23051_test: Skip
regress_23408_test: Skip
return_type_test: Skip
rewrite_implicit_this_test: Skip
setter4_test: Skip
@@ -263,14 +259,12 @@ internal_library_test/02: MissingStaticWarning # Issue 28823
main_not_a_function_test/01: MissingStaticWarning # Issue 28823
main_test/03: MissingStaticWarning # Issue 28823
no_main_test/01: MissingStaticWarning # Issue 28823
regress_23089_test: CompileTimeError # Issue 28823
reify_typevar_static_test/00: MissingCompileTimeError # Issue 28823
super_setter_test: StaticWarning # Issue 28823
try_catch4_test: StaticWarning # Issue 28823
try_catch5_test: StaticWarning # Issue 28823
[ $compiler == dartdevc ]
regress_23089_test: CompileTimeError # Issue 29920
reify_typevar_static_test/00: MissingCompileTimeError # Issue 29920
[ $compiler == dartdevc && $runtime != none ]
@@ -300,7 +294,6 @@ mint_arithmetic_test: RuntimeError # Issue 29920
nan_identical_test: RuntimeError # Issue 29920
nested_switch_label_test: RuntimeError # Issue 29920
regress_16640_test: RuntimeError # Issue 29920
regress_22443_test: RuntimeError # Issue 29920
stack_overflow_stacktrace_test: RuntimeError # Issue 29920
stack_overflow_test: RuntimeError # Issue 29920
stacktrace_test: RuntimeError # Issue 29920
@@ -28,8 +28,6 @@ main_not_a_function_test/01: DartkCrash
mixin_generic_test: RuntimeError
recursive_generic_test: RuntimeError
redirecting_factory_reflection_test: RuntimeError
regress_22443_test: RuntimeError
regress_22700_test: RuntimeError
regress_r24720_test: RuntimeError
reify_typevar_static_test/00: MissingCompileTimeError
reify_typevar_test: RuntimeError