Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(428)

Unified Diff: test/_data/only_throw_error/only_throw_error.dart

Issue 2100013005: Linter `0.1.21` (Closed) Base URL: https://github.com/dart-lang/linter.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pubspec.yaml ('k') | test/_data/only_throw_errors/only_throw_errors.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
- }
-}
« no previous file with comments | « pubspec.yaml ('k') | test/_data/only_throw_errors/only_throw_errors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698