about summary refs log tree commit diff
path: root/buf.yaml
diff options
context:
space:
mode:
authorsterni <sternenseemann@systemli.org>2021-01-31T12·41+0100
committersterni <sternenseemann@systemli.org>2021-02-09T21·57+0000
commit00f79da3581d5902ad1b45795cdf9334d6becad3 (patch)
tree356b73611732b34dc88970b649cbe1267cbc08f3 /buf.yaml
parent03f1fefc72710192ebd9b3c7358cffd118d8d200 (diff)
refactor(nix/runTestsuite): implement in terms of generic assertBool r/2197
Refactor assertEq and assertThrows to be implemented in terms of a more
generic assertBool to reduce code duplication and ease adding new assert
types.

To preserve meaningful error messages AssertResult is changed slightly:
nope-eq and nope-throw have been replaced by a single nope branch which
contains an AssertErrorContext which contains error information. To
implement an assert assertBoolContext (which is not exposed) can be
used: It takes an AssertErrorContext which is returned in case of an
error and a boolean determining whether the assert was successful.

The currently possible AssertErrorContext are:

* should-throw: error result of assertThrows, formerly nope-throw
* not-equal: error result of assertEq, formerly nope-eq

Change-Id: Ifd6b3aa4187c90c3add2df63fa7c906c8f03fd2d
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2473
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
Diffstat (limited to 'buf.yaml')
0 files changed, 0 insertions, 0 deletions