Skip to content

Commit 8a6bdaa

Browse files
Make null_nosuchmethod test Dart2 compliant and mark failures
[email protected] Change-Id: Ifcc1bf1d774b19741b4dd999128ae62b09618f47 Reviewed-on: https://dart-review.googlesource.com/39986 Reviewed-by: Lasse R.H. Nielsen <[email protected]>
1 parent 00225de commit 8a6bdaa

File tree

2 files changed

+16
-19
lines changed

2 files changed

+16
-19
lines changed

tests/corelib_2/corelib_2.status

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ apply3_test: RuntimeError
1616
bool_from_environment2_test/03: Crash
1717
int_modulo_arith_test/modPow: RuntimeError
1818
int_modulo_arith_test/none: RuntimeError
19-
null_nosuchmethod_test/01: CompileTimeError
20-
null_nosuchmethod_test/none: CompileTimeError
19+
null_nosuchmethod_test/01: RuntimeError # Issue 32088
2120
string_from_environment3_test/03: Crash
2221

2322
[ $compiler == precompiler ]
@@ -137,6 +136,7 @@ regexp/pcre_test: Pass, Slow # Issue 21593
137136

138137
[ $compiler == dart2js && $runtime != none && !$checked && !$dart2js_with_kernel ]
139138
growable_list_test: RuntimeError # Concurrent modifications test always runs
139+
null_nosuchmethod_test: RuntimeError # Like many tests, fails if type checks are skipped.
140140
splay_tree_from_iterable_test: RuntimeError
141141
string_split_test/checkedstore: RuntimeError # Issue 30548: does not check stores into List<String>
142142

@@ -231,8 +231,6 @@ list_set_all_test: RuntimeError
231231
list_test/01: RuntimeError
232232
list_test/none: RuntimeError
233233
nan_infinity_test/01: RuntimeError
234-
null_nosuchmethod_test/01: CompileTimeError
235-
null_nosuchmethod_test/none: CompileTimeError
236234
queue_test: Crash # 'file:*/pkg/compiler/lib/src/ssa/interceptor_simplifier.dart': Failed assertion: line 391 pos 16: 'receiver.nonCheck() == user.inputs[1].nonCheck()': is not true.
237235
splay_tree_from_iterable_test: RuntimeError
238236
stacktrace_fromstring_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
@@ -268,8 +266,6 @@ list_set_all_test: RuntimeError # Issue 32010
268266
list_test/01: RuntimeError
269267
list_test/none: RuntimeError
270268
nan_infinity_test/01: RuntimeError
271-
null_nosuchmethod_test/01: CompileTimeError
272-
null_nosuchmethod_test/none: CompileTimeError
273269
queue_test: RuntimeError
274270
splay_tree_from_iterable_test: RuntimeError
275271
stacktrace_fromstring_test: Crash # Assertion failure: Runtime type information not available for type_variable_local(bindCallback.R) in (local(_RootZone.bindCallback#)) for j:closure_call(_RootZone_bindCallback_closure.call).
@@ -331,6 +327,7 @@ string_from_environment3_test/03: MissingCompileTimeError
331327

332328
[ $compiler == dartdevc && $runtime != none ]
333329
compare_to2_test: CompileTimeError # invalid test
330+
null_nosuchmethod_test/01: RuntimeError # Issue 32088
334331
symbol_operator_test: RuntimeError # Issue 29921
335332

336333
[ $compiler != dartdevc && $compiler != dartdevk && $checked && !$strong ]
@@ -341,8 +338,8 @@ string_base_vm_static_test: MissingCompileTimeError
341338
string_replace_static_test: MissingCompileTimeError
342339
string_static_test: MissingCompileTimeError
343340

344-
[ $compiler != dartdevc && $runtime != none && !$checked && !$strong ]
345-
null_nosuchmethod_test: RuntimeError # needs Dart 2 or checked mode
341+
[ $compiler == dartk && $mode == debug && $runtime == vm && $strong ]
342+
null_nosuchmethod_test: Crash # Issue 32089
346343

