Skip to content

Commit 1251c6c

Browse files
committed
refactor: tests: add reorder_derives test
1 parent cafb45c commit 1251c6c

File tree

3 files changed

+62
-0
lines changed

3 files changed

+62
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#![allow(
2+
dead_code,
3+
non_camel_case_types,
4+
non_snake_case,
5+
non_upper_case_globals,
6+
unused_assignments,
7+
unused_mut
8+
)]
9+
10+
#[derive(Copy, Clone)]
11+
#[repr(C)]
12+
pub struct S0 {}
13+
14+
#[derive(Clone)]
15+
#[repr(u8)]
16+
#[derive(Copy)]
17+
#[derive(Debug)]
18+
pub struct S1 {}
19+
20+
#[cfg(not(test))]
21+
#[derive(Debug, Copy, Clone)]
22+
#[repr(u32)]
23+
pub struct S2 {}
24+
25+
#[derive(Debug)]
26+
pub struct S3 {}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#![allow(
2+
dead_code,
3+
non_camel_case_types,
4+
non_snake_case,
5+
non_upper_case_globals,
6+
unused_assignments,
7+
unused_mut
8+
)]
9+
10+
#[derive(Copy, Clone)]
11+
#[repr(C)]
12+
pub struct S0 {}
13+
14+
#[derive(Clone)]
15+
#[repr(u8)]
16+
#[derive(Copy)]
17+
#[derive(Debug)]
18+
pub struct S1 {}
19+
20+
#[cfg(not(test))]
21+
#[derive(Debug, Copy, Clone)]
22+
#[repr(u32)]
23+
pub struct S2 {}
24+
25+
#[derive(Debug)]
26+
pub struct S3 {}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/sh
2+
3+
# work around System Integrity Protection on macOS
4+
if [ `uname` = 'Darwin' ]; then
5+
export LD_LIBRARY_PATH=$not_LD_LIBRARY_PATH
6+
fi
7+
8+
$refactor \
9+
test_one_plus_one \
10+
-- old.rs $rustflags

0 commit comments

Comments
 (0)