Skip to content

Commit 6c0a0dd

Browse files
committed
Enable more tests
1 parent aa61fb8 commit 6c0a0dd

File tree

3 files changed

+2
-78
lines changed

3 files changed

+2
-78
lines changed

patches/0022-core-Disable-not-compiling-tests.patch

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -79,26 +79,6 @@ index 04ed14f..a6e372e 100644
7979

8080
#[test]
8181
fn test_swap_bytes() {
82-
diff --git a/library/core/tests/ptr.rs b/library/core/tests/ptr.rs
83-
index 1a6be3a..42dbd59 100644
84-
--- a/library/core/tests/ptr.rs
85-
+++ b/library/core/tests/ptr.rs
86-
@@ -250,6 +250,7 @@ fn test_unsized_nonnull() {
87-
assert!(ys == zs);
88-
}
89-
90-
+/*
91-
#[test]
92-
#[allow(warnings)]
93-
// Have a symbol for the test below. It doesn’t need to be an actual variadic function, match the
94-
@@ -289,6 +290,7 @@ fn write_unaligned_drop() {
95-
}
96-
DROPS.with(|d| assert_eq!(*d.borrow(), [0]));
97-
}
98-
+*/
99-
100-
#[test]
101-
fn align_offset_zst() {
10282
diff --git a/library/core/tests/slice.rs b/library/core/tests/slice.rs
10383
index 6609bc3..241b497 100644
10484
--- a/library/core/tests/slice.rs
@@ -119,21 +99,5 @@ index 6609bc3..241b497 100644
11999

120100
#[test]
121101
#[should_panic(expected = "index 0 greater than length of slice")]
122-
diff --git a/library/core/tests/num/ops.rs b/library/core/tests/num/ops.rs
123-
index 9979cc8..d5d1d83 100644
124-
--- a/library/core/tests/num/ops.rs
125-
+++ b/library/core/tests/num/ops.rs
126-
@@ -238,7 +238,7 @@ macro_rules! test_shift_assign {
127-
}
128-
};
129-
}
130-
-test_shift!(test_shl_defined, Shl::shl);
131-
-test_shift_assign!(test_shl_assign_defined, ShlAssign::shl_assign);
132-
-test_shift!(test_shr_defined, Shr::shr);
133-
-test_shift_assign!(test_shr_assign_defined, ShrAssign::shr_assign);
134-
+//test_shift!(test_shl_defined, Shl::shl);
135-
+//test_shift_assign!(test_shl_assign_defined, ShlAssign::shl_assign);
136-
+//test_shift!(test_shr_defined, Shr::shr);
137-
+//test_shift_assign!(test_shr_assign_defined, ShrAssign::shr_assign);
138102
--
139103
2.21.0 (Apple Git-122)

patches/0023-core-Ignore-failing-tests.patch

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -46,45 +46,4 @@ index 4bc44e9..8e3c7a4 100644
4646

4747
#[test]
4848
fn cell_allows_array_cycle() {
49-
diff --git a/library/core/tests/num/mod.rs b/library/core/tests/num/mod.rs
50-
index a17c094..5bb11d2 100644
51-
--- a/library/core/tests/num/mod.rs
52-
+++ b/library/core/tests/num/mod.rs
53-
@@ -651,11 +651,12 @@ macro_rules! test_float {
54-
assert_eq!((9.0 as $fty).min($neginf), $neginf);
55-
assert_eq!(($neginf as $fty).min(-9.0), $neginf);
56-
assert_eq!((-9.0 as $fty).min($neginf), $neginf);
57-
- assert_eq!(($nan as $fty).min(9.0), 9.0);
58-
- assert_eq!(($nan as $fty).min(-9.0), -9.0);
59-
- assert_eq!((9.0 as $fty).min($nan), 9.0);
60-
- assert_eq!((-9.0 as $fty).min($nan), -9.0);
61-
- assert!(($nan as $fty).min($nan).is_nan());
62-
+ // Cranelift fmin has NaN propagation
63-
+ //assert_eq!(($nan as $fty).min(9.0), 9.0);
64-
+ //assert_eq!(($nan as $fty).min(-9.0), -9.0);
65-
+ //assert_eq!((9.0 as $fty).min($nan), 9.0);
66-
+ //assert_eq!((-9.0 as $fty).min($nan), -9.0);
67-
+ //assert!(($nan as $fty).min($nan).is_nan());
68-
}
69-
#[test]
70-
fn max() {
71-
@@ -673,11 +674,12 @@ macro_rules! test_float {
72-
assert_eq!((9.0 as $fty).max($neginf), 9.0);
73-
assert_eq!(($neginf as $fty).max(-9.0), -9.0);
74-
assert_eq!((-9.0 as $fty).max($neginf), -9.0);
75-
- assert_eq!(($nan as $fty).max(9.0), 9.0);
76-
- assert_eq!(($nan as $fty).max(-9.0), -9.0);
77-
- assert_eq!((9.0 as $fty).max($nan), 9.0);
78-
- assert_eq!((-9.0 as $fty).max($nan), -9.0);
79-
- assert!(($nan as $fty).max($nan).is_nan());
80-
+ // Cranelift fmax has NaN propagation
81-
+ //assert_eq!(($nan as $fty).max(9.0), 9.0);
82-
+ //assert_eq!(($nan as $fty).max(-9.0), -9.0);
83-
+ //assert_eq!((9.0 as $fty).max($nan), 9.0);
84-
+ //assert_eq!((-9.0 as $fty).max($nan), -9.0);
85-
+ //assert!(($nan as $fty).max($nan).is_nan());
86-
}
87-
#[test]
88-
fn rem_euclid() {
89-
--
90-
2.21.0 (Apple Git-122)
49+
-- 2.21.0 (Apple Git-122)

src/intrinsic.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ impl<'a, 'gcc, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'a, 'gcc, 'tcx> {
296296
self.rotate_left(val, raw_shift, width)
297297
}
298298
else {
299+
// TODO: implement now to enable more tests.
299300
match width {
300301
8 => unimplemented!(),
301302
16 => unimplemented!(),

0 commit comments

Comments
 (0)