Skip to content

Commit 3bbbb31

Browse files
committed
auto merge of #6327 : z0w0/rust/rm-notest, r=brson
Makes it more consistent, imo.
2 parents d82d987 + cb66d89 commit 3bbbb31

File tree

20 files changed

+131
-132
lines changed

20 files changed

+131
-132
lines changed

src/libcore/at_vec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ pub fn from_slice<T:Copy>(v: &[T]) -> @[T] {
166166
from_fn(v.len(), |i| v[i])
167167
}
168168

169-
#[cfg(notest)]
169+
#[cfg(not(test))]
170170
pub mod traits {
171171
use at_vec::append;
172172
use kinds::Copy;

src/libcore/bool.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
//! Boolean logic
1212
13-
#[cfg(notest)]
13+
#[cfg(not(test))]
1414
use cmp::{Eq, Ord, TotalOrd, Ordering};
1515
use option::{None, Option, Some};
1616
use from_str::FromStr;
@@ -75,7 +75,7 @@ pub fn all_values(blk: &fn(v: bool)) {
7575
#[inline(always)]
7676
pub fn to_bit(v: bool) -> u8 { if v { 1u8 } else { 0u8 } }
7777

78-
#[cfg(notest)]
78+
#[cfg(not(test))]
7979
impl Ord for bool {
8080
#[inline(always)]
8181
fn lt(&self, other: &bool) -> bool { to_bit(*self) < to_bit(*other) }
@@ -87,13 +87,13 @@ impl Ord for bool {
8787
fn ge(&self, other: &bool) -> bool { to_bit(*self) >= to_bit(*other) }
8888
}
8989

90-
#[cfg(notest)]
90+
#[cfg(not(test))]
9191
impl TotalOrd for bool {
9292
#[inline(always)]
9393
fn cmp(&self, other: &bool) -> Ordering { to_bit(*self).cmp(&to_bit(*other)) }
9494
}
9595

96-
#[cfg(notest)]
96+
#[cfg(not(test))]
9797
impl Eq for bool {
9898
#[inline(always)]
9999
fn eq(&self, other: &bool) -> bool { (*self) == (*other) }

src/libcore/char.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010

1111
//! Utilities for manipulating the char type
1212
13-
#[cfg(notest)]
13+
#[cfg(not(test))]
1414
use cmp::Ord;
1515
use option::{None, Option, Some};
1616
use str;
1717
use u32;
1818
use uint;
1919
use unicode::{derived_property, general_category};
2020

21-
#[cfg(notest)] use cmp::Eq;
21+
#[cfg(not(test))] use cmp::Eq;
2222

2323
/*
2424
Lu Uppercase_Letter an uppercase letter
@@ -244,15 +244,15 @@ pub fn len_utf8_bytes(c: char) -> uint {
244244
else { fail!(~"invalid character!") }
245245
}
246246
247-
#[cfg(notest)]
247+
#[cfg(not(test))]
248248
impl Eq for char {
249249
#[inline(always)]
250250
fn eq(&self, other: &char) -> bool { (*self) == (*other) }
251251
#[inline(always)]
252252
fn ne(&self, other: &char) -> bool { (*self) != (*other) }
253253
}
254254
255-
#[cfg(notest)]
255+
#[cfg(not(test))]
256256
impl Ord for char {
257257
#[inline(always)]
258258
fn lt(&self, other: &char) -> bool { *self < *other }

src/libcore/cleanup.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ use ptr::mut_null;
1515
use repr::BoxRepr;
1616
use sys::TypeDesc;
1717
use cast::transmute;
18-
#[cfg(notest)] use unstable::lang::clear_task_borrow_list;
18+
#[cfg(not(test))] use unstable::lang::clear_task_borrow_list;
1919

20-
#[cfg(notest)] use ptr::to_unsafe_ptr;
20+
#[cfg(not(test))] use ptr::to_unsafe_ptr;
2121

2222
/**
2323
* Runtime structures
@@ -164,7 +164,7 @@ fn debug_mem() -> bool {
164164
}
165165

166166
/// Destroys all managed memory (i.e. @ boxes) held by the current task.
167-
#[cfg(notest)]
167+
#[cfg(not(test))]
168168
#[lang="annihilate"]
169169
pub unsafe fn annihilate() {
170170
use unstable::lang::local_free;

src/libcore/core.rc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,9 @@ pub mod managed;
179179

180180
/* Core language traits */
181181

182-
#[cfg(notest)] pub mod kinds;
183-
#[cfg(notest)] pub mod ops;
184-
#[cfg(notest)] pub mod cmp;
182+
#[cfg(not(test))] pub mod kinds;
183+
#[cfg(not(test))] pub mod ops;
184+
#[cfg(not(test))] pub mod cmp;
185185

186186

187187
/* Common traits */

src/libcore/logging.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ pub fn console_off() {
4242
}
4343
}
4444

45-
#[cfg(notest)]
45+
#[cfg(not(test))]
4646
#[lang="log_type"]
4747
pub fn log_type<T>(level: u32, object: &T) {
4848
use cast::transmute;

src/libcore/managed.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
1313
use ptr::to_unsafe_ptr;
1414

15-
#[cfg(notest)] use cmp::{Eq, Ord};
15+
#[cfg(not(test))] use cmp::{Eq, Ord};
1616

1717
pub mod raw {
1818
use intrinsic::TyDesc;
@@ -49,23 +49,23 @@ pub fn mut_ptr_eq<T>(a: @mut T, b: @mut T) -> bool {
4949
a_ptr == b_ptr
5050
}
5151

52-
#[cfg(notest)]
52+
#[cfg(not(test))]
5353
impl<T:Eq> Eq for @T {
5454
#[inline(always)]
5555
fn eq(&self, other: &@T) -> bool { *(*self) == *(*other) }
5656
#[inline(always)]
5757
fn ne(&self, other: &@T) -> bool { *(*self) != *(*other) }
5858
}
5959

60-
#[cfg(notest)]
60+
#[cfg(not(test))]
6161
impl<T:Eq> Eq for @mut T {
6262
#[inline(always)]
6363
fn eq(&self, other: &@mut T) -> bool { *(*self) == *(*other) }
6464
#[inline(always)]
6565
fn ne(&self, other: &@mut T) -> bool { *(*self) != *(*other) }
6666
}
6767

68-
#[cfg(notest)]
68+
#[cfg(not(test))]
6969
impl<T:Ord> Ord for @T {
7070
#[inline(always)]
7171
fn lt(&self, other: &@T) -> bool { *(*self) < *(*other) }
@@ -77,7 +77,7 @@ impl<T:Ord> Ord for @T {
7777
fn gt(&self, other: &@T) -> bool { *(*self) > *(*other) }
7878
}
7979

80-
#[cfg(notest)]
80+
#[cfg(not(test))]
8181
impl<T:Ord> Ord for @mut T {
8282
#[inline(always)]
8383
fn lt(&self, other: &@mut T) -> bool { *(*self) < *(*other) }

src/libcore/nil.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@ Functions for the unit type.
1414
1515
*/
1616

17-
#[cfg(notest)]
17+
#[cfg(not(test))]
1818
use prelude::*;
1919

20-
#[cfg(notest)]
20+
#[cfg(not(test))]
2121
impl Eq for () {
2222
#[inline(always)]
2323
fn eq(&self, _other: &()) -> bool { true }
2424
#[inline(always)]
2525
fn ne(&self, _other: &()) -> bool { false }
2626
}
2727

28-
#[cfg(notest)]
28+
#[cfg(not(test))]
2929
impl Ord for () {
3030
#[inline(always)]
3131
fn lt(&self, _other: &()) -> bool { false }
@@ -37,13 +37,13 @@ impl Ord for () {
3737
fn gt(&self, _other: &()) -> bool { false }
3838
}
3939

40-
#[cfg(notest)]
40+
#[cfg(not(test))]
4141
impl TotalOrd for () {
4242
#[inline(always)]
4343
fn cmp(&self, _other: &()) -> Ordering { Equal }
4444
}
4545

46-
#[cfg(notest)]
46+
#[cfg(not(test))]
4747
impl TotalEq for () {
4848
#[inline(always)]
4949
fn equals(&self, _other: &()) -> bool { true }

src/libcore/num/f32.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -198,15 +198,15 @@ pub mod consts {
198198

199199
impl Num for f32 {}
200200

201-
#[cfg(notest)]
201+
#[cfg(not(test))]
202202
impl Eq for f32 {
203203
#[inline(always)]
204204
fn eq(&self, other: &f32) -> bool { (*self) == (*other) }
205205
#[inline(always)]
206206
fn ne(&self, other: &f32) -> bool { (*self) != (*other) }
207207
}
208208

209-
#[cfg(notest)]
209+
#[cfg(not(test))]
210210
impl ApproxEq<f32> for f32 {
211211
#[inline(always)]
212212
fn approx_epsilon() -> f32 { 1.0e-6 }
@@ -222,7 +222,7 @@ impl ApproxEq<f32> for f32 {
222222
}
223223
}
224224

225-
#[cfg(notest)]
225+
#[cfg(not(test))]
226226
impl Ord for f32 {
227227
#[inline(always)]
228228
fn lt(&self, other: &f32) -> bool { (*self) < (*other) }
@@ -272,37 +272,37 @@ impl One for f32 {
272272
fn one() -> f32 { 1.0 }
273273
}
274274

275-
#[cfg(notest)]
275+
#[cfg(not(test))]
276276
impl Add<f32,f32> for f32 {
277277
#[inline(always)]
278278
fn add(&self, other: &f32) -> f32 { *self + *other }
279279
}
280280

281-
#[cfg(notest)]
281+
#[cfg(not(test))]
282282
impl Sub<f32,f32> for f32 {
283283
#[inline(always)]
284284
fn sub(&self, other: &f32) -> f32 { *self - *other }
285285
}
286286

287-
#[cfg(notest)]
287+
#[cfg(not(test))]
288288
impl Mul<f32,f32> for f32 {
289289
#[inline(always)]
290290
fn mul(&self, other: &f32) -> f32 { *self * *other }
291291
}
292292

293-
#[cfg(notest)]
293+
#[cfg(not(test))]
294294
impl Div<f32,f32> for f32 {
295295
#[inline(always)]
296296
fn div(&self, other: &f32) -> f32 { *self / *other }
297297
}
298298

299-
#[cfg(notest)]
299+
#[cfg(not(test))]
300300
impl Rem<f32,f32> for f32 {
301301
#[inline(always)]
302302
fn rem(&self, other: &f32) -> f32 { *self % *other }
303303
}
304304

305-
#[cfg(notest)]
305+
#[cfg(not(test))]
306306
impl Neg<f32> for f32 {
307307
#[inline(always)]
308308
fn neg(&self) -> f32 { -*self }

src/libcore/num/f64.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -221,15 +221,15 @@ pub mod consts {
221221

222222
impl Num for f64 {}
223223

224-
#[cfg(notest)]
224+
#[cfg(not(test))]
225225
impl Eq for f64 {
226226
#[inline(always)]
227227
fn eq(&self, other: &f64) -> bool { (*self) == (*other) }
228228
#[inline(always)]
229229
fn ne(&self, other: &f64) -> bool { (*self) != (*other) }
230230
}
231231

232-
#[cfg(notest)]
232+
#[cfg(not(test))]
233233
impl ApproxEq<f64> for f64 {
234234
#[inline(always)]
235235
fn approx_epsilon() -> f64 { 1.0e-6 }
@@ -245,7 +245,7 @@ impl ApproxEq<f64> for f64 {
245245
}
246246
}
247247

248-
#[cfg(notest)]
248+
#[cfg(not(test))]
249249
impl Ord for f64 {
250250
#[inline(always)]
251251
fn lt(&self, other: &f64) -> bool { (*self) < (*other) }
@@ -295,28 +295,28 @@ impl One for f64 {
295295
fn one() -> f64 { 1.0 }
296296
}
297297

298-
#[cfg(notest)]
298+
#[cfg(not(test))]
299299
impl Add<f64,f64> for f64 {
300300
fn add(&self, other: &f64) -> f64 { *self + *other }
301301
}
302-
#[cfg(notest)]
302+
#[cfg(not(test))]
303303
impl Sub<f64,f64> for f64 {
304304
fn sub(&self, other: &f64) -> f64 { *self - *other }
305305
}
306-
#[cfg(notest)]
306+
#[cfg(not(test))]
307307
impl Mul<f64,f64> for f64 {
308308
fn mul(&self, other: &f64) -> f64 { *self * *other }
309309
}
310-
#[cfg(notest)]
310+
#[cfg(not(test))]
311311
impl Div<f64,f64> for f64 {
312312
fn div(&self, other: &f64) -> f64 { *self / *other }
313313
}
314-
#[cfg(notest)]
314+
#[cfg(not(test))]
315315
impl Rem<f64,f64> for f64 {
316316
#[inline(always)]
317317
fn rem(&self, other: &f64) -> f64 { *self % *other }
318318
}
319-
#[cfg(notest)]
319+
#[cfg(not(test))]
320320
impl Neg<f64> for f64 {
321321
fn neg(&self) -> f64 { -*self }
322322
}

0 commit comments

Comments
 (0)