Skip to content

u128::max_value() test with heapless::String fails #1

@Simsys

Description

@Simsys
macro_rules! cmp {
    ($($tt:tt)*) => {
        assert_eq!(
            tfmt::uformat!(500, $($tt)*).unwrap().as_str(),
            format!($($tt)*).as_str(),
        )
    }
}

fn main() {
    cmp!("{}", u128::max_value());
}

The program runs in all tested constellations except one: AMD64, release, use of heapless::String.
The same program works if core::string::String is used for uformat.

Ok Cortex M4, dev (no features)
Ok Cortex M4 release (no features)
Ok AMD64 dev (no features)
Ok AMD64 dev (features std)
Ok AMD64 release (features std)
NOK AMD64 release (no featues) 

With all other (u8, u16, u32, u64, i8, i16, i32, i64, i128) maximum and minimum values, everything works in all constellations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions