-
Notifications
You must be signed in to change notification settings - Fork 56
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
--coverage breaks unit tests on HaxeFlixel project #138
Comments
|
@Gama11 that seems to work. The compiler error disappears, but a new one appears:
Also, it's not clear why I don't need this when running the tests without |
Sounds like https://github.com/HaxeFlixel/flixel/blob/4.3.0/flixel/system/macros/FlxDefines.hx#L161 Maybe try adding |
@Gama11 looks like that fixed it. Thanks! Does anyone have any idea why this is required for |
|
TL;DR: Running
haxelib run munit test
works, but runninghaxelib run munit test --coverage
breaks with an odd-looking HaxeFlixel error (Class<flixel.FlxG> has no field keys
).Here's a specific version of a project I'm working on. The project is a mix of HaxeFlixel and non-HaxeFlixel code, while the tests don't touch HaxeFlixel. Thus, when I run
haxelib run munit test
, it compiles and runs all the tests; when I runhaxelib run munit test --coverage
, it fails with this error:The difference
--coverage
makes is the addition of-lib mcover -D MCOVER --macro mcover.MCover.coverage([''],['src'],[''])
, which I suspect is causing the problem.Here's a build that fails with this error.
I'm pretty sure this is not a HaxeFlixel bug, or a bug in my code, because I can compile and run the game, and compile and run the tests (without
--coverage
). It might be a bug in my config somewhere.test.hxml
:I'm currently working around this by removing
--coverage
from my test execution, which works, but isn't ideal.@Gama11 if you can confirm that this is not some sort of known issue on the HaxeFlixel side, that would be really helpful.
The text was updated successfully, but these errors were encountered: