Skip to content

Commit b73c617

Browse files
committed
skip style checker implementation tests in ci as well
1 parent 2c11788 commit b73c617

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

ci/style.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ if [ -n "${CI:-}" ]; then
99
check="--check"
1010
fi
1111

12-
cargo test --manifest-path libc-test/Cargo.toml --test style -- --nocapture
12+
cargo test --manifest-path libc-test/Cargo.toml --test style --test style_tests -- --nocapture
1313

1414
command -v rustfmt
1515
rustfmt -V

libc-test/test/check_style.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! Simple script to verify the coding style of this library
1+
//! Simple script to verify the coding style of this library.
22
//!
33
//! ## How to run
44
//!

libc-test/test/style_tests.rs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
//! Verifies the implementation of the style checker in [style]
1+
//! Verifies the implementation of the style checker in [style].
22
33
use style::StyleChecker;
44

55
pub mod style;
66

77
#[test]
8-
fn accept_correct_module_layout() {
8+
fn check_style_accept_correct_module_layout() {
99
let contents = r#"
1010
use core::mem::size_of;
1111
pub type foo_t = u32;
@@ -24,7 +24,7 @@ pub use self::foolib::*;
2424
}
2525

2626
#[test]
27-
fn reject_incorrect_module_layout() {
27+
fn check_style_reject_incorrect_module_layout() {
2828
let contents = r#"
2929
use core::mem::size_of;
3030
pub type foo_t = u32;
@@ -43,7 +43,7 @@ pub use self::foolib::*;
4343
}
4444

4545
#[test]
46-
fn reject_incorrect_cfg_if_layout() {
46+
fn check_style_reject_incorrect_cfg_if_layout() {
4747
let contents = r#"
4848
cfg_if! {
4949
if #[cfg(foo)] {
@@ -60,7 +60,7 @@ cfg_if! {
6060
}
6161

6262
#[test]
63-
fn accept_cfg_if_branch_resets_state() {
63+
fn check_style_accept_cfg_if_branch_resets_state() {
6464
let contents = r#"
6565
cfg_if! {
6666
if #[cfg(foo)] {
@@ -79,7 +79,7 @@ cfg_if! {
7979
}
8080

8181
#[test]
82-
fn reject_multiple_f_macros() {
82+
fn check_style_reject_multiple_f_macros() {
8383
let contents = r#"
8484
f! {}
8585
f! {}
@@ -92,7 +92,7 @@ f! {}
9292
}
9393

9494
#[test]
95-
fn cfg_ignore_target_endian_nested() {
95+
fn check_style_accept_cfg_ignore_target_endian_nested() {
9696
let contents = r#"
9797
pub struct Foo {
9898
#[cfg(target_endian = "little")]
@@ -107,7 +107,7 @@ pub struct Foo {
107107
}
108108

109109
#[test]
110-
fn reject_manual_copy() {
110+
fn check_style_reject_manual_copy() {
111111
let contents = r#"
112112
#[derive(Copy)]
113113
pub struct Foo {}
@@ -120,7 +120,7 @@ pub struct Foo {}
120120
}
121121

122122
#[test]
123-
fn reject_manual_clone() {
123+
fn check_style_reject_manual_clone() {
124124
let contents = r#"
125125
#[derive(Clone)]
126126
pub struct Foo {}
@@ -133,7 +133,7 @@ pub struct Foo {}
133133
}
134134

135135
#[test]
136-
fn accept_multiple_s_macros_with_disjoint_cfg() {
136+
fn check_style_accept_multiple_s_macros_with_disjoint_cfg() {
137137
let contents = r#"
138138
// Main `s!`
139139
s! {}
@@ -155,7 +155,7 @@ s! { pub struct bar { /* ... */ } }
155155
}
156156

157157
#[test]
158-
fn reject_duplicated_s_macro() {
158+
fn check_style_reject_duplicated_s_macro() {
159159
let contents = r#"
160160
s! {}
161161
s! {}
@@ -168,7 +168,7 @@ s! {}
168168
}
169169

170170
#[test]
171-
fn reject_duplicated_s_macro_cfg() {
171+
fn check_style_reject_duplicated_s_macro_cfg() {
172172
let contents = r#"
173173
#[cfg(not(target_arch = "foo"))]
174174
s! {}
@@ -184,7 +184,7 @@ s! {}
184184
}
185185

186186
#[test]
187-
fn reject_single_positive_s_macro_cfg() {
187+
fn check_style_reject_single_positive_s_macro_cfg() {
188188
let contents = r#"
189189
// A positive (no `not`) config: reject because this should go into
190190
// the relevant file.
@@ -199,7 +199,7 @@ s! { pub struct foo { /* ... */ } }
199199
}
200200

201201
#[test]
202-
fn reject_single_positive_s_macro_cfg_target_os() {
202+
fn check_style_reject_single_positive_s_macro_cfg_target_os() {
203203
let contents = r#"
204204
// A positive (no `not`) config: reject because this should go into
205205
// the relevant file.
@@ -214,7 +214,7 @@ s! { pub struct foo { /* ... */ } }
214214
}
215215

216216
#[test]
217-
fn accept_positive_s_macro_any() {
217+
fn check_style_accept_positive_s_macro_any() {
218218
let contents = r#"
219219
// It's nicer to accept this so that we don't have to duplicate the same struct 3 times.
220220
#[cfg(any(target_arch = "foo", target_arch = "bar", target_arch = "baz"))]
@@ -228,7 +228,7 @@ s! { pub struct foo { /* ... */ } }
228228
}
229229

230230
#[test]
231-
fn accept_positive_s_macro_all() {
231+
fn check_style_accept_positive_s_macro_all() {
232232
let contents = r#"
233233
#[cfg(all(target_arch = "foo", target_arch = "bar", target_arch = "baz"))]
234234
s! { pub struct foo { /* ... */ } }
@@ -241,7 +241,7 @@ s! { pub struct foo { /* ... */ } }
241241
}
242242

243243
#[test]
244-
fn reject_duplicated_cfg_and_cfg_if() {
244+
fn check_style_reject_duplicated_cfg_and_cfg_if() {
245245
let contents = r#"
246246
#[cfg(not(target_arch = "foo"))]
247247
s! { pub struct foo { /* ... */ } }

0 commit comments

Comments
 (0)