aboutsummaryrefslogtreecommitdiff
path: root/test/behavior/floatop.zig
diff options
context:
space:
mode:
authorEric Joldasov <bratishkaerik@getgoogleoff.me>2023-06-15 13:14:16 +0600
committerAndrew Kelley <andrew@ziglang.org>2023-06-19 12:34:42 -0700
commit50339f595aa6ec96760b1cd9f8d0e0bfc3f167fc (patch)
tree9e2b95d8e111e905e00511962dfd32c8e5bb3245 /test/behavior/floatop.zig
parenta6c8ee5231230947c928bbe1c6a39eb6e1bb9c5b (diff)
downloadzig-50339f595aa6ec96760b1cd9f8d0e0bfc3f167fc.tar.gz
zig-50339f595aa6ec96760b1cd9f8d0e0bfc3f167fc.zip
all: zig fmt and rename "@XToY" to "@YFromX"
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
Diffstat (limited to 'test/behavior/floatop.zig')
-rw-r--r--test/behavior/floatop.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/behavior/floatop.zig b/test/behavior/floatop.zig
index 15033d5515..56f3885a4a 100644
--- a/test/behavior/floatop.zig
+++ b/test/behavior/floatop.zig
@@ -89,12 +89,12 @@ fn testDifferentSizedFloatComparisons() !void {
// }
//}
-test "negative f128 floatToInt at compile-time" {
+test "negative f128 intFromFloat at compile-time" {
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
const a: f128 = -2;
- var b = @floatToInt(i64, a);
+ var b = @intFromFloat(i64, a);
try expect(@as(i64, -2) == b);
}