aboutsummaryrefslogtreecommitdiff
path: root/test/cases
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2018-05-01 01:53:04 -0400
committerAndrew Kelley <superjoe30@gmail.com>2018-05-01 01:53:04 -0400
commitac4d55dec1e32ddef945bfa246eb78f20f31ec44 (patch)
tree31e91383c77a6b19f77e76096c38f5976161b9dd /test/cases
parenta35b366eb64272c6d4646aedc035a837ed0c3cb0 (diff)
downloadzig-ac4d55dec1e32ddef945bfa246eb78f20f31ec44.tar.gz
zig-ac4d55dec1e32ddef945bfa246eb78f20f31ec44.zip
behavior tests passing with new pointer deref syntax
Diffstat (limited to 'test/cases')
-rw-r--r--test/cases/cast.zig6
-rw-r--r--test/cases/generics.zig2
2 files changed, 4 insertions, 4 deletions
diff --git a/test/cases/cast.zig b/test/cases/cast.zig
index 547cca5797..8b6afb4310 100644
--- a/test/cases/cast.zig
+++ b/test/cases/cast.zig
@@ -14,7 +14,7 @@ test "integer literal to pointer cast" {
}
test "pointer reinterpret const float to int" {
- const float: f64 = 5.99999999999994648725e - 01;
+ const float: f64 = 5.99999999999994648725e-01;
const float_ptr = &float;
const int_ptr = @ptrCast(&const i32, float_ptr);
const int_val = int_ptr.*;
@@ -121,13 +121,13 @@ test "implicitly cast indirect pointer to maybe-indirect pointer" {
return (p.*).x;
}
fn maybeConstConst(p: ?&const &const Self) u8 {
- return (??p.*).x;
+ return ((??p).*).x;
}
fn constConstConst(p: &const &const &const Self) u8 {
return (p.*.*).x;
}
fn maybeConstConstConst(p: ?&const &const &const Self) u8 {
- return (??p.*.*).x;
+ return ((??p).*.*).x;
}
};
const s = S {
diff --git a/test/cases/generics.zig b/test/cases/generics.zig
index da8a7dcad6..3fb33d0495 100644
--- a/test/cases/generics.zig
+++ b/test/cases/generics.zig
@@ -127,7 +127,7 @@ test "generic fn with implicit cast" {
}) == 0);
}
fn getByte(ptr: ?&const u8) u8 {
- return ??ptr.*;
+ return (??ptr).*;
}
fn getFirstByte(comptime T: type, mem: []const T) u8 {
return getByte(@ptrCast(&const u8, &mem[0]));