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

Issue 968963002: Add some async/await tests. (Closed)

Created:
5 years, 9 months ago by Lasse Reichstein Nielsen
Modified:
5 years, 4 months ago
CC:
reviews_dartlang.org, sigurdm
Target Ref:
refs/remotes/git-svn
Visibility:
Public.

Description

Patch Set 1 #

Total comments: 15

Patch Set 2 : Add many more tests. #

Total comments: 2

Patch Set 3 : Few more tests. #

Total comments: 1

Patch Set 4 : Also test else-if #

Patch Set 5 : Test async/await/yield as variables #

Patch Set 6 : Make onError a named optional. #

Total comments: 1

Patch Set 7 : Also make test a named argument. #

Patch Set 8 : Also add async* tests. #

Patch Set 9 : Cleanup, remove "doesn't work in dart2js" comment after patch. #

Patch Set 10 : Adding more tests. #

Patch Set 11 : Add test for await in assert. #

Patch Set 12 : Tweaks, uncomment crashers and make it a multitest. #

Patch Set 13 : Update status file after bugfix. #

Patch Set 14 : Update more test expectations. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+2980 lines, -2 lines) Patch
M runtime/lib/core_patch.dart View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
A tests/language/async_await_test.dart View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2006 lines, -0 lines 0 comments Download
A tests/language/async_star_test.dart View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +960 lines, -0 lines 1 comment Download
M tests/language/language.status View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +10 lines, -1 line 0 comments Download
M tests/language/language_analyzer.status View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M tests/language/language_dart2js.status View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (4 generated)
Lasse Reichstein Nielsen
One test is currently commented out since the syntax alone makes the VM crash.
5 years, 9 months ago (2015-03-02 14:56:39 UTC) #2
hausner
DBC: the await (throw...) bug has been fixed in the VM at r44142.
5 years, 9 months ago (2015-03-02 20:21:56 UTC) #4
Søren Gjesse
LGTM https://codereview.chromium.org/968963002/diff/1/tests/language/async_await_test.dart File tests/language/async_await_test.dart (right): https://codereview.chromium.org/968963002/diff/1/tests/language/async_await_test.dart#newcode54 tests/language/async_await_test.dart:54: onError: (e, s) { expect(e, equals("err")); }); Indentation. ...
5 years, 9 months ago (2015-03-03 08:08:42 UTC) #5
Lasse Reichstein Nielsen
Goodie, await throw test reenabled. https://codereview.chromium.org/968963002/diff/1/tests/language/async_await_test.dart File tests/language/async_await_test.dart (right): https://codereview.chromium.org/968963002/diff/1/tests/language/async_await_test.dart#newcode54 tests/language/async_await_test.dart:54: onError: (e, s) { ...
5 years, 9 months ago (2015-03-03 11:22:42 UTC) #6
Søren Gjesse
https://codereview.chromium.org/968963002/diff/1/tests/language/async_await_test.dart File tests/language/async_await_test.dart (right): https://codereview.chromium.org/968963002/diff/1/tests/language/async_await_test.dart#newcode114 tests/language/async_await_test.dart:114: expect(v, equals(42)); // And not a Future with value ...
5 years, 9 months ago (2015-03-03 11:39:56 UTC) #7
Søren Gjesse
lgtm https://codereview.chromium.org/968963002/diff/20001/tests/language/async_await_test.dart File tests/language/async_await_test.dart (right): https://codereview.chromium.org/968963002/diff/20001/tests/language/async_await_test.dart#newcode1261 tests/language/async_await_test.dart:1261: }); Mybe also for 'else if'.
5 years, 9 months ago (2015-03-03 12:27:42 UTC) #8
Lasse Reichstein Nielsen
+sigurdm
5 years, 9 months ago (2015-03-03 12:30:34 UTC) #9
Lasse Reichstein Nielsen
https://codereview.chromium.org/968963002/diff/20001/tests/language/async_await_test.dart File tests/language/async_await_test.dart (right): https://codereview.chromium.org/968963002/diff/20001/tests/language/async_await_test.dart#newcode1261 tests/language/async_await_test.dart:1261: }); On 2015/03/03 12:27:41, Søren Gjesse wrote: > Mybe ...
5 years, 9 months ago (2015-03-03 12:51:03 UTC) #10
sigurdm
DBC These tests are worth gold! https://codereview.chromium.org/968963002/diff/40001/tests/language/async_await_test.dart File tests/language/async_await_test.dart (right): https://codereview.chromium.org/968963002/diff/40001/tests/language/async_await_test.dart#newcode1825 tests/language/async_await_test.dart:1825: Future then(callback(value), [Function ...
5 years, 9 months ago (2015-03-03 13:24:39 UTC) #12
sigurdm
LGTM Except some referenced getters are commented out: topArrowGetter, topArrowGetter, instanceArrowGetter https://codereview.chromium.org/968963002/diff/100001/tests/language/async_await_test.dart File tests/language/async_await_test.dart (right): ...
5 years, 9 months ago (2015-03-03 14:13:10 UTC) #13
Lasse Reichstein Nielsen
Committed patchset #13 (id:240001) manually as 44368 (presubmit successful).
5 years, 9 months ago (2015-03-10 12:56:49 UTC) #14
Lasse Reichstein Nielsen
Committed patchset #14 (id:260001) manually as 44395 (presubmit successful).
5 years, 9 months ago (2015-03-11 10:16:12 UTC) #15
ahe
5 years, 4 months ago (2015-08-18 13:55:09 UTC) #17
Message was sent while issue was closed.
https://codereview.chromium.org/968963002/diff/260001/tests/language/async_st...
File tests/language/async_star_test.dart (right):

https://codereview.chromium.org/968963002/diff/260001/tests/language/async_st...
tests/language/async_star_test.dart:7: import "package:unittest/unittest.dart";
This means that the package unittest cannot use the language feature async*
because it is tested by unittest. If unittest was to use async*, you couldn't
know if async* is broken, because it may just be broken in such a way that
unittest would pass.

Generally, when testing feature A, one should not use something that uses
feature A (or could be using feature A).

Also, you fail to test that async*  works if not invoked by the event loop. This
is because all tests in unittest are already futures themselves.

Finally, unittest may rely on other features that aren't working as you're
working on a new compiler. This is particularly unfortunate if this new compiler
is trying to improve how features like async* are handled.

Powered by Google App Engine
This is Rietveld 408576698