Remove N from all expectAsyncN #9780
Labels
area-pkg
Used for miscellaneous pkg/ packages not associated with specific area- teams.
P3
A lower priority bug or feature request
type-enhancement
A request for a change that isn't a bug
This issue was originally filed by amouravski@google.com
This is generally waiting for issue #2706 , but here's a potential solution.
typedef dynamic async0();
typedef dynamic async1(dynamic a);
typedef dynamic async2(dynamic a, dynamic b);
...
Function expectAsync(Function callback, ...) {
if (callback is async0) {
return expectAsync0(callback, ...);
} else if (callback is async1) {
return expectAsync1(callback, ...);
} else if ( ... ) {
...
} else {
throw "Too many arguments."
}
}
Probably not worth changing this right now, but maybe in unittest v2.
The text was updated successfully, but these errors were encountered: