suppress output on tests
This commit is contained in:
parent
821c084f70
commit
020fb2db77
1 changed files with 6 additions and 1 deletions
|
|
@ -3,6 +3,7 @@
|
|||
/// Takes portfolio allocations (with market values) and classification metadata,
|
||||
/// produces breakdowns by asset class, sector, geographic region, account, and tax type.
|
||||
const std = @import("std");
|
||||
const builtin = @import("builtin");
|
||||
const srf = @import("srf");
|
||||
const Allocation = @import("valuation.zig").Allocation;
|
||||
const ClassificationMap = @import("../models/classification.zig").ClassificationMap;
|
||||
|
|
@ -257,7 +258,11 @@ pub fn parseAccountsFile(allocator: std.mem.Allocator, data: []const u8) !Accoun
|
|||
// treat the account as unset so the audit uses its default.
|
||||
const lot_threshold: ?f64 = if (entry.audit_large_lot_threshold) |t| blk: {
|
||||
if (t > 0) break :blk t;
|
||||
log.warn("accounts.srf: account '{s}': audit_large_lot_threshold must be > 0 (got {d}); ignoring", .{ entry.account, t });
|
||||
// No-op under `zig build test`: the parser's own tests feed
|
||||
// invalid thresholds (0, negative) on purpose to verify they
|
||||
// are rejected, and the warn spam pollutes test output.
|
||||
if (!builtin.is_test)
|
||||
log.warn("accounts.srf: account '{s}': audit_large_lot_threshold must be > 0 (got {d}); ignoring", .{ entry.account, t });
|
||||
break :blk null;
|
||||
} else null;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue