Skip to content

Remove N from all expectAsyncN #202

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
DartBot opened this issue Jun 5, 2015 · 4 comments
Closed

Remove N from all expectAsyncN #202

DartBot opened this issue Jun 5, 2015 · 4 comments
Assignees
Labels
P3 A lower priority bug or feature request type-enhancement A request for a change that isn't a bug

Comments

@DartBot
Copy link

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/264967?v=3" align="left" width="96" height="96"hspace="10"> Issue by amouravski
Originally opened as dart-lang/sdk#9780


This is generally waiting for issue dart-lang/sdk#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.

@DartBot DartBot added type-enhancement A request for a change that isn't a bug P3 A lower priority bug or feature request Fixed labels Jun 5, 2015
@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/17034?v=3" align="left" width="48" height="48"hspace="10"> Comment by kevmoo


Added Pkg-Unittest label.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/17034?v=3" align="left" width="48" height="48"hspace="10"> Comment by kevmoo


Removed Area-UnitTest label.
Added Area-Pkg label.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/17034?v=3" align="left" width="48" height="48"hspace="10"> Comment by kevmoo


Deprecated in dart-lang/sdk@8bcc876

Leaving this issue open to track final removal.


Set owner to @kevmoo.
Added Started label.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/17034?v=3" align="left" width="48" height="48"hspace="10"> Comment by kevmoo


dart-lang/sdk@402da24


Added Fixed label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 A lower priority bug or feature request type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

2 participants