zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 3f1c51ca906719fe2a064a73295ada230e34f1c2 (tree)
parent 08a8aa100d73bd87e6c39563d8f5c6186217afb3
Author: Jacob Young <jacobly0@users.noreply.github.com>
Date:   Fri, 21 Apr 2023 20:46:05 -0400

std: remove names from incorrectly named tests

Tests that only reference decls for the purpose of analyzing more tests
should be unnamed, otherwise trying to filter for just a referenced test
can become impossible depending on the names.

Diffstat:
Mlib/std/Thread.zig | 2+-
Mlib/std/atomic.zig | 2+-
Mlib/std/crypto/pcurves/p256.zig | 2+-
Mlib/std/crypto/pcurves/p384.zig | 2+-
Mlib/std/crypto/pcurves/secp256k1.zig | 2+-
Mlib/std/hash.zig | 2+-
Mlib/std/math/complex.zig | 2+-
Mlib/std/meta.zig | 2+-
8 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/lib/std/Thread.zig b/lib/std/Thread.zig @@ -1141,7 +1141,7 @@ test "setName, getName" { thread.join(); } -test "std.Thread" { +test { // Doesn't use testing.refAllDecls() since that would pull in the compileError spinLoopHint. _ = Futex; _ = ResetEvent; diff --git a/lib/std/atomic.zig b/lib/std/atomic.zig @@ -7,7 +7,7 @@ pub const Stack = @import("atomic/stack.zig").Stack; pub const Queue = @import("atomic/queue.zig").Queue; pub const Atomic = @import("atomic/Atomic.zig").Atomic; -test "std.atomic" { +test { _ = @import("atomic/stack.zig"); _ = @import("atomic/queue.zig"); _ = @import("atomic/Atomic.zig"); diff --git a/lib/std/crypto/pcurves/p256.zig b/lib/std/crypto/pcurves/p256.zig @@ -473,6 +473,6 @@ pub const AffineCoordinates = struct { } }; -test "p256" { +test { _ = @import("tests/p256.zig"); } diff --git a/lib/std/crypto/pcurves/p384.zig b/lib/std/crypto/pcurves/p384.zig @@ -473,7 +473,7 @@ pub const AffineCoordinates = struct { } }; -test "p384" { +test { if (@import("builtin").zig_backend == .stage2_c) return error.SkipZigTest; _ = @import("tests/p384.zig"); diff --git a/lib/std/crypto/pcurves/secp256k1.zig b/lib/std/crypto/pcurves/secp256k1.zig @@ -551,7 +551,7 @@ pub const AffineCoordinates = struct { } }; -test "secp256k1" { +test { if (@import("builtin").zig_backend == .stage2_c) return error.SkipZigTest; _ = @import("tests/secp256k1.zig"); diff --git a/lib/std/hash.zig b/lib/std/hash.zig @@ -36,7 +36,7 @@ const xxhash = @import("hash/xxhash.zig"); pub const XxHash64 = xxhash.XxHash64; pub const XxHash32 = xxhash.XxHash32; -test "hash" { +test { _ = adler; _ = auto_hash; _ = crc; diff --git a/lib/std/math/complex.zig b/lib/std/math/complex.zig @@ -189,7 +189,7 @@ test "complex.magnitude" { try testing.expect(math.approxEqAbs(f32, c, 5.83095, epsilon)); } -test "complex.cmath" { +test { _ = @import("complex/abs.zig"); _ = @import("complex/acosh.zig"); _ = @import("complex/acos.zig"); diff --git a/lib/std/meta.zig b/lib/std/meta.zig @@ -10,7 +10,7 @@ pub const TrailerFlags = @import("meta/trailer_flags.zig").TrailerFlags; const Type = std.builtin.Type; -test "std.meta.TrailerFlags" { +test { _ = TrailerFlags; }