mirror of
https://github.com/dart-lang/sdk
synced 2024-09-18 20:01:19 +00:00
Add test that checks that the default constructor is called.
Review URL: http://codereview.chromium.org//8208011 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@373 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
parent
7bc0683761
commit
60add15c21
|
@ -36,6 +36,7 @@ OverrideMethodWithFieldTest: Fail # Bug 5384453
|
||||||
FieldOverrideTest/none: Fail # Bug 5384222
|
FieldOverrideTest/none: Fail # Bug 5384222
|
||||||
FieldOverrideTest/01: Fail # Bug 5384222
|
FieldOverrideTest/01: Fail # Bug 5384222
|
||||||
CallThroughNullGetterTest: Fail # Bug 4968741
|
CallThroughNullGetterTest: Fail # Bug 4968741
|
||||||
|
ConstructorDefaultTest: Fail # Bug 85
|
||||||
|
|
||||||
# These bugs refer currently ongoing language discussions.
|
# These bugs refer currently ongoing language discussions.
|
||||||
ExampleConstructorTest: Fail # Bug 4995181
|
ExampleConstructorTest: Fail # Bug 4995181
|
||||||
|
|
18
tests/language/src/ConstructorDefaultTest.dart
Normal file
18
tests/language/src/ConstructorDefaultTest.dart
Normal 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.
|
||||||
|
// Dart test program for default constructors.
|
||||||
|
|
||||||
|
class A {
|
||||||
|
A() : a = 499;
|
||||||
|
|
||||||
|
var a;
|
||||||
|
}
|
||||||
|
|
||||||
|
class B extends A {
|
||||||
|
B() { Expect.equals(499, a); }
|
||||||
|
}
|
||||||
|
|
||||||
|
main() {
|
||||||
|
new B();
|
||||||
|
}
|
Loading…
Reference in a new issue