* Create TLogger, bringing leveled logging to tests
Inspired heavily by go-logr, brings leveled logging to tests while
using the highly reliable zap logger backend to fulfill writing to
multiple log files.
Now that metrics logger has been removed, SetupLoggingFlags() is redundant. Moved to test/logging
* Cleanup TLogger and document
Add TLogger.Collect() to support collecting outcomes (either positive
strings or error types) which will be processed in a subtest upon
completion of the currently-running (sub-)test.
StructuredError prints its output in a more-readable form now.
Call-site should now work for .Log/.Logf-using functions.
Use cancel from NewTLogger instead of t.CleanUp()
Use a zapcore SpewEncoder when writing to testing.T
Means even non-json-encodable structs will get printed to the test log
output, while preserving encodable structured output for other log files.
Removed timestamp from printing to t.Log
* Fix the automatically-detected issues
Spelling, codegen, some coverage (coverage of memory_encoder.go should
not be necessary but the coverage tool is broken and needs to be fixed).
* Increase unit test coverage slightly and fix tiny comment
* Set attribute the way the coverage program wants
* Cleanup based on notes
* Comment cleanup and privitize var
* Mistake; left purposely-failing tests enabled
* Reduce long lines
* Consolidate cleanup code; make variable expressive
* Cleanup and bugfix
Failing functions now tested by having an internal constructor
option to skip calls to t.Fail()/t.FailNow().
Fixed some bugs with internal method errorWithRuntimeCheck and added
tests for it.
Address minor typos from comments.
* Tiny name/optimization fixes