347344
# Enabling of dartk for sim{arm,arm64,dbc64} revelaed these test failures, which
348345
# are to be triaged. Isolate tests are skipped on purpose due to the usage of
@@ -358,23 +355,22 @@ apply_test: RuntimeError, OK
358355
iterable_fold_test/02: RuntimeError
359356
iterable_reduce_test/01: CompileTimeError # Issue 31533
360357
iterable_reduce_test/none: RuntimeError
361-
null_nosuchmethod_test/01: CompileTimeError # Issue 31402 (Invocation arguments)
362-
null_nosuchmethod_test/none: CompileTimeError # Issue 31402 (Invocation arguments)
363358
symbol_operator_test/03: RuntimeError # Issues 11669 and 31936 - throwing const constructors.
364359
symbol_reserved_word_test/06: RuntimeError # Issues 11669 and 31936 - throwing const constructors.
365360
symbol_reserved_word_test/09: RuntimeError # Issues 11669 and 31936 - throwing const constructors.
366361
symbol_reserved_word_test/12: RuntimeError # Issues 11669 and 31936 - throwing const constructors.
367362
symbol_test/none: RuntimeError # Issues 11669 and 31936 - throwing const constructors.
368363
unicode_test: RuntimeError # Issue 18061: German double S.
369364

365+
[ $compiler == dartkp && $mode == debug && $runtime == dart_precompiled && $strong ]
366+
null_nosuchmethod_test: Crash # Issue 32089
367+
370368
# ===== dartkp + dart_precompiled status lines =====
371369
[ $compiler == dartkp && $runtime == dart_precompiled && $strong ]
372370
apply_test: RuntimeError, OK
373371
iterable_fold_test/02: RuntimeError
374372
iterable_reduce_test/01: CompileTimeError # Issue 31533
375373
iterable_reduce_test/none: RuntimeError
376-
null_nosuchmethod_test/01: CompileTimeError # Issue 31402 (Invocation arguments)
377-
null_nosuchmethod_test/none: CompileTimeError # Issue 31402 (Invocation arguments)
378374
regexp/stack-overflow_test: RuntimeError
379375
symbol_operator_test/03: RuntimeError # Issues 11669 and 31936 - throwing const constructors.
380376
symbol_reserved_word_test/06: RuntimeError # Issues 11669 and 31936 - throwing const constructors.
@@ -453,7 +449,6 @@ list_concurrent_modify_test: RuntimeError # DDC uses ES6 array iterators so it d
453449
list_removeat_test: RuntimeError # Issue 29921
454450
main_test: RuntimeError # Issue 29921
455451
nan_infinity_test/01: RuntimeError # Issue 29921
456-
null_nosuchmethod_test/01: RuntimeError # DDC checks type before too many arguments, so TypeError instead of NSM
457452
regexp/alternative-length-miscalculation_test: RuntimeError # Issue 29921
458453
regexp/ascii-regexp-subject_test: RuntimeError # Issue 29921
459454
regexp/bol-with-multiline_test: RuntimeError # Issue 29921

tests/corelib_2/null_nosuchmethod_test.dart

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,23 @@ class InvocationFactory {
1212
}
1313

1414
main() {
15-
var x;
15+
dynamic x;
1616
// Non-existing method calls noSuchMethod.
1717
Expect.throwsNoSuchMethodError(() => x.foo());
1818

19+
var invocation = InvocationFactory.instance.foo;
20+
1921
// Calling noSuchMethod directly.
20-
Expect.throwsNoSuchMethodError(() => x.noSuchMethod("foo", []));
22+
Expect.throwsNoSuchMethodError(() => x.noSuchMethod(invocation, []));
2123

2224
// Closurizing noSuchMethod and calling it.
23-
var nsm = x.noSuchMethod;
25+
dynamic nsm = x.noSuchMethod;
2426
Expect.notEquals(null, nsm);
2527
Expect.throwsTypeError(() => nsm("foo"));
2628

27-
var i = InvocationFactory.instance.foo;
28-
Expect.throwsNoSuchMethodError(() => nsm(i));
29-
Expect.throwsNoSuchMethodError(() => nsm(i, [])); // wrong number of args
29+
Expect.throwsNoSuchMethodError(() => nsm(invocation));
30+
Expect.throwsNoSuchMethodError(
31+
() => nsm(invocation, [])); // wrong number of args
3032

3133
// Wrong number and type of arguments.
3234
Expect.throwsNoSuchMethodError(() => nsm("foo", [])); //# 01: ok

0 commit comments

Comments
 (0)