aboutsummaryrefslogtreecommitdiff
path: root/test/self_hosted.zig
diff options
context:
space:
mode:
Diffstat (limited to 'test/self_hosted.zig')
-rw-r--r--test/self_hosted.zig42
1 files changed, 0 insertions, 42 deletions
diff --git a/test/self_hosted.zig b/test/self_hosted.zig
index 54219270d8..4b04ba4d5a 100644
--- a/test/self_hosted.zig
+++ b/test/self_hosted.zig
@@ -38,45 +38,3 @@ fn testPassSliceOfEmptyStructToFn(slice: []EmptyStruct2) -> usize {
}
-// TODO change this test to an issue
-// we're going to change how this works
-fn switchOnErrorUnion() {
- @setFnTest(this, true);
-
- const x = switch (returnsTen()) {
- Ok => |val| val + 1,
- ItBroke, NoMem => 1,
- CrappedOut => 2,
- };
- assert(x == 11);
-}
-error ItBroke;
-error NoMem;
-error CrappedOut;
-fn returnsTen() -> %i32 {
- @setFnStaticEval(this, false);
- 10
-}
-
-// TODO not passing
-fn castSliceToU8Slice() {
- @setFnTest(this);
-
- assert(@sizeOf(i32) == 4);
- var big_thing_array = []i32{1, 2, 3, 4};
- const big_thing_slice: []i32 = big_thing_array;
- const bytes = ([]u8)(big_thing_slice);
- assert(bytes.len == 4 * 4);
- bytes[4] = 0;
- bytes[5] = 0;
- bytes[6] = 0;
- bytes[7] = 0;
- assert(big_thing_slice[1] == 0);
- const big_thing_again = ([]i32)(bytes);
- assert(big_thing_again[2] == 3);
- big_thing_again[2] = -1;
- assert(bytes[8] == @maxValue(u8));
- assert(bytes[9] == @maxValue(u8));
- assert(bytes[10] == @maxValue(u8));
- assert(bytes[11] == @maxValue(u8));
-}