aboutsummaryrefslogtreecommitdiff
path: root/lib/test/writer.go
AgeCommit message (Collapse)Author
2 dayslib/test: rewrite Assert to use [diff.Unified]Shulhan
Using diff Unified improve the test output readability when two large strings are not match.
2026-01-15all: convert license and copyright to use SPDX identifiersShulhan
With help of spdxconv tool [1], we able to bulk update all files license and copyright format to comply with SPDX formats. [1] https://kilabit.info/project/spdxconv/
2025-01-22lib/test: call Helper method inside AssertShulhan
The Helper method mark the Assert function as test helper, which when printing file and line information, the stack trace from Assert function will be skipped. This remove manual lines skipping that previously we have.
2023-09-11lib/test: refactoring, rename TestWriter to BufferWriterShulhan
The name TestWriter is considered stutter if its called from external package, test.TestWriter. While at it, implement the Error and Errorf in BufferWriter and add comment to each exported methods.
2022-09-13lib/test: change the Assert parameter to WriterShulhan
Since we only need to call Log and Fatalf during Assert, no need to pass the whole instance of testing.T to Assert. By changing it to Writer, we also can test the Assert. This remove the AssertBench, because it have the same function parameters and body as Assert.