mirror of
https://github.com/dart-lang/sdk
synced 2024-09-20 05:41:37 +00:00
Add missing tests from last CL.
R=ahe@google.com Review URL: https://codereview.chromium.org//22996007 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26255 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
parent
a9c76a03b3
commit
83679fb8a2
13
tests/language/no_such_constructor2_test.dart
Normal file
13
tests/language/no_such_constructor2_test.dart
Normal file
|
@ -0,0 +1,13 @@
|
|||
// 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.
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
|
||||
class A {
|
||||
A();
|
||||
}
|
||||
|
||||
main() {
|
||||
Expect.throws(() => new A(42), (e) => e is NoSuchMethodError);
|
||||
}
|
13
tests/language/no_such_constructor_test.dart
Normal file
13
tests/language/no_such_constructor_test.dart
Normal file
|
@ -0,0 +1,13 @@
|
|||
// 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.
|
||||
|
||||
import "package:expect/expect.dart";
|
||||
|
||||
class A {
|
||||
A();
|
||||
}
|
||||
|
||||
main() {
|
||||
new A(42); /// 01: static type warning, runtime error
|
||||
}
|
Loading…
Reference in a new issue