Skip to content

Tests fail for i32 when value is -1 #2

@archseer

Description

@archseer

Hi! I'm currently working on integrating this with https://github.com/archSeer/enigma/

Tests seem to fail on debug_assert!(b.tag() == u32::from(tag), "{} == {}", b.tag(), tag);, because tag() returns 15. I added this quickcheck test to the test suite that seems to always reproduce it:

fn nanbox_i32(tag: u8, v: i32) -> TestResult {
    if tag == 0 || tag >= 8 {
        return TestResult::discard();
    }
    unsafe {
        TestResult::from_bool(NanBox::new(tag, v).tag() == tag as u32)
    }
}

I'm currently looking into this -- it seems like one of the bit shifts might be off

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions