authorgravatar for r00ster91@proton.meWooster <r00ster91@proton.me> 2022-09-29 09:43:22+02:00
committergravatar for luuk@degram.devLuuk de Gram <luuk@degram.dev> 2022-09-29 21:40:25+02:00
logf6312e4b6933b8c8d163d6e6b20da135c5fa986a
treeb0d4b840557325af442ff0f68f33ffbc565dd13a
parentfda0b2c372c3e9ecc348a9cc4afc4e7afd966427

docs: minor improvements

Just some minor improvements when passing by.

1 files changed, 5 insertions(+), 5 deletions(-)

lib/std/testing.zig+5-5
......@@ -214,7 +214,7 @@ pub fn expectFmt(expected: []const u8, comptime template: []const u8, args: anyt
214214/// not approximately equal to the expected value, prints diagnostics to stderr
215215/// to show exactly how they are not equal, then returns a test failure error.
216216/// See `math.approxEqAbs` for more informations on the tolerance parameter.
217/// The types must be floating point
217/// The types must be floating point.
218218pub fn expectApproxEqAbs(expected: anytype, actual: @TypeOf(expected), tolerance: @TypeOf(expected)) !void {
219219 const T = @TypeOf(expected);
220220
......@@ -246,7 +246,7 @@ test "expectApproxEqAbs" {
246246/// not approximately equal to the expected value, prints diagnostics to stderr
247247/// to show exactly how they are not equal, then returns a test failure error.
248248/// See `math.approxEqRel` for more informations on the tolerance parameter.
249/// The types must be floating point
249/// The types must be floating point.
250250pub fn expectApproxEqRel(expected: anytype, actual: @TypeOf(expected), tolerance: @TypeOf(expected)) !void {
251251 const T = @TypeOf(expected);
252252
......@@ -719,7 +719,7 @@ pub fn checkAllAllocationFailures(backing_allocator: std.mem.Allocator, comptime
719719 }
720720}
721721
722/// Given a type, reference all the declarations inside, so that the semantic analyzer sees them.
722/// Given a type, references all the declarations inside, so that the semantic analyzer sees them.
723723pub fn refAllDecls(comptime T: type) void {
724724 if (!builtin.is_test) return;
725725 inline for (comptime std.meta.declarations(T)) |decl| {
......@@ -727,8 +727,8 @@ pub fn refAllDecls(comptime T: type) void {
727727 }
728728}
729729
730/// Given a type, and Recursively reference all the declarations inside, so that the semantic analyzer sees them.
731/// For deep types, you may use `@setEvalBranchQuota`
730/// Given a type, recursively references all the declarations inside, so that the semantic analyzer sees them.
731/// For deep types, you may use `@setEvalBranchQuota`.
732732pub fn refAllDeclsRecursive(comptime T: type) void {
733733 if (!builtin.is_test) return;
734734 inline for (comptime std.meta.declarations(T)) |decl| {