Sha256: 0051274f8490c5837d88447bf72fc7266e970fa95c6e4ca540eeba45b7947ce6

Contents?: true

Size: 628 Bytes

Versions: 3

Compression:

Stored size: 628 Bytes

Contents

// This file is part of ICU4X. For terms of use, please see the file
// called LICENSE at the top level of the ICU4X source tree
// (online at: https://github.com/unicode-org/icu4x/blob/main/LICENSE ).

use litemap::LiteMap;

#[test]
fn test_ser() {
    let mut map = LiteMap::new_vec();
    map.insert(1, "jat");
    map.insert(4, "sei");
    map.insert(3, "saam");
    map.insert(2, "ji");

    let json_string = serde_json::to_string(&map).unwrap();

    assert_eq!(json_string, r#"{"1":"jat","2":"ji","3":"saam","4":"sei"}"#);

    let new_map = serde_json::from_str(&json_string).unwrap();

    assert_eq!(map, new_map);
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
wasmtime-29.0.0 ./ext/cargo-vendor/litemap-0.7.4/tests/serde.rs
wasmtime-28.0.0 ./ext/cargo-vendor/litemap-0.7.4/tests/serde.rs
wasmtime-27.0.0 ./ext/cargo-vendor/litemap-0.7.3/tests/serde.rs