gitlab.com/stone.code/catch (go): Package catch provides utility functions that work with the standard library's testing capabilities. The functions encapsulate standard tests, and standardise logging for failures.  However, package catch does not output anything directly.  All messages are formatted using the standard methods on the test object.  As an example, when the following test fails:  The log will be:  The source files for the test code should be available and unmodified at their original locations when the tests are run.  The source code is read and partially parsed to create messages for any failed tests.  If the source code is not available, tests can still be run, but the messages for any failed tests will not be complete.  When a test fails, package catch will create an error message based on the the user's source code.  The source code for the helper's caller will be opened, and the expression for the arguments included in the error report.  If the line with error contains a line comment, the line comment will also be included in the error message.  User's can also add an arbitrary number of arguments to any call.  Those arguments are not used for the test, but will be included in the message if the test fails.  With this facility, users can easily add important context to failing tests.
Keywords: go|testing