Skip to content
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

Unit test failures #262

Closed
Simn opened this issue May 1, 2016 · 8 comments
Closed

Unit test failures #262

Simn opened this issue May 1, 2016 · 8 comments

Comments

@Simn
Copy link

Simn commented May 1, 2016

I've just tried running the unit tests with latest Haxe and haxeparser and got some failures. I would like to understand why these happens and if they indicate regressions from either Haxe or haxeparser:

ERR: ExtensionsTest.hx:16(misc.ExtensionsTest.testExtensions) - expected 'expected '' but was 'Parsing failed: Unexpected >' but was 'expected false but was true'
ERR: TypeCheckTest.hx:16(checks.type.TypeCheckTest.testEnumAbstract) - expected '' but was 'Variable "VALUE" type not specified'
ERR: MemberNameCheckTest.hx:116(checks.naming.MemberNameCheckTest.testTokenAbstract) - expected '' but was 'Invalid member signature: "EnumConstructor3" (name should be "~/^[A-Z_]*$/")'
ERR: RedundantModifierCheckTest.hx:55(checks.modifier.RedundantModifierCheckTest.testEnumAbstract) - expected '"public" keyword is redundant for "value"' but was ''
ERR: StringLiteralCheckTest.hx:48(checks.literal.StringLiteralCheckTest.testDoubleQuoteWithException) - expected 'String "value $$is i" uses single quotes instead of double quotes' but was 'String "value $is i" uses single quotes instead of double quotes'
ERR: StringLiteralCheckTest.hx:57(checks.literal.StringLiteralCheckTest.testDoubleQuoteWithInterpolation) - expected 'String "value $$is i" uses single quotes instead of double quotes' but was ''
ERR: StringLiteralCheckTest.hx:36(checks.literal.StringLiteralCheckTest.testOnlyDoubleQuote) - expected 'String "value $$is i" uses single quotes instead of double quotes' but was 'String "value $is i" uses single quotes instead of double quotes'
ERR: StringLiteralCheckTest.hx:68(checks.literal.StringLiteralCheckTest.testDoubleQuoteWithInterpolationAndException) - expected 'String "value $$is i" uses single quotes instead of double quotes' but was ''
ERR: MultipleStringLiteralsCheckTest.hx:34(checks.literal.MultipleStringLiteralsCheckTest.testStringInterpolation) - expected 'String "value $$is i" appears 12 times in the file' but was ''
ERR: VariableInitialisationCheckTest.hx:17(checks.coding.VariableInitialisationCheckTest.testEnumAbstract) - expected '' but was 'Invalid variable "VALUE" initialisation (move initialisation to constructor or function)'
ERR: MagicNumberCheckTest.hx:41(checks.coding.MagicNumberCheckTest.testEnumAbstract) - expected '' but was '"95" is a magic number'
FAILED 287 tests, 11 failed, 276 success
Error: Command failed with error 1

I'll take a closer look tomorrow but if someone wants to take a look as well that would be appreciated.

@AlexHaxe
Copy link
Member

AlexHaxe commented May 1, 2016

I don't have a test environment with latest haxe set up, so I only took a quick look at the tests:
ExtensionsTest is built to fail once typedef extension support in haxeparser is fixed -> we need to fix our test (see #181)
The rest are either abstract or string interpolation issues, those need further investigation.

I'll see if I can setup a virtual machine to take a closer look.

@Simn
Copy link
Author

Simn commented May 2, 2016

@Gama11: Could this be related to the @:enum -> :kwdenum fix?

@Gama11
Copy link
Member

Gama11 commented May 2, 2016

That would definitely cause some failures, yes... Try replacing it with :enum here:

var kind = a.meta.hasMeta(":kwdenum") ? ENUM_ABSTRACT : ABSTRACT;

@Simn
Copy link
Author

Simn commented May 2, 2016

Yes that helps:

ERR: ExtensionsTest.hx:16(misc.ExtensionsTest.testExtensions) - expected 'expected '' but was 'Parsing failed: Unexpected >' but was 'expected false but was true'
ERR: StringLiteralCheckTest.hx:48(checks.literal.StringLiteralCheckTest.testDoubleQuoteWithException) - expected 'String "value $$is i" uses single quotes instead of double quotes' but was 'String "value $is i" uses single quotes instead of double quotes'
ERR: StringLiteralCheckTest.hx:57(checks.literal.StringLiteralCheckTest.testDoubleQuoteWithInterpolation) - expected 'String "value $$is i" uses single quotes instead of double quotes' but was ''
ERR: StringLiteralCheckTest.hx:36(checks.literal.StringLiteralCheckTest.testOnlyDoubleQuote) - expected 'String "value $$is i" uses single quotes instead of double quotes' but was 'String "value $is i" uses single quotes instead of double quotes'
ERR: StringLiteralCheckTest.hx:68(checks.literal.StringLiteralCheckTest.testDoubleQuoteWithInterpolationAndException) - expected 'String "value $$is i" uses single quotes instead of double quotes' but was ''
ERR: MultipleStringLiteralsCheckTest.hx:34(checks.literal.MultipleStringLiteralsCheckTest.testStringInterpolation) - expected 'String "value $$is i" appears 12 times in the file' but was ''

These look like some $-parsing issue in haxeparser, I'll check it out.

@Gama11
Copy link
Member

Gama11 commented May 2, 2016

For what it's worth, I get 0 test failures on latest Haxe / checkstyle, but on HaxeCheckstyle/haxeparser@6776c7b.

@Simn
Copy link
Author

Simn commented May 2, 2016

Yes I know I broke it when I implemented HaxeCheckstyle/haxeparser@5b0bf9f, I'm just not sure why yet. This stuff is pretty meta...

@Gama11
Copy link
Member

Gama11 commented Aug 21, 2016

What's the status here?

Simn pushed a commit to HaxeCheckstyle/haxeparser that referenced this issue Sep 6, 2016
This allows having a version check in haxe-checkstyle to deal with #30 (see also HaxeCheckstyle/haxe-checkstyle#262).
Gama11 added a commit that referenced this issue Sep 18, 2016
There's still some failing tests (see #262 and HaxeCheckstyle/haxeparser#36), but I think it's better to ignore those for now than to not test against latest Haxe and haxeparser at all.
@AlexHaxe
Copy link
Member

AlexHaxe commented Dec 1, 2019

probably fixed a long time ago.

@AlexHaxe AlexHaxe closed this as completed Dec 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants