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:
ahe@google.com 2013-12-20 13:26:47 +00:00
parent f8ad3f2a43
commit 3fe58689eb
3 changed files with 27 additions and 5 deletions

View 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));
}

View file

@ -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));
}

View file

@ -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