This commit essentially copies the information from the second section of the gRPC core
documentation about status codes at
https://grpc.github.io/grpc/core/md_doc_statuscodes.html
into the Go documentation of the status codes, to increase visibility.
* Modified tests to use tlogger.
* Fail on errors, with error expectations.
* Added expects and MixedCapsed grpclb_config tests
* Moved tlogger to grpctest, moved leakcheck tester to grpctest.go
* Added ExpectErrorN()
* Removed redundant leak checks
* Fixed new test
* Made tlogger globals into tlogger methods
* ErrorsLeft -> EndTest
* Removed some redundant lines
* Fixed error in test and empty map in EndTest
Marshalling a Code to JSON and unmarshalling it failed with an
"invalid code" error message.
Code is of type uint32. It has no custom MarshalJson() implemented
therefore it is marshalled into an JSON integer value.
The UnmarshalJSON() function expected that the marshalled Code is a
String type, unmarshalling failed.
Check in UnmarshalJSON() if the value is an uint32 in the range of the
defined Code values. If it is, unmarshal it.
This commit also adds an Marshal/Unmarshal testcase.