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.areNotEqual issue #187

Open
CrazyFlasher opened this issue Sep 28, 2020 · 2 comments
Open

Assert.areNotEqual issue #187

CrazyFlasher opened this issue Sep 28, 2020 · 2 comments

Comments

@CrazyFlasher
Copy link

CrazyFlasher commented Sep 28, 2020

Hi. After September updates one of my tests is broken:

    @Test
    public function testOfPoolObjectsAreUnique():Void
    {
        factory.mapToType(IMockPool_1, MockPool_1);
        factory.registerPool(IMockPool_1, 2, true);

        var o1:IMockPool_1 = factory.getInstance(IMockPool_1);
        var o2:IMockPool_1 = factory.getInstance(IMockPool_1);

        Assert.areNotEqual(o1, o2);
    }

Replacing

Assert.areNotEqual(o1, o2);

to

Assert.isFalse(o1 == o2);

fixed the issue

@elsassph
Copy link
Contributor

elsassph commented Sep 28, 2020

Yes I was worried that the change in semantics would cause issues.
The argument from @SlavaRa is that the correct test for reference equality should be areSame and not areEqual which follows a content equality.

@SlavaRa
Copy link
Contributor

SlavaRa commented Sep 28, 2020

Moment, I have to check

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