| author | |
| committer | |
| log | c08b190c6918b33d27ceffe1ab3afd5d7f6370ea |
| tree | 6dac2ac254e704b2c984f5135c98cd0fd85d4b15 |
| parent | 7f4fdcc4fce79cc1277c2a89a6a4136293c1b2e5 |
| signature |
29 files changed, 81 insertions(+), 67 deletions(-)
lib/std/hash.zig+7-7| ... | ... | @@ -33,11 +33,11 @@ const wyhash = @import("hash/wyhash.zig"); |
| 33 | 33 | pub const Wyhash = wyhash.Wyhash; |
| 34 | 34 | |
| 35 | 35 | test "hash" { |
| 36 | _ = @import("hash/adler.zig"); | |
| 37 | _ = @import("hash/auto_hash.zig"); | |
| 38 | _ = @import("hash/crc.zig"); | |
| 39 | _ = @import("hash/fnv.zig"); | |
| 40 | _ = @import("hash/murmur.zig"); | |
| 41 | _ = @import("hash/cityhash.zig"); | |
| 42 | _ = @import("hash/wyhash.zig"); | |
| 36 | _ = adler; | |
| 37 | _ = auto_hash; | |
| 38 | _ = crc; | |
| 39 | _ = fnv; | |
| 40 | _ = murmur; | |
| 41 | _ = cityhash; | |
| 42 | _ = wyhash; | |
| 43 | 43 | } |
lib/std/special/compiler_rt/int.zig+4-3| ... | ... | @@ -1,8 +1,9 @@ |
| 1 | 1 | // Builtin functions that operate on integer types |
| 2 | 2 | const builtin = @import("builtin"); |
| 3 | const testing = @import("std").testing; | |
| 4 | const maxInt = @import("std").math.maxInt; | |
| 5 | const minInt = @import("std").math.minInt; | |
| 3 | const std = @import("std"); | |
| 4 | const testing = std.testing; | |
| 5 | const maxInt = std.math.maxInt; | |
| 6 | const minInt = std.math.minInt; | |
| 6 | 7 | |
| 7 | 8 | const udivmod = @import("udivmod.zig").udivmod; |
| 8 | 9 |
lib/std/special/compiler_rt/multi3.zig+1-1| ... | ... | @@ -17,7 +17,7 @@ pub fn __multi3(a: i128, b: i128) callconv(.C) i128 { |
| 17 | 17 | return r.all; |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | const v128 = @import("std").meta.Vector(2, u64); | |
| 20 | const v128 = std.meta.Vector(2, u64); | |
| 21 | 21 | pub fn __multi3_windows_x86_64(a: v128, b: v128) callconv(.C) v128 { |
| 22 | 22 | return @bitCast(v128, @call(.{ .modifier = .always_inline }, __multi3, .{ |
| 23 | 23 | @bitCast(i128, a), |
lib/std/special/compiler_rt/negsi2_test.zig+3-2| ... | ... | @@ -1,7 +1,8 @@ |
| 1 | const std = @import("std"); | |
| 1 | 2 | const neg = @import("negXi2.zig"); |
| 2 | const testing = @import("std").testing; | |
| 3 | const testing = std.testing; | |
| 3 | 4 | |
| 4 | const print = @import("std").debug.print; | |
| 5 | const print = std.debug.print; | |
| 5 | 6 | |
| 6 | 7 | fn test__negsi2(a: i32, expected: i32) !void { |
| 7 | 8 | var result = neg.__negsi2(a); |
lib/std/special/compiler_rt/paritydi2_test.zig+3-2| ... | ... | @@ -1,5 +1,6 @@ |
| 1 | const std = @import("std"); | |
| 1 | 2 | const parity = @import("parity.zig"); |
| 2 | const testing = @import("std").testing; | |
| 3 | const testing = std.testing; | |
| 3 | 4 | |
| 4 | 5 | fn paritydi2Naive(a: i64) i32 { |
| 5 | 6 | var x = @bitCast(u64, a); |
| ... | ... | @@ -25,7 +26,7 @@ test "paritydi2" { |
| 25 | 26 | try test__paritydi2(@bitCast(i64, @as(u64, 0xffffffff_fffffffe))); |
| 26 | 27 | try test__paritydi2(@bitCast(i64, @as(u64, 0xffffffff_ffffffff))); |
| 27 | 28 | |
| 28 | const RndGen = @import("std").rand.DefaultPrng; | |
| 29 | const RndGen = std.rand.DefaultPrng; | |
| 29 | 30 | var rnd = RndGen.init(42); |
| 30 | 31 | var i: u32 = 0; |
| 31 | 32 | while (i < 10_000) : (i += 1) { |
lib/std/special/compiler_rt/paritysi2_test.zig+3-2| ... | ... | @@ -1,5 +1,6 @@ |
| 1 | const std = @import("std"); | |
| 1 | 2 | const parity = @import("parity.zig"); |
| 2 | const testing = @import("std").testing; | |
| 3 | const testing = std.testing; | |
| 3 | 4 | |
| 4 | 5 | fn paritysi2Naive(a: i32) i32 { |
| 5 | 6 | var x = @bitCast(u32, a); |
| ... | ... | @@ -25,7 +26,7 @@ test "paritysi2" { |
| 25 | 26 | try test__paritysi2(@bitCast(i32, @as(u32, 0xfffffffe))); |
| 26 | 27 | try test__paritysi2(@bitCast(i32, @as(u32, 0xffffffff))); |
| 27 | 28 | |
| 28 | const RndGen = @import("std").rand.DefaultPrng; | |
| 29 | const RndGen = std.rand.DefaultPrng; | |
| 29 | 30 | var rnd = RndGen.init(42); |
| 30 | 31 | var i: u32 = 0; |
| 31 | 32 | while (i < 10_000) : (i += 1) { |
lib/std/special/compiler_rt/parityti2_test.zig+3-2| ... | ... | @@ -1,5 +1,6 @@ |
| 1 | const std = @import("std"); | |
| 1 | 2 | const parity = @import("parity.zig"); |
| 2 | const testing = @import("std").testing; | |
| 3 | const testing = std.testing; | |
| 3 | 4 | |
| 4 | 5 | fn parityti2Naive(a: i128) i32 { |
| 5 | 6 | var x = @bitCast(u128, a); |
| ... | ... | @@ -25,7 +26,7 @@ test "parityti2" { |
| 25 | 26 | try test__parityti2(@bitCast(i128, @as(u128, 0xffffffff_ffffffff_ffffffff_fffffffe))); |
| 26 | 27 | try test__parityti2(@bitCast(i128, @as(u128, 0xffffffff_ffffffff_ffffffff_ffffffff))); |
| 27 | 28 | |
| 28 | const RndGen = @import("std").rand.DefaultPrng; | |
| 29 | const RndGen = std.rand.DefaultPrng; | |
| 29 | 30 | var rnd = RndGen.init(42); |
| 30 | 31 | var i: u32 = 0; |
| 31 | 32 | while (i < 10_000) : (i += 1) { |
lib/std/special/compiler_rt/popcountdi2_test.zig+3-2| ... | ... | @@ -1,5 +1,6 @@ |
| 1 | const std = @import("std"); | |
| 1 | 2 | const popcount = @import("popcount.zig"); |
| 2 | const testing = @import("std").testing; | |
| 3 | const testing = std.testing; | |
| 3 | 4 | |
| 4 | 5 | fn popcountdi2Naive(a: i64) i32 { |
| 5 | 6 | var x = a; |
| ... | ... | @@ -24,7 +25,7 @@ test "popcountdi2" { |
| 24 | 25 | try test__popcountdi2(@bitCast(i64, @as(u64, 0xffffffff_fffffffe))); |
| 25 | 26 | try test__popcountdi2(@bitCast(i64, @as(u64, 0xffffffff_ffffffff))); |
| 26 | 27 | |
| 27 | const RndGen = @import("std").rand.DefaultPrng; | |
| 28 | const RndGen = std.rand.DefaultPrng; | |
| 28 | 29 | var rnd = RndGen.init(42); |
| 29 | 30 | var i: u32 = 0; |
| 30 | 31 | while (i < 10_000) : (i += 1) { |
lib/std/special/compiler_rt/popcountsi2_test.zig+3-2| ... | ... | @@ -1,5 +1,6 @@ |
| 1 | const std = @import("std"); | |
| 1 | 2 | const popcount = @import("popcount.zig"); |
| 2 | const testing = @import("std").testing; | |
| 3 | const testing = std.testing; | |
| 3 | 4 | |
| 4 | 5 | fn popcountsi2Naive(a: i32) i32 { |
| 5 | 6 | var x = a; |
| ... | ... | @@ -24,7 +25,7 @@ test "popcountsi2" { |
| 24 | 25 | try test__popcountsi2(@bitCast(i32, @as(u32, 0xfffffffe))); |
| 25 | 26 | try test__popcountsi2(@bitCast(i32, @as(u32, 0xffffffff))); |
| 26 | 27 | |
| 27 | const RndGen = @import("std").rand.DefaultPrng; | |
| 28 | const RndGen = std.rand.DefaultPrng; | |
| 28 | 29 | var rnd = RndGen.init(42); |
| 29 | 30 | var i: u32 = 0; |
| 30 | 31 | while (i < 10_000) : (i += 1) { |
lib/std/special/compiler_rt/popcountti2_test.zig+3-2| ... | ... | @@ -1,5 +1,6 @@ |
| 1 | const std = @import("std"); | |
| 1 | 2 | const popcount = @import("popcount.zig"); |
| 2 | const testing = @import("std").testing; | |
| 3 | const testing = std.testing; | |
| 3 | 4 | |
| 4 | 5 | fn popcountti2Naive(a: i128) i32 { |
| 5 | 6 | var x = a; |
| ... | ... | @@ -24,7 +25,7 @@ test "popcountti2" { |
| 24 | 25 | try test__popcountti2(@bitCast(i128, @as(u128, 0xffffffff_ffffffff_ffffffff_fffffffe))); |
| 25 | 26 | try test__popcountti2(@bitCast(i128, @as(u128, 0xffffffff_ffffffff_ffffffff_ffffffff))); |
| 26 | 27 | |
| 27 | const RndGen = @import("std").rand.DefaultPrng; | |
| 28 | const RndGen = std.rand.DefaultPrng; | |
| 28 | 29 | var rnd = RndGen.init(42); |
| 29 | 30 | var i: u32 = 0; |
| 30 | 31 | while (i < 10_000) : (i += 1) { |
lib/std/special/compiler_rt/truncXfYf2_test.zig+3-2| ... | ... | @@ -1,3 +1,4 @@ |
| 1 | const std = @import("std"); | |
| 1 | 2 | const __truncsfhf2 = @import("truncXfYf2.zig").__truncsfhf2; |
| 2 | 3 | |
| 3 | 4 | fn test__truncsfhf2(a: u32, expected: u16) !void { |
| ... | ... | @@ -217,7 +218,7 @@ fn test__truncdfsf2(a: f64, expected: u32) void { |
| 217 | 218 | } |
| 218 | 219 | } |
| 219 | 220 | |
| 220 | @import("std").debug.print("got 0x{x} wanted 0x{x}\n", .{ rep, expected }); | |
| 221 | std.debug.print("got 0x{x} wanted 0x{x}\n", .{ rep, expected }); | |
| 221 | 222 | |
| 222 | 223 | @panic("__trunctfsf2 test failure"); |
| 223 | 224 | } |
| ... | ... | @@ -248,7 +249,7 @@ fn test__trunctfhf2(a: f128, expected: u16) void { |
| 248 | 249 | return; |
| 249 | 250 | } |
| 250 | 251 | |
| 251 | @import("std").debug.print("got 0x{x} wanted 0x{x}\n", .{ rep, expected }); | |
| 252 | std.debug.print("got 0x{x} wanted 0x{x}\n", .{ rep, expected }); | |
| 252 | 253 | |
| 253 | 254 | @panic("__trunctfhf2 test failure"); |
| 254 | 255 | } |
lib/std/special/compiler_rt/udivmod.zig+4-3| ... | ... | @@ -1,6 +1,7 @@ |
| 1 | 1 | const builtin = @import("builtin"); |
| 2 | 2 | const is_test = builtin.is_test; |
| 3 | 3 | const native_endian = builtin.cpu.arch.endian(); |
| 4 | const std = @import("std"); | |
| 4 | 5 | |
| 5 | 6 | const low = switch (native_endian) { |
| 6 | 7 | .Big => 1, |
| ... | ... | @@ -13,9 +14,9 @@ pub fn udivmod(comptime DoubleInt: type, a: DoubleInt, b: DoubleInt, maybe_rem: |
| 13 | 14 | |
| 14 | 15 | const double_int_bits = @typeInfo(DoubleInt).Int.bits; |
| 15 | 16 | const single_int_bits = @divExact(double_int_bits, 2); |
| 16 | const SingleInt = @import("std").meta.Int(.unsigned, single_int_bits); | |
| 17 | const SignedDoubleInt = @import("std").meta.Int(.signed, double_int_bits); | |
| 18 | const Log2SingleInt = @import("std").math.Log2Int(SingleInt); | |
| 17 | const SingleInt = std.meta.Int(.unsigned, single_int_bits); | |
| 18 | const SignedDoubleInt = std.meta.Int(.signed, double_int_bits); | |
| 19 | const Log2SingleInt = std.math.Log2Int(SingleInt); | |
| 19 | 20 | |
| 20 | 21 | const n = @ptrCast(*const [2]SingleInt, &a).*; // TODO issue #421 |
| 21 | 22 | const d = @ptrCast(*const [2]SingleInt, &b).*; // TODO issue #421 |
lib/std/time.zig+1-1| ... | ... | @@ -287,5 +287,5 @@ test "Timer" { |
| 287 | 287 | } |
| 288 | 288 | |
| 289 | 289 | test { |
| 290 | _ = @import("time/epoch.zig"); | |
| 290 | _ = epoch; | |
| 291 | 291 | } |
lib/std/valgrind.zig+2-2| ... | ... | @@ -258,6 +258,6 @@ pub const memcheck = @import("valgrind/memcheck.zig"); |
| 258 | 258 | pub const callgrind = @import("valgrind/callgrind.zig"); |
| 259 | 259 | |
| 260 | 260 | test { |
| 261 | _ = @import("valgrind/memcheck.zig"); | |
| 262 | _ = @import("valgrind/callgrind.zig"); | |
| 261 | _ = memcheck; | |
| 262 | _ = callgrind; | |
| 263 | 263 | } |
lib/std/zig/system/darwin.zig+1-1| ... | ... | @@ -88,5 +88,5 @@ pub const DarwinSDK = struct { |
| 88 | 88 | }; |
| 89 | 89 | |
| 90 | 90 | test "" { |
| 91 | _ = @import("darwin/macos.zig"); | |
| 91 | _ = macos; | |
| 92 | 92 | } |
src/Compilation.zig+3-2| ... | ... | @@ -34,6 +34,7 @@ const ThreadPool = @import("ThreadPool.zig"); |
| 34 | 34 | const WaitGroup = @import("WaitGroup.zig"); |
| 35 | 35 | const libtsan = @import("libtsan.zig"); |
| 36 | 36 | const Zir = @import("Zir.zig"); |
| 37 | const Color = @import("main.zig").Color; | |
| 37 | 38 | |
| 38 | 39 | /// General-purpose allocator. Used for both temporary and long-term storage. |
| 39 | 40 | gpa: Allocator, |
| ... | ... | @@ -148,7 +149,7 @@ owned_link_dir: ?std.fs.Dir, |
| 148 | 149 | |
| 149 | 150 | /// This is for stage1 and should be deleted upon completion of self-hosting. |
| 150 | 151 | /// Don't use this for anything other than stage1 compatibility. |
| 151 | color: @import("main.zig").Color = .auto, | |
| 152 | color: Color = .auto, | |
| 152 | 153 | |
| 153 | 154 | /// This mutex guards all `Compilation` mutable state. |
| 154 | 155 | mutex: std.Thread.Mutex = .{}, |
| ... | ... | @@ -790,7 +791,7 @@ pub const InitOptions = struct { |
| 790 | 791 | machine_code_model: std.builtin.CodeModel = .default, |
| 791 | 792 | clang_preprocessor_mode: ClangPreprocessorMode = .no, |
| 792 | 793 | /// This is for stage1 and should be deleted upon completion of self-hosting. |
| 793 | color: @import("main.zig").Color = .auto, | |
| 794 | color: Color = .auto, | |
| 794 | 795 | test_filter: ?[]const u8 = null, |
| 795 | 796 | test_name_prefix: ?[]const u8 = null, |
| 796 | 797 | subsystem: ?std.Target.SubSystem = null, |
src/mingw.zig+1-1| ... | ... | @@ -408,7 +408,7 @@ pub fn buildImportLib(comp: *Compilation, lib_name: []const u8) !void { |
| 408 | 408 | errdefer comp.gpa.free(lib_final_path); |
| 409 | 409 | |
| 410 | 410 | const llvm = @import("codegen/llvm/bindings.zig"); |
| 411 | const arch_type = @import("target.zig").archToLLVM(target.cpu.arch); | |
| 411 | const arch_type = target_util.archToLLVM(target.cpu.arch); | |
| 412 | 412 | const def_final_path_z = try arena.dupeZ(u8, def_final_path); |
| 413 | 413 | const lib_final_path_z = try arena.dupeZ(u8, lib_final_path); |
| 414 | 414 | if (llvm.WriteImportLibrary(def_final_path_z.ptr, arch_type, lib_final_path_z.ptr, true)) { |
src/tracy.zig+4-3| ... | ... | @@ -1,9 +1,10 @@ |
| 1 | 1 | const std = @import("std"); |
| 2 | 2 | const builtin = @import("builtin"); |
| 3 | const build_options = @import("build_options"); | |
| 3 | 4 | |
| 4 | pub const enable = if (builtin.is_test) false else @import("build_options").enable_tracy; | |
| 5 | pub const enable_allocation = enable and @import("build_options").enable_tracy_allocation; | |
| 6 | pub const enable_callstack = enable and @import("build_options").enable_tracy_callstack; | |
| 5 | pub const enable = if (builtin.is_test) false else build_options.enable_tracy; | |
| 6 | pub const enable_allocation = enable and build_options.enable_tracy_allocation; | |
| 7 | pub const enable_callstack = enable and build_options.enable_tracy_callstack; | |
| 7 | 8 | |
| 8 | 9 | // TODO: make this configurable |
| 9 | 10 | const callstack_depth = 10; |
src/translate_c.zig+2-2| ... | ... | @@ -820,7 +820,7 @@ fn visitVarDecl(c: *Context, var_decl: *const clang.VarDecl, mangled_name: ?[]co |
| 820 | 820 | // The C language specification states that variables with static or threadlocal |
| 821 | 821 | // storage without an initializer are initialized to a zero value. |
| 822 | 822 | |
| 823 | // @import("std").mem.zeroes(T) | |
| 823 | // std.mem.zeroes(T) | |
| 824 | 824 | init_node = try Tag.std_mem_zeroes.create(c.arena, type_node); |
| 825 | 825 | } |
| 826 | 826 | |
| ... | ... | @@ -5211,7 +5211,7 @@ const MacroSlicer = struct { |
| 5211 | 5211 | // mapped function exists in `std.zig.c_translation.Macros` |
| 5212 | 5212 | test "Macro matching" { |
| 5213 | 5213 | const helper = struct { |
| 5214 | const MacroFunctions = @import("std").zig.c_translation.Macros; | |
| 5214 | const MacroFunctions = std.zig.c_translation.Macros; | |
| 5215 | 5215 | fn checkMacro(allocator: mem.Allocator, pattern_list: PatternList, source: []const u8, comptime expected_match: ?[]const u8) !void { |
| 5216 | 5216 | var tok_list = std.ArrayList(CToken).init(allocator); |
| 5217 | 5217 | defer tok_list.deinit(); |
test/behavior/cast.zig+2-4| ... | ... | @@ -2,6 +2,7 @@ const std = @import("std"); |
| 2 | 2 | const expect = std.testing.expect; |
| 3 | 3 | const mem = std.mem; |
| 4 | 4 | const maxInt = std.math.maxInt; |
| 5 | const builtin = @import("builtin"); | |
| 5 | 6 | |
| 6 | 7 | test "int to ptr cast" { |
| 7 | 8 | const x = @as(usize, 13); |
| ... | ... | @@ -252,10 +253,7 @@ test "array coersion to undefined at runtime" { |
| 252 | 253 | @setRuntimeSafety(true); |
| 253 | 254 | |
| 254 | 255 | // TODO implement @setRuntimeSafety in stage2 |
| 255 | if (@import("builtin").zig_is_stage2 and | |
| 256 | @import("builtin").mode != .Debug and | |
| 257 | @import("builtin").mode != .ReleaseSafe) | |
| 258 | { | |
| 256 | if (builtin.zig_is_stage2 and builtin.mode != .Debug and builtin.mode != .ReleaseSafe) { | |
| 259 | 257 | return error.SkipZigTest; |
| 260 | 258 | } |
| 261 | 259 |
test/behavior/enum_stage1.zig+4-3| ... | ... | @@ -1,6 +1,7 @@ |
| 1 | const expect = @import("std").testing.expect; | |
| 2 | const mem = @import("std").mem; | |
| 3 | const Tag = @import("std").meta.Tag; | |
| 1 | const std = @import("std"); | |
| 2 | const expect = std.testing.expect; | |
| 3 | const mem = std.mem; | |
| 4 | const Tag = std.meta.Tag; | |
| 4 | 5 | |
| 5 | 6 | test "enum value allocation" { |
| 6 | 7 | const LargeEnum = enum(u32) { |
test/behavior/import.zig+3-2| ... | ... | @@ -1,5 +1,6 @@ |
| 1 | const expect = @import("std").testing.expect; | |
| 2 | const expectEqual = @import("std").testing.expectEqual; | |
| 1 | const std = @import("std"); | |
| 2 | const expect = std.testing.expect; | |
| 3 | const expectEqual = std.testing.expectEqual; | |
| 3 | 4 | const a_namespace = @import("import/a_namespace.zig"); |
| 4 | 5 | |
| 5 | 6 | test "call fn via namespace lookup" { |
test/behavior/int128.zig+2-4| ... | ... | @@ -2,6 +2,7 @@ const std = @import("std"); |
| 2 | 2 | const expect = std.testing.expect; |
| 3 | 3 | const maxInt = std.math.maxInt; |
| 4 | 4 | const minInt = std.math.minInt; |
| 5 | const builtin = @import("builtin"); | |
| 5 | 6 | |
| 6 | 7 | test "uint128" { |
| 7 | 8 | var buff: u128 = maxInt(u128); |
| ... | ... | @@ -21,10 +22,7 @@ test "undefined 128 bit int" { |
| 21 | 22 | @setRuntimeSafety(true); |
| 22 | 23 | |
| 23 | 24 | // TODO implement @setRuntimeSafety in stage2 |
| 24 | if (@import("builtin").zig_is_stage2 and | |
| 25 | @import("builtin").mode != .Debug and | |
| 26 | @import("builtin").mode != .ReleaseSafe) | |
| 27 | { | |
| 25 | if (builtin.zig_is_stage2 and builtin.mode != .Debug and builtin.mode != .ReleaseSafe) { | |
| 28 | 26 | return error.SkipZigTest; |
| 29 | 27 | } |
| 30 | 28 |
test/behavior/ref_var_in_if_after_if_2nd_switch_prong.zig+3-2| ... | ... | @@ -1,5 +1,6 @@ |
| 1 | const expect = @import("std").testing.expect; | |
| 2 | const mem = @import("std").mem; | |
| 1 | const std = @import("std"); | |
| 2 | const expect = std.testing.expect; | |
| 3 | const mem = std.mem; | |
| 3 | 4 | |
| 4 | 5 | var ok: bool = false; |
| 5 | 6 | test "reference a variable in an if after an if in the 2nd switch prong" { |
test/behavior/reflection.zig+3-2| ... | ... | @@ -1,5 +1,6 @@ |
| 1 | const expect = @import("std").testing.expect; | |
| 2 | const mem = @import("std").mem; | |
| 1 | const std = @import("std"); | |
| 2 | const expect = std.testing.expect; | |
| 3 | const mem = std.mem; | |
| 3 | 4 | const reflection = @This(); |
| 4 | 5 | |
| 5 | 6 | test "reflection: function return type, var args, and param types" { |
test/behavior/translate_c_macros.zig+3-2| ... | ... | @@ -1,5 +1,6 @@ |
| 1 | const expect = @import("std").testing.expect; | |
| 2 | const expectEqual = @import("std").testing.expectEqual; | |
| 1 | const std = @import("std"); | |
| 2 | const expect = std.testing.expect; | |
| 3 | const expectEqual = std.testing.expectEqual; | |
| 3 | 4 | |
| 4 | 5 | const h = @cImport(@cInclude("behavior/translate_c_macros.h")); |
| 5 | 6 |
test/behavior/translate_c_macros_stage1.zig+3-2| ... | ... | @@ -1,5 +1,6 @@ |
| 1 | const expect = @import("std").testing.expect; | |
| 2 | const expectEqual = @import("std").testing.expectEqual; | |
| 1 | const std = @import("std"); | |
| 2 | const expect = std.testing.expect; | |
| 3 | const expectEqual = std.testing.expectEqual; | |
| 3 | 4 | |
| 4 | 5 | const h = @cImport(@cInclude("behavior/translate_c_macros.h")); |
| 5 | 6 |
test/behavior/widening.zig+3-2| ... | ... | @@ -1,6 +1,7 @@ |
| 1 | 1 | const std = @import("std"); |
| 2 | 2 | const expect = std.testing.expect; |
| 3 | 3 | const mem = std.mem; |
| 4 | const builtin = @import("builtin"); | |
| 4 | 5 | |
| 5 | 6 | test "integer widening" { |
| 6 | 7 | var a: u8 = 250; |
| ... | ... | @@ -30,8 +31,8 @@ test "float widening" { |
| 30 | 31 | |
| 31 | 32 | test "float widening f16 to f128" { |
| 32 | 33 | // TODO https://github.com/ziglang/zig/issues/3282 |
| 33 | if (@import("builtin").cpu.arch == .aarch64) return error.SkipZigTest; | |
| 34 | if (@import("builtin").cpu.arch == .powerpc64le) return error.SkipZigTest; | |
| 34 | if (builtin.cpu.arch == .aarch64) return error.SkipZigTest; | |
| 35 | if (builtin.cpu.arch == .powerpc64le) return error.SkipZigTest; | |
| 35 | 36 | |
| 36 | 37 | var x: f16 = 12.34; |
| 37 | 38 | var y: f128 = x; |
test/standalone/install_raw_hex/build.zig+1-2| ... | ... | @@ -1,9 +1,8 @@ |
| 1 | const Builder = @import("std").build.Builder; | |
| 2 | 1 | const builtin = @import("builtin"); |
| 3 | 2 | const std = @import("std"); |
| 4 | 3 | const CheckFileStep = std.build.CheckFileStep; |
| 5 | 4 | |
| 6 | pub fn build(b: *Builder) void { | |
| 5 | pub fn build(b: *std.build.Builder) void { | |
| 7 | 6 | const target = .{ |
| 8 | 7 | .cpu_arch = .thumb, |
| 9 | 8 | .cpu_model = .{ .explicit = &std.Target.arm.cpu.cortex_m4 }, |