Sha256: 2f48d3a25db1cf66fe98c9959abc70875deb9f7b38b2c278dc70c46e0d4ec277

Contents?: true

Size: 901 Bytes

Versions: 8

Compression:

Stored size: 901 Bytes

Contents

use super::*;

use crate::Flags;

#[test]
fn cases() {
    let flags = TestFlags::FLAGS
        .iter()
        .map(|flag| (flag.name(), flag.value().bits()))
        .collect::<Vec<_>>();

    assert_eq!(
        vec![
            ("A", 1u8),
            ("B", 1 << 1),
            ("C", 1 << 2),
            ("ABC", 1 | 1 << 1 | 1 << 2),
        ],
        flags,
    );

    assert_eq!(0, TestEmpty::FLAGS.iter().count());
}

mod external {
    use super::*;

    #[test]
    fn cases() {
        let flags = TestExternal::FLAGS
            .iter()
            .map(|flag| (flag.name(), flag.value().bits()))
            .collect::<Vec<_>>();

        assert_eq!(
            vec![
                ("A", 1u8),
                ("B", 1 << 1),
                ("C", 1 << 2),
                ("ABC", 1 | 1 << 1 | 1 << 2),
                ("", !0),
            ],
            flags,
        );
    }
}

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
wasmtime-29.0.0 ./ext/cargo-vendor/bitflags-2.8.0/src/tests/flags.rs
wasmtime-28.0.0 ./ext/cargo-vendor/bitflags-2.6.0/src/tests/flags.rs
wasmtime-27.0.0 ./ext/cargo-vendor/bitflags-2.6.0/src/tests/flags.rs
wasmtime-26.0.0 ./ext/cargo-vendor/bitflags-2.6.0/src/tests/flags.rs
wasmtime-25.0.2 ./ext/cargo-vendor/bitflags-2.6.0/src/tests/flags.rs
wasmtime-25.0.1 ./ext/cargo-vendor/bitflags-2.6.0/src/tests/flags.rs
wasmtime-25.0.0 ./ext/cargo-vendor/bitflags-2.6.0/src/tests/flags.rs
wasmtime-24.0.0 ./ext/cargo-vendor/bitflags-2.6.0/src/tests/flags.rs