Skip to content
This repository has been archived by the owner on Aug 16, 2021. It is now read-only.

Roundtripping uint to Target does not return same value #1803

Closed
rowandh opened this issue Aug 1, 2018 · 4 comments
Closed

Roundtripping uint to Target does not return same value #1803

rowandh opened this issue Aug 1, 2018 · 4 comments
Labels

Comments

@rowandh
Copy link
Collaborator

rowandh commented Aug 1, 2018

This test fails:

    [Fact]
    public void Target_Should_Roundtrip_Implicit_Uint()
    {
        var orig = 0U;
        var target = (Target)orig;
        var roundtripped = (uint)target;

        Assert.Equal(orig, roundtripped);
    }
@dangershony
Copy link
Contributor

Any more info on this?

Perhaps @NicolasDorier may find it interesting.

@NicolasDorier
Copy link
Contributor

NicolasDorier commented Aug 28, 2018

it seems indeed a bug, looking to it.

@NicolasDorier
Copy link
Contributor

Fixed it, I think it should happen only for 0. I should add better tests about it though.

@dangershony
Copy link
Contributor

Thanks @NicolasDorier
@rowandh on your free time can you move the fix over to our repo?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants