Migration of test block 126.

Change-Id: I8bbccbfae0194f246b8305ea4ca7bb02b5b6a9ec
Reviewed-on: https://dart-review.googlesource.com/7546
Commit-Queue: Florian Loitsch <floitsch@google.com>
Reviewed-by: Jakob Roland Andersen <jakobr@google.com>
This commit is contained in:
Florian Loitsch
2017-10-04 21:38:10 +00:00
committed by commit-bot@chromium.org
parent efeaa0eab3
commit ec69c47c12
58 changed files with 513 additions and 58 deletions
+2
View File
@@ -5,6 +5,8 @@
library library12.dart;
import 'package:expect/expect.dart';
import "library11.dart";
class Library12 {
+3
View File
@@ -190,3 +190,6 @@ type_promotion_more_specific_test/04: CompileTimeError # Issue 30906.
[ $compiler == app_jit ]
deferred_inheritance_constraints_test/redirecting_constructor: Crash
[ $compiler == none || $compiler == app_jit ]
library_env_test/has_no_mirror_support: RuntimeError, OK
@@ -159,6 +159,7 @@ if_null_assignment_static_test/42: MissingCompileTimeError
if_null_precedence_test/06: MissingCompileTimeError
if_null_precedence_test/07: MissingCompileTimeError
is_not_class2_test/*: MissingCompileTimeError
library_ambiguous_test/04: MissingCompileTimeError
method_override2_test/00: MissingCompileTimeError
method_override2_test/01: MissingCompileTimeError
method_override2_test/02: MissingCompileTimeError
@@ -699,6 +700,7 @@ vm/debug_break_enabled_vm_test: Skip
vm/debug_break_vm_test/*: Skip
vm/lazy_deopt_with_exception_test: Pass
vm/reflect_core_vm_test: CompileTimeError
library_negative_test: CompileTimeError
method_override7_test/03: Fail # Issue 11497
method_override_test: StaticWarning
override_field_test/03: Fail # Issue 29703
@@ -934,6 +936,36 @@ initializing_formal_type_test: MissingCompileTimeError
instantiate_type_variable_test/01: StaticWarning
interceptor6_test: StaticWarning
invocation_mirror_test: StaticWarning
least_upper_bound_expansive_test/01: MissingCompileTimeError
least_upper_bound_expansive_test/02: MissingCompileTimeError
least_upper_bound_expansive_test/03: MissingCompileTimeError
least_upper_bound_expansive_test/04: MissingCompileTimeError
least_upper_bound_expansive_test/05: MissingCompileTimeError
least_upper_bound_expansive_test/06: MissingCompileTimeError
least_upper_bound_expansive_test/07: MissingCompileTimeError
least_upper_bound_expansive_test/08: MissingCompileTimeError
least_upper_bound_expansive_test/09: MissingCompileTimeError
least_upper_bound_expansive_test/10: MissingCompileTimeError
least_upper_bound_expansive_test/11: MissingCompileTimeError
least_upper_bound_expansive_test/12: MissingCompileTimeError
least_upper_bound_test/03: MissingCompileTimeError
least_upper_bound_test/04: MissingCompileTimeError
least_upper_bound_test/10: MissingCompileTimeError
least_upper_bound_test/19: MissingCompileTimeError
least_upper_bound_test/20: MissingCompileTimeError
least_upper_bound_test/23: MissingCompileTimeError
least_upper_bound_test/24: MissingCompileTimeError
least_upper_bound_test/25: StaticWarning
least_upper_bound_test/26: StaticWarning
least_upper_bound_test/29: MissingCompileTimeError
least_upper_bound_test/30: MissingCompileTimeError
least_upper_bound_test/31: StaticWarning
least_upper_bound_test/32: MissingCompileTimeError
library_ambiguous_test/00: MissingCompileTimeError
library_ambiguous_test/01: MissingCompileTimeError
library_ambiguous_test/02: MissingCompileTimeError
library_ambiguous_test/03: MissingCompileTimeError
library_ambiguous_test/04: MissingCompileTimeError
multiple_interface_inheritance_test: StaticWarning # Issue 30552
named_parameters_test/01: MissingCompileTimeError
named_parameters_test/02: MissingCompileTimeError
@@ -247,6 +247,42 @@ mixin_type_parameters_errors_test/05: MissingCompileTimeError
mixin_type_parameters_mixin_extends_test: RuntimeError
mixin_type_parameters_mixin_test: RuntimeError
mixin_type_parameters_super_extends_test: RuntimeError
least_upper_bound_test/03: MissingCompileTimeError
least_upper_bound_test/04: MissingCompileTimeError
least_upper_bound_test/10: MissingCompileTimeError
least_upper_bound_test/19: MissingCompileTimeError
least_upper_bound_test/20: MissingCompileTimeError
least_upper_bound_test/23: MissingCompileTimeError
least_upper_bound_test/24: MissingCompileTimeError
least_upper_bound_test/29: MissingCompileTimeError
least_upper_bound_test/30: MissingCompileTimeError
least_upper_bound_test/32: MissingCompileTimeError
least_upper_bound_expansive_test/01: MissingCompileTimeError
least_upper_bound_expansive_test/02: MissingCompileTimeError
least_upper_bound_expansive_test/03: MissingCompileTimeError
least_upper_bound_expansive_test/04: MissingCompileTimeError
least_upper_bound_expansive_test/05: MissingCompileTimeError
least_upper_bound_expansive_test/06: MissingCompileTimeError
least_upper_bound_expansive_test/07: MissingCompileTimeError
least_upper_bound_expansive_test/08: MissingCompileTimeError
least_upper_bound_expansive_test/09: MissingCompileTimeError
least_upper_bound_expansive_test/10: MissingCompileTimeError
least_upper_bound_expansive_test/11: MissingCompileTimeError
least_upper_bound_expansive_test/12: MissingCompileTimeError
library_ambiguous_test/00: MissingCompileTimeError
library_ambiguous_test/01: MissingCompileTimeError
library_ambiguous_test/02: MissingCompileTimeError
library_ambiguous_test/03: MissingCompileTimeError
library_ambiguous_test/04: MissingCompileTimeError
# The following tests are supposed to fail.
# In testing-mode, dart2js supports all dart:X libraries (because it
# uses '--categories=all').
library_env_test/has_no_html_support: RuntimeError, OK
library_env_test/has_no_io_support: RuntimeError, OK
library_env_test/has_no_mirror_support: RuntimeError, OK
mixin_with_two_implicit_constructors_test: MissingCompileTimeError
named_constructor_test/01: MissingCompileTimeError
named_constructor_test/03: MissingCompileTimeError
@@ -584,6 +620,7 @@ multiline_newline_test/05: MissingCompileTimeError # Issue 23888
multiline_newline_test/05r: MissingCompileTimeError # Issue 23888
multiline_newline_test/none: RuntimeError # Issue 23888
number_identity2_test: RuntimeError # Issue 12596
left_shift_test: RuntimeError # Issue 1533
numbers_test: RuntimeError, OK # Issue 1533
full_stacktrace1_test: Pass, RuntimeError # Issue 12698
full_stacktrace2_test: Pass, RuntimeError # Issue 12698
@@ -1155,6 +1192,9 @@ override_inheritance_mixed_test/02: MissingCompileTimeError
override_inheritance_mixed_test/03: MissingCompileTimeError
override_inheritance_mixed_test/04: MissingCompileTimeError
override_method_with_field_test/01: MissingCompileTimeError
lazy_static8_test: RuntimeError
left_shift_test: RuntimeError
[ $compiler == dart2js && $dart2js_with_kernel && $minified ]
assertion_initializer_const_error2_test/none: CompileTimeError
@@ -1426,6 +1466,8 @@ type_parameter_test/08: Crash # Assertion failure: Runtime type information not
type_parameter_test/09: Crash # Assertion failure: Runtime type information not available for type_variable_local(A.T) in (local(A.#))in j:closure_call(A_A_closure.call).
type_parameter_test/none: Crash # Assertion failure: Runtime type information not available for type_variable_local(A.T) in (local(A.#))in j:closure_call(A_A_closure.call).
typevariable_substitution2_test/02: RuntimeError
lazy_static8_test: RuntimeError
left_shift_test: RuntimeError
override_inheritance_mixed_test/01: MissingCompileTimeError
override_inheritance_mixed_test/02: MissingCompileTimeError
override_inheritance_mixed_test/03: MissingCompileTimeError
@@ -1522,6 +1564,8 @@ instance_creation_in_function_annotation_test: Fail # mirrors not supported
invocation_mirror2_test: Fail # mirrors not supported
invocation_mirror_invoke_on2_test: Fail # mirrors not supported
invocation_mirror_invoke_on_test: Fail # mirrors not supported
library_env_test/has_mirror_support: Fail # mirrors not supported
library_env_test/has_no_mirror_support: Pass # fails for the wrong reason.
issue21079_test: Fail # mirrors not supported
many_overridden_no_such_method_test: Fail # mirrors not supported
null_test/0*: Pass # mirrors not supported, fails for the wrong reason
@@ -1563,3 +1607,7 @@ null_test/mirrors: Skip # Uses mirrors.
[ $compiler == dart2js && $runtime == chromeOnAndroid ]
override_field_test/02: Pass, Slow # TODO(kasperl): Please triage.
[ $compiler == dart2js && $browser && !$dart2js_with_kernel ]
library_env_test/has_no_io_support: Pass # Issue 27398
library_env_test/has_io_support: RuntimeError # Issue 27398
+12 -1
View File
@@ -55,6 +55,14 @@ interceptor6_test: CompileTimeError
interface_test/00: MissingCompileTimeError
internal_library_test/01: MissingCompileTimeError # Issue 29920
internal_library_test/02: Crash
least_upper_bound_expansive_test/none: RuntimeError # 30908
library_env_test/none: RuntimeError # Issue 30907
library_env_test/has_html_support: RuntimeError # Issue 30907
library_env_test/has_no_io_support: RuntimeError # Issue 30907
library_env_test/has_no_mirror_support: RuntimeError # Issue 30907
library_env_test/has_no_html_support: RuntimeError, OK
library_env_test/has_io_support: RuntimeError, OK
library_env_test/has_mirror_support: RuntimeError, OK
override_field_test/03: MissingCompileTimeError
override_inheritance_abstract_test/02: MissingCompileTimeError
override_inheritance_abstract_test/03: MissingCompileTimeError
@@ -234,8 +242,8 @@ invocation_mirror_test: RuntimeError
issue21159_test: RuntimeError # Issue 30701
issue23244_test: RuntimeError # Issue 29920
label_test: RuntimeError # Issue 30675
modulo_test: RuntimeError # Ints and doubles are unified.
many_overridden_no_such_method_test: RuntimeError # UnimplementedError: JsInstanceMirror.delegate unimplemented
modulo_test: RuntimeError # Issue 29920
named_parameter_clash_test: RuntimeError # Issue 29920
named_parameters_default_eq_test/none: RuntimeError
null_test/mirrors: RuntimeError # Uses mirrors.
@@ -244,3 +252,6 @@ numbers_test: RuntimeError # Issue 29920
overridden_no_such_method_test: RuntimeError # UnimplementedError: JsInstanceMirror.delegate unimplemented
vm/*: SkipByDesign # Tests for the VM.
yieldstar_pause_test: Skip # Times out
lazy_static3_test: RuntimeError # Issue 30852
lazy_static8_test: RuntimeError # Issue 30852
left_shift_test: RuntimeError # Ints and doubles are unified.
@@ -150,6 +150,8 @@ issue21079_test: CompileTimeError
issue21079_test: CompileTimeError
issue_25671a_test/01: CompileTimeError
issue_25671b_test/01: CompileTimeError
library_env_test/has_no_mirror_support: Pass
library_env_test/has_mirror_support: RuntimeError, Ok
many_overridden_no_such_method_test: CompileTimeError
method_override2_test/01: CompileTimeError
method_override3_test/00: CompileTimeError
@@ -19,6 +19,7 @@ generic_no_such_method_dispatcher_test: CompileTimeError
hello_dart_test: Crash # error: expected: cls.is_type_finalized()
type_variable_bounds4_test/01: MissingCompileTimeError
ct_const2_test: Pass, Crash # Flaky
library_env_test/has_no_mirror_support: RuntimeError
[ $compiler == dartk && $runtime == vm ]
assertion_initializer_const_error2_test/none: CompileTimeError
@@ -408,6 +409,8 @@ vm/debug_break_enabled_vm_test/none: CompileTimeError # KernelVM bug: Bad test u
vm/closure_memory_retention_test: Skip # KernelVM bug: Hits OOM
vm/regress_27201_test: CompileTimeError # Fasta/KernelVM bug: Deferred loading kernel issue 28335.
vm/type_vm_test: RuntimeError # Fasta bug: Bad position information in stack trace.
library_env_test/has_html_support: RuntimeError # KernelVM bug: Configurable imports.
library_env_test/has_no_io_support: RuntimeError # KernelVM bug: Configurable imports.
[ $checked && ($compiler == dartk || $compiler == dartkp) ]
assign_static_type_test/02: MissingCompileTimeError
@@ -452,9 +455,11 @@ deferred_constraints_type_annotation_test/type_annotation_generic1: CompileTimeE
deferred_constraints_type_annotation_test/type_annotation_generic4: CompileTimeError # Fasta/KernelVM bug: Deferred loading kernel issue 28335.
[ $compiler == none || $compiler == app_jit || $compiler == dartk || $runtime == dart_precompiled ]
# Non-contractive types are not supported in the vm.
cyclic_type_test/02: Fail, OK
cyclic_type_test/04: Fail, OK
cyclic_type2_test: Fail, OK
language_2/least_upper_bound_expansive_test/none: CompileTimeError
duplicate_export_negative_test: Fail # Issue 6134
example_constructor_test: Fail, OK
field_initialization_order_test: Fail, OK
@@ -238,6 +238,22 @@ invocation_mirror_invoke_on2_test: SkipByDesign
invocation_mirror_invoke_on_test: SkipByDesign
issue21079_test: SkipByDesign
issue21079_test: SkipByDesign
least_upper_bound_expansive_test/none: CompileTimeError
least_upper_bound_test/03: MissingCompileTimeError
least_upper_bound_test/04: MissingCompileTimeError
least_upper_bound_test/10: MissingCompileTimeError
least_upper_bound_test/19: MissingCompileTimeError
least_upper_bound_test/20: MissingCompileTimeError
least_upper_bound_test/23: MissingCompileTimeError
least_upper_bound_test/24: MissingCompileTimeError
least_upper_bound_test/29: MissingCompileTimeError
least_upper_bound_test/30: MissingCompileTimeError
least_upper_bound_test/32: MissingCompileTimeError
library_ambiguous_test/00: MissingCompileTimeError
library_ambiguous_test/01: MissingCompileTimeError
library_ambiguous_test/02: MissingCompileTimeError
library_ambiguous_test/03: MissingCompileTimeError
library_ambiguous_test/04: MissingCompileTimeError
many_generic_instanceof_test: RuntimeError
many_overridden_no_such_method_test: SkipByDesign
map_literal8_test: RuntimeError
@@ -527,6 +543,7 @@ vm/type_vm_test: RuntimeError, Pass # Expects line and column numbers
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
[ $compiler == precompiler && $runtime == dart_precompiled ]
assertion_initializer_const_error2_test/cc01: Crash, MissingCompileTimeError
@@ -701,6 +718,14 @@ vm/regress_24517_test: Pass, Fail # Issue 24517.
[ $mode == product || $compiler == app_jit || $compiler == precompiler ]
vm/regress_27201_test: Fail
[ ($compiler == none || $compiler == precompiler || $compiler == app_jit) && $browser ]
library_env_test/has_io_support: RuntimeError, OK
library_env_test/has_no_html_support: RuntimeError, OK
[ ($compiler == none || $compiler == precompiler || $compiler == app_jit) && ! $browser ]
library_env_test/has_html_support: RuntimeError, OK
library_env_test/has_no_io_support: RuntimeError, OK
[ $runtime == dart_precompiled && $minified ]
vm/no_such_args_error_message_vm_test: Skip
vm/no_such_method_error_message_callable_vm_test: Skip
+16
View File
@@ -227,6 +227,22 @@ interface_test/00: MissingCompileTimeError
instanceof2_test: RuntimeError
instanceof4_test/01: RuntimeError
instanceof4_test/none: RuntimeError
least_upper_bound_expansive_test/none: CompileTimeError
least_upper_bound_test/03: MissingCompileTimeError
least_upper_bound_test/04: MissingCompileTimeError
least_upper_bound_test/10: MissingCompileTimeError
least_upper_bound_test/19: MissingCompileTimeError
least_upper_bound_test/20: MissingCompileTimeError
least_upper_bound_test/23: MissingCompileTimeError
least_upper_bound_test/24: MissingCompileTimeError
least_upper_bound_test/29: MissingCompileTimeError
least_upper_bound_test/30: MissingCompileTimeError
least_upper_bound_test/32: MissingCompileTimeError
library_ambiguous_test/00: MissingCompileTimeError
library_ambiguous_test/01: MissingCompileTimeError
library_ambiguous_test/02: MissingCompileTimeError
library_ambiguous_test/03: MissingCompileTimeError
library_ambiguous_test/04: MissingCompileTimeError
many_generic_instanceof_test: RuntimeError
map_literal8_test: RuntimeError
method_override2_test/00: MissingCompileTimeError
+72
View File
@@ -0,0 +1,72 @@
// 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.
import "package:expect/expect.dart";
// Test re-entrant initializer - calls throw CyclicInitializationError.
var trace;
final foo = bar;
get bar {
trace.add('bar');
try {
return foo ?? 1;
} catch (e) {
trace.add(e is CyclicInitializationError);
}
try {
return foo ?? 2;
} catch (e) {
trace.add(e is CyclicInitializationError);
}
return 42;
}
void testTopLevel() {
trace = [];
var result = foo;
Expect.equals(42, result);
Expect.equals('bar,true,true', trace.join(','));
trace = [];
result = foo;
Expect.equals(42, result);
Expect.equals('', trace.join(','));
}
class X {
static final foo = X.bar;
static get bar {
trace.add('X.bar');
try {
return foo ?? 1;
} catch (e) {
trace.add(e is CyclicInitializationError);
}
try {
return foo ?? 2;
} catch (e) {
trace.add(e is CyclicInitializationError);
}
return 49;
}
}
void testClassStatic() {
trace = [];
var result = X.foo;
Expect.equals(49, result);
Expect.equals('X.bar,true,true', trace.join(','));
trace = [];
result = X.foo;
Expect.equals(49, result);
Expect.equals('', trace.join(','));
}
main() {
testTopLevel();
testClassStatic();
}
@@ -40,17 +40,17 @@ void testC1(bool z, C1<int> a, N<C1<String>> b) {
// Object is the most specific type in the intersection of the supertypes.
// Is least upper bound dynamic?
(z ? a : b).z; //# 01: static type warning
(z ? a : b).z; //# 01: compile-time error
// Is least upper bound N<...> ?
(z ? a : b).n; //# 02: static type warning
(z ? a : b).n; //# 02: compile-time error
// Is least upper bound C1<...> ?
(z ? a : b).c1; //# 03: static type warning
(z ? a : b).c1; //# 03: compile-time error
// Is least upper bound N<dynamic> ?
(z ? a : b).n.z; //# 04: static type warning
(z ? a : b).n.z; //# 04: compile-time error
// Is least upper bound N<N<...>> ?
(z ? a : b).n.n; //# 05: static type warning
(z ? a : b).n.n; //# 05: compile-time error
// Is least upper bound N<C1<...>> ?
(z ? a : b).n.c1; //# 06: static type warning
(z ? a : b).n.c1; //# 06: compile-time error
}
}
@@ -81,17 +81,17 @@ void testC2(bool z, C2<int> a, N<C2<String>> b) {
// Object is the most specific type in the intersection of the supertypes.
// Is least upper bound dynamic?
(z ? a : b).z; //# 07: static type warning
(z ? a : b).z; //# 07: compile-time error
// Is least upper bound N<...> ?
(z ? a : b).n; //# 08: static type warning
(z ? a : b).n; //# 08: compile-time error
// Is least upper bound C2<...> ?
(z ? a : b).c2; //# 09: static type warning
(z ? a : b).c2; //# 09: compile-time error
// Is least upper bound N<dynamic> ?
(z ? a : b).n.z; //# 10: static type warning
(z ? a : b).n.z; //# 10: compile-time error
// Is least upper bound N<N<...>> ?
(z ? a : b).n.n; //# 11: static type warning
(z ? a : b).n.n; //# 11: compile-time error
// Is least upper bound N<C2<...>> ?
(z ? a : b).n.c2; //# 12: static type warning
(z ? a : b).n.c2; //# 12: compile-time error
}
}
@@ -45,10 +45,10 @@ void main() {
void testAB(A a, B b) {
A r1 = true ? a : b; //# 01: ok
B r2 = false ? a : b; //# 02: ok
(true ? a : b).a = 0; //# 03: static type warning
(false ? a : b).b = 0; //# 04: static type warning
(true ? a : b).a = 0; //# 03: compile-time error
(false ? a : b).b = 0; //# 04: compile-time error
var c = new C();
(true ? a : c).a = 0; //# 05: ok
(true ? a as dynamic : c).a = 0; //# 05: ok
(false ? c : b).b = 0; //# 06: ok
}
@@ -56,7 +56,7 @@ void testBC(B b, C c) {
B r1 = true ? b : c; //# 07: ok
C r2 = false ? b : c; //# 08: ok
(true ? b : c).b = 0; //# 09: ok
(false ? b : c).c = 0; //# 10: static type warning
(false ? b : c).c = 0; //# 10: compile-time error
var a = null;
(true ? b : a).b = 0; //# 11: ok
(false ? a : b).c = 0; //# 12: ok
@@ -69,41 +69,27 @@ void testCD(C c, D d) {
D r2 = false ? c : d; //# 16: ok
(true ? c : d).b = 0; //# 17: ok
(false ? c : d).b = 0; //# 18: ok
(true ? c : d).c = 0; //# 19: static type warning
(false ? c : d).d = 0; //# 20: static type warning
(true ? c : d).c = 0; //# 19: compile-time error
(false ? c : d).d = 0; //# 20: compile-time error
}
void testEE(E<B> e, E<C> f) {
// The least upper bound of E<B> and E<C> is Object since the supertypes are
// {E<B>, Object} for E<B> and
// {E<C>, Object} for E<C> and
// Object is the most specific type in the intersection of the supertypes.
// The least upper bound of E<B> and E<C> is E<B>.
E<B> r1 = true ? e : f; //# 21: ok
F<C> r2 = false ? e : f; //# 22: ok
try {
A r3 = true ? e : f; //# 23: ok
B r4 = false ? e : f; //# 24: ok
} catch (e) {
// Type error in checked mode.
}
(true ? e : f).e = null; //# 25: static type warning
(false ? e : f).e = null; //# 26: static type warning
A r3 = true ? e : f; //# 23: compile-time error
B r4 = false ? e : f; //# 24: compile-time error
(true ? e : f).e = null; //# 25: ok
(false ? e : f).e = null; //# 26: ok
}
void testEF(E<B> e, F<C> f) {
// The least upper bound of E<B> and F<C> is Object since the supertypes are
// {E<B>, Object} for E<B> and
// {F<C>, E<C>, Object} for F<C> and
// Object is the most specific type in the intersection of the supertypes.
// The least upper bound of E<B> and F<C> is E<B>.
E<B> r1 = true ? e : f; //# 27: ok
F<C> r2 = false ? e : f; //# 28: ok
try {
A r3 = true ? e : f; //# 29: ok
B r4 = false ? e : f; //# 30: ok
} catch (e) {
// Type error in checked mode.
}
A r3 = true ? e : f; //# 29: compile-time error
B r4 = false ? e : f; //# 30: compile-time error
var r5;
r5 = (true ? e : f).e; //# 31: static type warning
r5 = (false ? e : f).f; //# 32: static type warning
r5 = (true ? e : f).e; //# 31: ok
r5 = (false ? e : f).f; //# 32: compile-time error
}
+18
View File
@@ -0,0 +1,18 @@
// 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 library1.dart;
var foo;
bar() => "library1.dart bar()";
baz() => "library1.dart baz()";
var bay;
typedef int bax(int a, int b);
class baw {}
+40
View File
@@ -0,0 +1,40 @@
// 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 library10.dart;
import "library11.dart" as lib11;
import "package:expect/expect.dart";
class Library10 {
Library10(this.fld);
func() {
return 2;
}
var fld;
static static_func() {
var result = 0;
var obj = new lib11.Library11(4);
result = obj.fld;
Expect.equals(4, result);
result += obj.func();
Expect.equals(7, result);
result += lib11.Library11.static_func();
Expect.equals(9, result);
result += lib11.Library11.static_fld;
Expect.equals(10, result);
Expect.equals(100, lib11.top_level11);
Expect.equals(200, lib11.top_level_func11());
return 3;
}
static var static_fld = 4;
}
const int top_level10 = 10;
top_level_func10() {
return 20;
}
+31
View File
@@ -0,0 +1,31 @@
// 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 library11.dart;
class Library11 {
Library11(this.fld);
Library11.namedConstructor(this.fld);
func() {
return 3;
}
var fld;
static static_func() {
return 2;
}
static var static_fld = 1;
}
class Library111<T> {
Library111.namedConstructor(T this.fld);
T fld;
}
const int top_level11 = 100;
top_level_func11() {
return 200;
}
+48
View File
@@ -0,0 +1,48 @@
// 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 library12.dart;
import 'package:expect/expect.dart';
import "library11.dart";
class Library12 {
Library12(this.fld);
Library12.other(fld, multiplier) {
this.fld = fld * multiplier;
}
func() {
return 2;
}
var fld;
static static_func() {
var result = 0;
var obj = new Library11(4);
result = obj.fld;
Expect.equals(4, result);
result += obj.func();
Expect.equals(7, result);
result += Library11.static_func();
Expect.equals(9, result);
result += Library11.static_fld;
Expect.equals(10, result);
Expect.equals(100, top_level11);
Expect.equals(200, top_level_func11());
return 3;
}
static var static_fld = 4;
}
abstract class Library12Interface {
Library12 addObjects(Library12 value1, Library12 value2);
}
const int top_level12 = 10;
top_level_func12() {
return 20;
}
+7
View File
@@ -0,0 +1,7 @@
// 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 Library1Lib;
part "library1_lib.dart";
+19
View File
@@ -0,0 +1,19 @@
// 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 library2.dart;
var foo;
var foo1 = 0;
bar() => "library2.dart bar()";
var baz;
bay() => "library2.dart bay()";
typedef double bax(int a, int b);
var baw;
@@ -13,11 +13,11 @@ extends baw // //# 05: compile-time error
{}
main() {
print(foo); // //# 00: runtime error
print(bar()); // //# 01: runtime error
print(baz()); // //# 02: runtime error
print(bay()); // //# 03: runtime error
print(main is bax); // //# 04: static type warning, runtime error
var x = new X(); // //# 05: continued
print(foo); //# 00: compile-time error
print(bar()); //# 01: compile-time error
print(baz()); //# 02: compile-time error
print(bay()); //# 03: compile-time error
print(main is bax); //# 04: compile-time error
var x = new X();
print("No error expected if ambiguous definitions are not used.");
}
+99
View File
@@ -0,0 +1,99 @@
// 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() {
const NOT_PRESENT = false;
Expect.isTrue(const bool.fromEnvironment("dart.library.async"));
Expect.isTrue(const bool.fromEnvironment("dart.library.collection"));
Expect.isTrue(const bool.fromEnvironment("dart.library.convert"));
Expect.isTrue(const bool.fromEnvironment("dart.library.core"));
Expect.isTrue(const bool.fromEnvironment("dart.library.typed_data"));
Expect.isTrue(const bool.fromEnvironment("dart.library.developer"));
// Internal libraries should not be exposed.
Expect.equals(
NOT_PRESENT,
const bool.fromEnvironment("dart.library._internal",
defaultValue: NOT_PRESENT));
bool hasHtmlSupport;
hasHtmlSupport = true; //# has_html_support: ok
hasHtmlSupport = false; //# has_no_html_support: ok
if (hasHtmlSupport != null) {
bool expectedResult = hasHtmlSupport ? true : NOT_PRESENT;
Expect.equals(
expectedResult,
const bool.fromEnvironment("dart.library.html",
defaultValue: NOT_PRESENT));
Expect.equals(
expectedResult,
const bool.fromEnvironment("dart.library.indexed_db",
defaultValue: NOT_PRESENT));
Expect.equals(
expectedResult,
const bool.fromEnvironment("dart.library.svg",
defaultValue: NOT_PRESENT));
Expect.equals(
expectedResult,
const bool.fromEnvironment("dart.library.web_audio",
defaultValue: NOT_PRESENT));
Expect.equals(
expectedResult,
const bool.fromEnvironment("dart.library.web_gl",
defaultValue: NOT_PRESENT));
Expect.equals(
expectedResult,
const bool.fromEnvironment("dart.library.web_sql",
defaultValue: NOT_PRESENT));
}
bool hasIoSupport;
hasIoSupport = true; //# has_io_support: ok
hasIoSupport = false; //# has_no_io_support: ok
if (hasIoSupport != null) {
// Dartium overrides 'dart.library.io' to return "false".
// We don't test for the non-existence, but just make sure that
// dart.library.io is not set to true.
Expect.equals(hasIoSupport,
const bool.fromEnvironment("dart.library.io", defaultValue: false));
}
bool hasMirrorSupport;
hasMirrorSupport = true; //# has_mirror_support: ok
hasMirrorSupport = false; //# has_no_mirror_support: ok
if (hasMirrorSupport != null) {
bool expectedResult = hasMirrorSupport ? true : NOT_PRESENT;
Expect.equals(
expectedResult,
const bool.fromEnvironment("dart.library.mirrors",
defaultValue: NOT_PRESENT));
}
Expect.equals(
NOT_PRESENT,
const bool.fromEnvironment("dart.library.XYZ",
defaultValue: NOT_PRESENT));
Expect.equals(
NOT_PRESENT,
const bool.fromEnvironment("dart.library.Collection",
defaultValue: NOT_PRESENT));
Expect.equals(
NOT_PRESENT,
const bool.fromEnvironment("dart.library.converT",
defaultValue: NOT_PRESENT));
Expect.equals(NOT_PRESENT,
const bool.fromEnvironment("dart.library.", defaultValue: NOT_PRESENT));
Expect.equals(
NOT_PRESENT,
const bool.fromEnvironment("dart.library.core ",
defaultValue: NOT_PRESENT));
}
@@ -144,11 +144,6 @@ is_object_test: Skip
isnot_malformed_type_test: Skip
issue11724_test: Skip
issue11793_test: Skip
issue13474_test: Skip
least_upper_bound_expansive_test: Skip
least_upper_bound_test: Skip
library_ambiguous_test: Skip
library_negative_test: Skip
list_double_index_in_loop2_test: Skip
list_double_index_in_loop_test: Skip
list_literal1_test: Skip
@@ -387,8 +382,6 @@ instance_creation_in_function_annotation_test: RuntimeError # Issue 29920
instanceof2_test: RuntimeError # Issue 29920
instanceof4_test/01: RuntimeError # Issue 29920
instanceof4_test/none: RuntimeError # Issue 29920
lazy_static3_test: RuntimeError # Issue 29920
left_shift_test: RuntimeError # Issue 29920
list_is_test: RuntimeError # Issue 29920
main_test/03: MissingRuntimeError # Issue 29920
mint_arithmetic_test: RuntimeError # Issue 29920
@@ -27,7 +27,6 @@ function_type_alias3_test: RuntimeError
function_type_alias4_test: RuntimeError
inferrer_closure_test: RuntimeError
initializing_formal_final_test: RuntimeError
lazy_static7_test: DartkCompileTimeError
main_not_a_function_test/01: DartkCrash
mixin_generic_test: RuntimeError
no_main_test/01: DartkCrash
-1
View File
@@ -5,7 +5,6 @@
library library12.dart;
// TODO(jmesserly): is this supposed to be here?
import 'package:expect/expect.dart';
import "library11.dart";