| Index: test/_data/only_throw_error/only_throw_error.dart
|
| diff --git a/test/_data/only_throw_error/only_throw_error.dart b/test/_data/only_throw_error/only_throw_error.dart
|
| deleted file mode 100644
|
| index 743bf7e35479bed4c4e57336f83277973af128e7..0000000000000000000000000000000000000000
|
| --- a/test/_data/only_throw_error/only_throw_error.dart
|
| +++ /dev/null
|
| @@ -1,73 +0,0 @@
|
| -// Copyright (c) 2016, 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 'dart:core';
|
| -
|
| -void throwString() {
|
| - throw 'hello world!'; // LINT
|
| -}
|
| -
|
| -void throwNull() {
|
| - throw null; // LINT
|
| -}
|
| -
|
| -void throwNumber() {
|
| - throw 7; // LINT
|
| -}
|
| -
|
| -void throwObject() {
|
| - throw new Object(); // LINT
|
| -}
|
| -
|
| -void throwError() {
|
| - throw new Error(); // OK
|
| -}
|
| -
|
| -void throwDynamicPrebuiltError() {
|
| - var error = new Error();
|
| - throw error; // OK
|
| -}
|
| -
|
| -void throwStaticPrebuiltError() {
|
| - Error error = new Error();
|
| - throw error; // OK
|
| -}
|
| -
|
| -void throwArgumentError() {
|
| - Error error = new ArgumentError('oh!');
|
| - throw error; // OK
|
| -}
|
| -
|
| -void throwException() {
|
| - Exception exception = new Exception('oh!');
|
| - throw exception; // OK
|
| -}
|
| -
|
| -void throwStringFromFunction() {
|
| - throw returnString(); // LINT
|
| -}
|
| -
|
| -String returnString() => 'string!';
|
| -
|
| -void throwExceptionFromFunction() {
|
| - throw returnException();
|
| -}
|
| -
|
| -Exception returnException() => new Exception('oh!');
|
| -
|
| -// TODO: Even though in the test this does not get linted, it does while
|
| -// analyzing the SDK code. Find out why.
|
| -dynamic noSuchMethod(Invocation invocation) {
|
| - throw new NoSuchMethodError(
|
| - new Object(),
|
| - invocation.memberName,
|
| - invocation.positionalArguments,
|
| - invocation.namedArguments);
|
| -}
|
| -
|
| -class E extends Object with Exception {
|
| - static throws() {
|
| - throw new E(); // OK
|
| - }
|
| -}
|
|
|