diff options
| author | Jacob Young <jacobly0@users.noreply.github.com> | 2023-10-22 08:06:47 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-22 08:06:47 -0400 |
| commit | 0c99ba1eab63865592bb084feb271cd4e4b0357e (patch) | |
| tree | 7004c99fc0619ff94317cc176900d1d3a3c88335 /lib/std/http/Client.zig | |
| parent | 5f92b070bf284f1493b1b5d433dd3adde2f46727 (diff) | |
| parent | 920e9668ddb16fbb98cd08b43ed2364062a4b102 (diff) | |
| download | zig-0c99ba1eab63865592bb084feb271cd4e4b0357e.tar.gz zig-0c99ba1eab63865592bb084feb271cd4e4b0357e.zip | |
Merge pull request #17637 from jacobly0/x86_64-test-std
x86_64: start to enable `test-std` and `test-compiler-rt` testing
Diffstat (limited to 'lib/std/http/Client.zig')
| -rw-r--r-- | lib/std/http/Client.zig | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/std/http/Client.zig b/lib/std/http/Client.zig index 9e475df51b..1e244af15e 100644 --- a/lib/std/http/Client.zig +++ b/lib/std/http/Client.zig @@ -1,6 +1,7 @@ //! Connecting and opening requests are threadsafe. Individual requests are not. const std = @import("../std.zig"); +const builtin = @import("builtin"); const testing = std.testing; const http = std.http; const mem = std.mem; @@ -427,6 +428,8 @@ pub const Response = struct { } test parseInt3 { + if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; + const expectEqual = testing.expectEqual; try expectEqual(@as(u10, 0), parseInt3("000".*)); try expectEqual(@as(u10, 418), parseInt3("418".*)); @@ -585,7 +588,7 @@ pub const Request = struct { if (!req.headers.contains("user-agent")) { try w.writeAll("User-Agent: zig/"); - try w.writeAll(@import("builtin").zig_version_string); + try w.writeAll(builtin.zig_version_string); try w.writeAll(" (std.http)\r\n"); } @@ -1249,7 +1252,6 @@ pub fn fetch(client: *Client, allocator: Allocator, options: FetchOptions) !Fetc } test { - const builtin = @import("builtin"); const native_endian = comptime builtin.cpu.arch.endian(); if (builtin.zig_backend == .stage2_llvm and native_endian == .Big) { // https://github.com/ziglang/zig/issues/13782 @@ -1258,5 +1260,7 @@ test { if (builtin.os.tag == .wasi) return error.SkipZigTest; + if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; + std.testing.refAllDecls(@This()); } |
