You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
area-testCross-cutting test issues (use area- labels for specific failures; not used for package:test).type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)
tests/isolate/remote_unittest_helper.dart:12:40: Hint: Can't find 'main' in the current library.
Did you forget to add an import?
@MirrorsUsed(symbols: "main", targets: "main", override: "*")
^^^^^^
Dart file (tests/isolate/nested_spawn_test.dart) compiled to JavaScript: out.js
Also, why are you importing unittest? Is there something wrong with pkg/async_helper?
The text was updated successfully, but these errors were encountered:
You can write the qualified name of the main method.
But I suspect that you don't know what the name of that method is.
You should not use mirrors, @MirrorsUsed, and pkg/unittest to test isolates. What you're doing is piling on complexity where it doesn't belong. In addition, dart:mirrors is unstable API which also makes it an inappropriate choice for testing core platform features. The alternative is to remove the dependency on unittest. There is a simple alternative in tests/lib/mirrors.
In this case, I'm using mirrors only to get the URL of the library that contains the test that needs to be run in a different isolate.
I guess I could hardcode that in each test. It'll be more fragile, but breaking would be quickly detected, so it's probably not a problem.
The tests were already written using unittest, some of them with multiple test cases, but I guess I can rewrite them to using package:expect and package:async_helper.
area-testCross-cutting test issues (use area- labels for specific failures; not used for package:test).type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)
tests/isolate/remote_unittest_helper.dart:12:40: Hint: Can't find 'main' in the current library.
Did you forget to add an import?
@MirrorsUsed(symbols: "main", targets: "main", override: "*")
^^^^^^
Dart file (tests/isolate/nested_spawn_test.dart) compiled to JavaScript: out.js
Also, why are you importing unittest? Is there something wrong with pkg/async_helper?
The text was updated successfully, but these errors were encountered: