mirror of
https://github.com/dart-lang/sdk
synced 2024-09-20 05:21:28 +00:00
Fix bug in bound_closure_test.
R=floitsch@google.com Review URL: https://codereview.chromium.org//119933002 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31335 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
parent
f8ad3f2a43
commit
3fe58689eb
25
tests/compiler/dart2js_native/bound_closure_super_test.dart
Normal file
25
tests/compiler/dart2js_native/bound_closure_super_test.dart
Normal file
|
@ -0,0 +1,25 @@
|
|||
// 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 calling convention of property extraction closures (super edition).
|
||||
library bound_closure_super_test;
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
|
||||
import 'bound_closure_test.dart' as bound_closure_test;
|
||||
|
||||
import 'bound_closure_test.dart' show
|
||||
inscrutable,
|
||||
makeCC;
|
||||
|
||||
main() {
|
||||
// Calling main from bound_closure_test.dart to set up native code.
|
||||
bound_closure_test.main();
|
||||
|
||||
var c = inscrutable(makeCC)();
|
||||
var csfoo = inscrutable(c).superfoo;
|
||||
|
||||
Expect.equals('BB.foo(1, B)', csfoo(1));
|
||||
Expect.equals('BB.foo(2, 3)', csfoo(2, 3));
|
||||
}
|
|
@ -46,7 +46,7 @@ main() {
|
|||
setup();
|
||||
var a = inscrutable(new AA());
|
||||
var b = inscrutable(makeBB());
|
||||
var c = inscrutable(makeCC);
|
||||
var c = inscrutable(makeCC)();
|
||||
|
||||
Expect.equals('AA.bar(1, A)', inscrutable(a).bar(1));
|
||||
Expect.equals('AA.bar(2, 3)', inscrutable(a).bar(2, 3));
|
||||
|
@ -64,7 +64,6 @@ main() {
|
|||
var afoo = inscrutable(a).foo;
|
||||
var bfoo = inscrutable(b).foo;
|
||||
var cfoo = inscrutable(c).foo;
|
||||
var csfoo = inscrutable(c).superfoo;
|
||||
|
||||
Expect.equals('AA.bar(1, A)', abar(1));
|
||||
Expect.equals('AA.bar(2, 3)', abar(2, 3));
|
||||
|
@ -77,7 +76,4 @@ main() {
|
|||
|
||||
Expect.equals('CC.foo(1, C)', cfoo(1));
|
||||
Expect.equals('CC.foo(2, 3)', cfoo(2, 3));
|
||||
|
||||
Expect.equals('BB.foo(1, B)', csfoo(1));
|
||||
Expect.equals('BB.foo(2, 3)', csfoo(2, 3));
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
[ $compiler == dart2js ]
|
||||
bound_closure_test: Fail
|
||||
bound_closure_super_test: Fail
|
||||
call_on_native_class_test: CompileTimeError # Issue 14813
|
||||
native_no_such_method_exception4_frog_test: Fail # Issue 9631
|
||||
native_no_such_method_exception5_frog_test: Fail # Issue 9631
|
||||
|
|
Loading…
Reference in a new issue