• Austin Clements's avatar
    runtime: make TestMemStats failure messages useful · bda74b0e
    Austin Clements authored
    Currently most TestMemStats failures dump the whole MemStats object if
    anything is amiss without telling you what is amiss, or even which
    field is wrong. This makes it hard to figure out what the actual
    problem is.
    
    Replace this with a reflection walk over MemStats and a map of
    predicates to check. If one fails, we can construct a detailed and
    descriptive error message. The predicates are a direct translation of
    the current tests.
    
    Change-Id: I5a7cafb8e6a1eeab653d2e18bb74e2245eaa5444
    Reviewed-on: https://go-review.googlesource.com/37512
    Run-TryBot: Austin Clements <austin@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarRick Hudson <rlh@golang.org>
    bda74b0e
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...