aboutsummaryrefslogtreecommitdiff
path: root/lib/std/testing.zig
AgeCommit message (Collapse)Author
2020-03-01short std.builtin enum literals in std libxackus
2020-02-28separate std.Target and std.zig.CrossTargetAndrew Kelley
Zig now supports a more fine-grained sense of what is native and what is not. Some examples: This is now allowed: -target native Different OS but native CPU, default Windows C ABI: -target native-windows This could be useful for example when running in Wine. Different CPU but native OS, native C ABI. -target x86_64-native -mcpu=skylake Different C ABI but otherwise native target: -target native-native-musl -target native-native-gnu Lots of breaking changes to related std lib APIs. Calls to getOs() will need to be changed to getOsTag(). Calls to getArch() will need to be changed to getCpuArch(). Usage of Target.Cross and Target.Native need to be updated to use CrossTarget API. `std.build.Builder.standardTargetOptions` is changed to accept its parameters as a struct with default values. It now has the ability to specify a whitelist of targets allowed, as well as the default target. Rather than two different ways of collecting the target, it's now always a string that is validated, and prints helpful diagnostics for invalid targets. This feature should now be actually useful, and contributions welcome to further improve the user experience. `std.build.LibExeObjStep.setTheTarget` is removed. `std.build.LibExeObjStep.setTarget` is updated to take a CrossTarget parameter. `std.build.LibExeObjStep.setTargetGLibC` is removed. glibc versions are handled in the CrossTarget API and can be specified with the `-target` triple. `std.builtin.Version` gains a `format` method.
2020-02-14std: increase memory available to testing allocatordaurnimator
2020-02-13Vector comparison in meta and testingdata-man
2020-01-30Convert a few more page_allocatorBenjamin Feng
2020-01-29Promoted "leak_count_allocator" to the main testing.allocatorBenjamin Feng
2020-01-29Move FailingAllocator to testingBenjamin Feng
2020-01-29Create leak_count_allocatorBenjamin Feng
2020-01-29Move debug.global_allocator to testing.allocatorBenjamin Feng
2019-12-29Fixes #3966data-man
2019-12-10Replace @typeOf with @TypeOf in all zig sourceRobin Voetter
This change was mostly made with `zig fmt` and this also modified some whitespace. Note that in some files, `zig fmt` produced incorrect code, so the change was made manually.
2019-12-09remove no-longer-needed workaround for var argsAndrew Kelley
See #557
2019-12-09remove var args from the languageAndrew Kelley
closes #208
2019-12-08std.fmt.format: tuple parameter instead of var argsAndrew Kelley
2019-11-27Implements std.testing.expectEqual for tagged unions. (#3773)Felix Queißner
2019-11-19std.testing.expectEqual: show differing pointer valuesJohan Bolmsjö
Show differing pointer values when comparing pointers instead of the content they point to. It's confusing for a test to say "expected S{.x = 1}, found S{.x = 1}" as illustrated below when it was the pointers that differed. There seems to be different rules for when a pointer is dereferenced by the printing routine depending on its type. I don't fully grok this but it's also illustrated below. const std = @import("std"); const S = struct { x: u32 }; // before: ...expected S{ .x = 1 }, found S{ .x = 1 } // after: ...expected S@7ffcd20b7798, found S@7ffcd20b7790 test "compare_ptr_to_struct" { var a = S{.x = 1}; var b = S{.x = 1}; std.testing.expectEqual(&a, &b); } // before: ...expected u32@7fff316ba31c, found u32@7fff316ba318 // after: ...expected u32@7ffecec622dc, found u32@7ffecec622d8 test "compare_ptr_to_scalar" { var a: u32 = 1; var b: u32 = 1; std.testing.expectEqual(&a, &b); }
2019-09-25mv std/ lib/Andrew Kelley
that's all this commit does. further commits will fix cli flags and such. see #2221