[0.3.0] - 2026-06-15: tolerance overloads on the value assertions
Minor release. Adds absolute-tolerance overloads to the value assertions, closing the asymmetry where the histogram aggregates (HasSampleSum / HasSampleAverage) accepted a tolerance but the value assertions compared doubles exactly. Purely additive; the 0.2.0 ApiCompat baseline is preserved.
Added
HasLastValue(double expected, double tolerance)on anInstrumentCaptureasserts the most recent value within an absolute tolerance, the tolerant counterpart ofHasLastValue(double)for gauges fed computed doubles (where0.1 + 0.2 != 0.3exact comparison flakes).HasSamples(IReadOnlyList<double> expected, double tolerance)andHasSamplesInAnyOrder(IReadOnlyList<double> expected, double tolerance)on aMeasurementSetassert the samples within an absolute per-sample tolerance, in order and order-independent respectively. The framework-agnostic core gains the matchingMeasurementSet.SamplesEqual(expected, tolerance)/SamplesEquivalentTo(expected, tolerance)comparison primitives. Every tolerance overload rejects a non-finite or negative tolerance withArgumentOutOfRangeException, so an invalid tolerance fails fast instead of silently matching everything (NaN) or nothing (negative).
Documentation
MeasurementSet.Totalnow documents that the sum is rounded to alongwith banker's rounding (round half to even), so aCounter<double>with a fractional total is evaluated as an integer. For an exact fractional total, compareSumdirectly or useHasSampleSum(expected, tolerance).