Debian Codegraph @

tests/test_serde.rs

raw symbols SCIP
1 #![cfg(feature = "serde")]
2
3 use debugidrust-analyzer cargo debugid 0.8.0 crate/::{CodeIdrust-analyzer cargo debugid 0.8.0 CodeId#, DebugIdrust-analyzer cargo debugid 0.8.0 DebugId#};
4 use uuidrust-analyzer cargo uuid 1.25.0 crate/::Uuidrust-analyzer cargo uuid 1.25.0 Uuid#;
5
6 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
7 fn test_deserialize_debugidrust-analyzer cargo debugid 0.8.0 test_deserialize_debugid().() {
8 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
9 DebugIdrust-analyzer cargo debugid 0.8.0 DebugId#::from_partsrust-analyzer cargo debugid 0.8.0 impl#[DebugId]from_parts().(
10 Uuidrust-analyzer cargo uuid 1.25.0 Uuid#::parse_strrust-analyzer cargo uuid 1.25.0 parser/impl#[Uuid]parse_str().("dfb8e43a-f242-3d73-a453-aeb6a777ef75").unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(),
11 0,
12 ),
13 serde_jsonrust-analyzer cargo serde_json 1.0.151 crate/::from_strrust-analyzer cargo serde_json 1.0.151 de/from_str().("\"dfb8e43a-f242-3d73-a453-aeb6a777ef75\"").unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(),
14 );
15 }
16
17 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
18 fn test_serialize_debugidrust-analyzer cargo debugid 0.8.0 test_serialize_debugid().() {
19 let id = DebugIdrust-analyzer cargo debugid 0.8.0 DebugId#::from_partsrust-analyzer cargo debugid 0.8.0 impl#[DebugId]from_parts().(
20 Uuidrust-analyzer cargo uuid 1.25.0 Uuid#::parse_strrust-analyzer cargo uuid 1.25.0 parser/impl#[Uuid]parse_str().("dfb8e43a-f242-3d73-a453-aeb6a777ef75").unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(),
21 0,
22 );
23
24 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
25 "\"dfb8e43a-f242-3d73-a453-aeb6a777ef75\"",
26 serde_jsonrust-analyzer cargo serde_json 1.0.151 crate/::to_stringrust-analyzer cargo serde_json 1.0.151 ser/to_string().(&id).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(),
27 );
28 }
29
30 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
31 fn test_deserialize_codeidrust-analyzer cargo debugid 0.8.0 test_deserialize_codeid().() {
32 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
33 CodeIdrust-analyzer cargo debugid 0.8.0 CodeId#::newrust-analyzer cargo debugid 0.8.0 impl#[CodeId]new().("dfb8e43af2423d73a453aeb6a777ef75".intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().()),
34 serde_jsonrust-analyzer cargo serde_json 1.0.151 crate/::from_strrust-analyzer cargo serde_json 1.0.151 de/from_str().("\"dfb8e43af2423d73a453aeb6a777ef75\"").unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(),
35 );
36 }
37
38 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
39 fn test_serialize_codeidrust-analyzer cargo debugid 0.8.0 test_serialize_codeid().() {
40 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
41 "\"dfb8e43af2423d73a453aeb6a777ef75\"",
42 serde_jsonrust-analyzer cargo serde_json 1.0.151 crate/::to_stringrust-analyzer cargo serde_json 1.0.151 ser/to_string().(&CodeIdrust-analyzer cargo debugid 0.8.0 CodeId#::newrust-analyzer cargo debugid 0.8.0 impl#[CodeId]new().("dfb8e43af2423d73a453aeb6a777ef75".intorust-analyzer cargo core https://github.com/rust-lang/rust/library/core convert/impl#[T][`Into<U>`]into().())).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(),
43 );
44 }