Chromium Code Reviews| Index: tests/language/super_abstract_method_test.dart |
| =================================================================== |
| --- tests/language/super_abstract_method_test.dart (revision 0) |
| +++ tests/language/super_abstract_method_test.dart (revision 0) |
| @@ -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 that a method overridden by an abstract method is called at |
| +// runtime. |
| + |
| +import "package:expect/expect.dart"; |
| + |
| +class Base { |
| + foo() => 42; |
| +} |
| + |
| +abstract class A extends Base { |
| + foo(); |
| +} |
| + |
| +class B extends A { |
| + testSuperCall() => super.foo(); |
| +} |
| + |
| +main() { |
| + Expect.equals(42 ,new B().foo()); |
|
karlklose
2013/05/28 12:23:32
Space after comma, not before.
ngeoffray
2013/05/28 12:25:32
Done.
|
| + Expect.equals(42, new B().testSuperCall()); |
| +} |