Debian Codegraph @

tests/240_array_pretty.rs

raw symbols SCIP
1 use ronrust-analyzer cargo ron 0.12.0 crate/::serrust-analyzer cargo ron 0.12.0 ser/::{to_string_prettyrust-analyzer cargo ron 0.12.0 ser/to_string_pretty()., PrettyConfigrust-analyzer cargo ron 0.12.0 ser/PrettyConfig#};
2
3 #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:]
4 fn small_arrayrust-analyzer cargo ron 0.12.0 small_array().() {
5 let arr = &[(), (), ()][rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index()...rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/range/RangeFull#]rust-analyzer cargo core https://github.com/rust-lang/rust/library/core array/impl#[`[T; N]`][`Index<I>`]index().;
6 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
7 to_string_prettyrust-analyzer cargo ron 0.12.0 ser/to_string_pretty().(&arr, PrettyConfigrust-analyzer cargo ron 0.12.0 ser/PrettyConfig#::newrust-analyzer cargo ron 0.12.0 ser/impl#[PrettyConfig]new().().new_linerust-analyzer cargo ron 0.12.0 ser/impl#[PrettyConfig]new_line().("\n")).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(),
8 "[
9 (),
10 (),
11 (),
12 ]"
13 );
14 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
15 to_string_prettyrust-analyzer cargo ron 0.12.0 ser/to_string_pretty().(
16 &arr,
17 PrettyConfigrust-analyzer cargo ron 0.12.0 ser/PrettyConfig#::newrust-analyzer cargo ron 0.12.0 ser/impl#[PrettyConfig]new().().new_linerust-analyzer cargo ron 0.12.0 ser/impl#[PrettyConfig]new_line().("\n").compact_arraysrust-analyzer cargo ron 0.12.0 ser/impl#[PrettyConfig]compact_arrays().(true)
18 )
19 .unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(),
20 "[(), (), ()]"
21 );
22 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
23 to_string_prettyrust-analyzer cargo ron 0.12.0 ser/to_string_pretty().(
24 &arr,
25 PrettyConfigrust-analyzer cargo ron 0.12.0 ser/PrettyConfig#::newrust-analyzer cargo ron 0.12.0 ser/impl#[PrettyConfig]new().()
26 .new_linerust-analyzer cargo ron 0.12.0 ser/impl#[PrettyConfig]new_line().("\n")
27 .compact_arraysrust-analyzer cargo ron 0.12.0 ser/impl#[PrettyConfig]compact_arrays().(true)
28 .separatorrust-analyzer cargo ron 0.12.0 ser/impl#[PrettyConfig]separator().("")
29 )
30 .unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(),
31 "[(),(),()]"
32 );
33 assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(
34 to_string_prettyrust-analyzer cargo ron 0.12.0 ser/to_string_pretty().(
35 &vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![(1, 2), (3, 4)],
36 PrettyConfigrust-analyzer cargo ron 0.12.0 ser/PrettyConfig#::newrust-analyzer cargo ron 0.12.0 ser/impl#[PrettyConfig]new().()
37 .new_linerust-analyzer cargo ron 0.12.0 ser/impl#[PrettyConfig]new_line().("\n")
38 .separate_tuple_membersrust-analyzer cargo ron 0.12.0 ser/impl#[PrettyConfig]separate_tuple_members().(true)
39 .compact_arraysrust-analyzer cargo ron 0.12.0 ser/impl#[PrettyConfig]compact_arrays().(true)
40 )
41 .unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(),
42 "[(
43 1,
44 2,
45 ), (
46 3,
47 4,
48 )]"
49 );
50 }