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:
floitsch@google.com 2011-10-12 19:03:34 +00:00
parent 7bc0683761
commit 60add15c21
2 changed files with 19 additions and 0 deletions

View file

@ -36,6 +36,7 @@ OverrideMethodWithFieldTest: Fail # Bug 5384453
FieldOverrideTest/none: Fail # Bug 5384222
FieldOverrideTest/01: Fail # Bug 5384222
CallThroughNullGetterTest: Fail # Bug 4968741
ConstructorDefaultTest: Fail # Bug 85
# These bugs refer currently ongoing language discussions.
ExampleConstructorTest: Fail # Bug 4995181

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