aboutsummaryrefslogtreecommitdiff
path: root/lib/std/testing.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-02-29 01:57:06 -0500
committerGitHub <noreply@github.com>2020-02-29 01:57:06 -0500
commit76176104001420ea04840f9b31e706289e4ebf11 (patch)
tree4ba46044adc883630a3452b33f9d70541581d7ae /lib/std/testing.zig
parent1b41f2d77ea14de27b0655a35a727d664cfc4ca4 (diff)
parent3cba603eae1a1c8b0338f5584041c73d55682c0a (diff)
downloadzig-76176104001420ea04840f9b31e706289e4ebf11.tar.gz
zig-76176104001420ea04840f9b31e706289e4ebf11.zip
Merge pull request #4550 from ziglang/os-version-ranges
introduce operating system version ranges as part of the target; self-host native dynamic linker detection and native glibc version detection
Diffstat (limited to 'lib/std/testing.zig')
-rw-r--r--lib/std/testing.zig10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/std/testing.zig b/lib/std/testing.zig
index 348f651a88..398a71ff37 100644
--- a/lib/std/testing.zig
+++ b/lib/std/testing.zig
@@ -1,5 +1,3 @@
-const builtin = @import("builtin");
-const TypeId = builtin.TypeId;
const std = @import("std.zig");
pub const LeakCountAllocator = @import("testing/leak_count_allocator.zig").LeakCountAllocator;
@@ -65,16 +63,16 @@ pub fn expectEqual(expected: var, actual: @TypeOf(expected)) void {
.Pointer => |pointer| {
switch (pointer.size) {
- builtin.TypeInfo.Pointer.Size.One,
- builtin.TypeInfo.Pointer.Size.Many,
- builtin.TypeInfo.Pointer.Size.C,
+ .One,
+ .Many,
+ .C,
=> {
if (actual != expected) {
std.debug.panic("expected {*}, found {*}", .{ expected, actual });
}
},
- builtin.TypeInfo.Pointer.Size.Slice => {
+ .Slice => {
if (actual.ptr != expected.ptr) {
std.debug.panic("expected slice ptr {}, found {}", .{ expected.ptr, actual.ptr });
}