diff options
Diffstat (limited to 'tests/stable.rs')
-rw-r--r-- | tests/stable.rs | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/tests/stable.rs b/tests/stable.rs new file mode 100644 index 0000000..a3b6a7b --- /dev/null +++ b/tests/stable.rs @@ -0,0 +1,45 @@ +#![allow(dead_code)] + +#[remain::sorted] +pub enum TestEnum { + A, + B, + C, + D, +} + +#[remain::sorted] +pub struct TestStruct { + a: usize, + b: usize, + c: usize, + d: usize, +} + +#[test] +#[remain::check] +fn test_match() { + let value = TestEnum::A; + + #[sorted] + let _ = match value { + TestEnum::A => {} + TestEnum::B => {} + TestEnum::C => {} + _ => {} + }; +} + +#[test] +#[remain::check] +fn test_let() { + let value = TestEnum::A; + + #[sorted] + match value { + TestEnum::A => {} + TestEnum::B => {} + TestEnum::C => {} + _ => {} + } +} |