Skip to content

Commit e9853c4

Browse files
authored
Rollup merge of #44047 - cuviper:union-basic-endian, r=petrochenkov
Fix little-endian assumptions in run-pass/union/union-basic None
2 parents 86f0f44 + b1e8c72 commit e9853c4

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/test/run-pass/union/union-basic.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010

1111
// aux-build:union.rs
1212

13-
// FIXME: This test case makes little-endian assumptions.
14-
// ignore-s390x
15-
// ignore-sparc
16-
1713
extern crate union;
1814
use std::mem::{size_of, align_of, zeroed};
1915

@@ -39,7 +35,7 @@ fn local() {
3935
assert_eq!(w.b, 0);
4036
w.a = 1;
4137
assert_eq!(w.a, 1);
42-
assert_eq!(w.b, 1);
38+
assert_eq!(w.b.to_le(), 1);
4339
}
4440
}
4541

@@ -60,7 +56,7 @@ fn xcrate() {
6056
assert_eq!(w.b, 0);
6157
w.a = 1;
6258
assert_eq!(w.a, 1);
63-
assert_eq!(w.b, 1);
59+
assert_eq!(w.b.to_le(), 1);
6460
}
6561
}
6662

0 commit comments

Comments
 (0)