diff options
Diffstat (limited to 'src/tools/rustfmt/tests/target/configs/short_array_element_width_threshold')
3 files changed, 31 insertions, 0 deletions
diff --git a/src/tools/rustfmt/tests/target/configs/short_array_element_width_threshold/10.rs b/src/tools/rustfmt/tests/target/configs/short_array_element_width_threshold/10.rs new file mode 100644 index 000000000..78c4adba1 --- /dev/null +++ b/src/tools/rustfmt/tests/target/configs/short_array_element_width_threshold/10.rs @@ -0,0 +1,11 @@ +// rustfmt-short_array_element_width_threshold: 10 + +fn main() { + pub const FORMAT_TEST: [u64; 5] = [ + 0x0000000000000000, + 0xaaaaaaaaaaaaaaaa, + 0xbbbbbbbbbbbbbbbb, + 0xcccccccccccccccc, + 0xdddddddddddddddd, + ]; +} diff --git a/src/tools/rustfmt/tests/target/configs/short_array_element_width_threshold/20.rs b/src/tools/rustfmt/tests/target/configs/short_array_element_width_threshold/20.rs new file mode 100644 index 000000000..608469065 --- /dev/null +++ b/src/tools/rustfmt/tests/target/configs/short_array_element_width_threshold/20.rs @@ -0,0 +1,8 @@ +// rustfmt-short_array_element_width_threshold: 20 + +fn main() { + pub const FORMAT_TEST: [u64; 5] = [ + 0x0000000000000000, 0xaaaaaaaaaaaaaaaa, 0xbbbbbbbbbbbbbbbb, 0xcccccccccccccccc, + 0xdddddddddddddddd, + ]; +} diff --git a/src/tools/rustfmt/tests/target/configs/short_array_element_width_threshold/greater_than_max_width.rs b/src/tools/rustfmt/tests/target/configs/short_array_element_width_threshold/greater_than_max_width.rs new file mode 100644 index 000000000..710b6fe7c --- /dev/null +++ b/src/tools/rustfmt/tests/target/configs/short_array_element_width_threshold/greater_than_max_width.rs @@ -0,0 +1,12 @@ +// rustfmt-max_width: 20 +// rustfmt-short_array_element_width_threshold: 30 + +fn main() { + pub const FORMAT_TEST: [u64; 5] = [ + 0x0000000000000000, + 0xaaaaaaaaaaaaaaaa, + 0xbbbbbbbbbbbbbbbb, + 0xcccccccccccccccc, + 0xdddddddddddddddd, + ]; +} |