Change many test blocks to doctests/decltests

This commit is contained in:
Ryan Liptak
2024-02-26 15:14:43 -08:00
parent 16b3d1004e
commit 726a1149e0
51 changed files with 143 additions and 145 deletions

View File

@@ -132,7 +132,7 @@ test "float bits" {
}
}
test "inf" {
test inf {
const inf_u16: u16 = 0x7C00;
const inf_u32: u32 = 0x7F800000;
const inf_u64: u64 = 0x7FF0000000000000;
@@ -145,7 +145,7 @@ test "inf" {
try expectEqual(inf_u128, @as(u128, @bitCast(inf(f128))));
}
test "nan" {
test nan {
const qnan_u16: u16 = 0x7E00;
const qnan_u32: u32 = 0x7FC00000;
const qnan_u64: u64 = 0x7FF8000000000000;
@@ -158,7 +158,7 @@ test "nan" {
try expectEqual(qnan_u128, @as(u128, @bitCast(nan(f128))));
}
test "snan" {
test snan {
// TODO: https://github.com/ziglang/zig/issues/14366
if (builtin.zig_backend == .stage2_llvm and comptime builtin.cpu.arch.isArmOrThumb()) return error.SkipZigTest;