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

Assert.areSame() doesn't work with basic types anymore in 2.2.1 #150

Open
Gama11 opened this issue Mar 17, 2018 · 0 comments
Open

Assert.areSame() doesn't work with basic types anymore in 2.2.1 #150

Gama11 opened this issue Mar 17, 2018 · 0 comments
Labels

Comments

@Gama11
Copy link
Contributor

Gama11 commented Mar 17, 2018

Flixel's CI broke with the 2.2.1 release of MUnit. It seems areSame() no longer supports basic types such as Int, Float or Bool:

class AreSameTest {
	function test() {
		massive.munit.Assert.areSame(0, 0);
	}
}

Constraint check failure for areSame.T
Int should be massive.munit._Assert.RefType
Int should be haxe.extern.EitherType<{ }, haxe.Function>

This makes sense when looking at RefType, which requires the parameters to be either a structure or a function. RefType was added in #144 by @SlavaRa. This behavior is probably expected and these calls can easily just be replaced with areEqual(). However, this should probably be clarified in the method's docs? The description of the two methods is almost identical:

Assert that two values are not equal

vs

Assert that two values are one and the same

with no mention of what "values" means exactly (more specifically that not all values are allowed for areSame()).

Gama11 added a commit to HaxeFlixel/flixel that referenced this issue Mar 17, 2018
@elsassph elsassph added the Bug label Mar 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants