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

Side by Side Diff: editor/tools/plugins/com.google.dart.engine_test/src/com/google/dart/engine/resolver/HintCodeTest.java

Issue 913623002: Partial backport of analyzer async/await fixes to Java. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix status files Created 5 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013, the Dart project authors. 2 * Copyright (c) 2013, the Dart project authors.
3 * 3 *
4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u se this file except 4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u se this file except
5 * in compliance with the License. You may obtain a copy of the License at 5 * in compliance with the License. You may obtain a copy of the License at
6 * 6 *
7 * http://www.eclipse.org/legal/epl-v10.html 7 * http://www.eclipse.org/legal/epl-v10.html
8 * 8 *
9 * Unless required by applicable law or agreed to in writing, software distribut ed under the License 9 * Unless required by applicable law or agreed to in writing, software distribut ed under the License
10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K IND, either express 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K IND, either express
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 } 56 }
57 57
58 public void fail_isNotInt() throws Exception { 58 public void fail_isNotInt() throws Exception {
59 Source source = addSource(createSource(// 59 Source source = addSource(createSource(//
60 "var v = 1 is! int;")); 60 "var v = 1 is! int;"));
61 resolve(source); 61 resolve(source);
62 assertErrors(source, HintCode.IS_NOT_INT); 62 assertErrors(source, HintCode.IS_NOT_INT);
63 verify(source); 63 verify(source);
64 } 64 }
65 65
66 public void fail_missingReturn_async() throws Exception {
67 // TODO(paulberry): Some async/await type checking has not yet been fully ba ckported from dart.
68 // See dartbug.com/22252.
69 Source source = addSource(createSource(//
70 "import 'dart:async';",
71 "Future<int> f() async {}"));
72 resolve(source);
73 assertErrors(source, HintCode.MISSING_RETURN);
74 verify(source);
75 }
76
66 public void fail_overrideEqualsButNotHashCode() throws Exception { 77 public void fail_overrideEqualsButNotHashCode() throws Exception {
67 Source source = addSource(createSource(// 78 Source source = addSource(createSource(//
68 "class A {", 79 "class A {",
69 " bool operator ==(x) {}", 80 " bool operator ==(x) {}",
70 "}")); 81 "}"));
71 resolve(source); 82 resolve(source);
72 assertErrors(source, HintCode.OVERRIDE_EQUALS_BUT_NOT_HASH_CODE); 83 assertErrors(source, HintCode.OVERRIDE_EQUALS_BUT_NOT_HASH_CODE);
73 verify(source); 84 verify(source);
74 } 85 }
75 86
(...skipping 1299 matching lines...) Expand 10 before | Expand all | Expand 10 after
1375 " n() {", 1386 " n() {",
1376 " var a = m(), b = m();", 1387 " var a = m(), b = m();",
1377 " }", 1388 " }",
1378 "}")); 1389 "}"));
1379 resolve(source); 1390 resolve(source);
1380 assertErrors(source, HintCode.USE_OF_VOID_RESULT, HintCode.USE_OF_VOID_RESUL T); 1391 assertErrors(source, HintCode.USE_OF_VOID_RESULT, HintCode.USE_OF_VOID_RESUL T);
1381 verify(source); 1392 verify(source);
1382 } 1393 }
1383 1394
1384 } 1395 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698