Skip to content

Commit 3981e94

Browse files
committed
Fix windows dead code
1 parent 03fa1e2 commit 3981e94

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

pinger/src/test.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
#[cfg(test)]
22
mod tests {
3+
#[cfg(unix)]
34
use crate::bsd::BSDPinger;
5+
#[cfg(unix)]
46
use crate::linux::LinuxPinger;
7+
#[cfg(unix)]
58
use crate::macos::MacOSPinger;
69
#[cfg(windows)]
710
use crate::windows::WindowsPinger;
@@ -109,31 +112,37 @@ mod tests {
109112
}
110113
}
111114

115+
#[cfg(unix)]
112116
#[test]
113117
fn macos() {
114118
test_parser::<MacOSPinger>(include_str!("tests/macos.txt"));
115119
}
116120

121+
#[cfg(unix)]
117122
#[test]
118123
fn freebsd() {
119124
test_parser::<BSDPinger>(include_str!("tests/bsd.txt"));
120125
}
121126

127+
#[cfg(unix)]
122128
#[test]
123129
fn dragonfly() {
124130
test_parser::<BSDPinger>(include_str!("tests/bsd.txt"));
125131
}
126132

133+
#[cfg(unix)]
127134
#[test]
128135
fn openbsd() {
129136
test_parser::<BSDPinger>(include_str!("tests/bsd.txt"));
130137
}
131138

139+
#[cfg(unix)]
132140
#[test]
133141
fn netbsd() {
134142
test_parser::<BSDPinger>(include_str!("tests/bsd.txt"));
135143
}
136144

145+
#[cfg(unix)]
137146
#[test]
138147
fn ubuntu() {
139148
run_parser_test(
@@ -142,6 +151,7 @@ mod tests {
142151
);
143152
}
144153

154+
#[cfg(unix)]
145155
#[test]
146156
fn debian() {
147157
run_parser_test(
@@ -156,6 +166,7 @@ mod tests {
156166
test_parser::<WindowsPinger>(include_str!("tests/windows.txt"));
157167
}
158168

169+
#[cfg(unix)]
159170
#[test]
160171
fn android() {
161172
run_parser_test(
@@ -164,6 +175,7 @@ mod tests {
164175
);
165176
}
166177

178+
#[cfg(unix)]
167179
#[test]
168180
fn alpine() {
169181
run_parser_test(

0 commit comments

Comments
 (0)