• Eric Myhre's avatar
    add dependency on frankban/quicktest. · a50802c3
    Eric Myhre authored
    Begin using it in some parts of testing of schema parse&compile.
    (I don't think I'll try to push all usage of go-wish over to quicktest
    in one flurry of diffs right now.  But it might be future work.)
    
    The breaking point is that asserting on lists of errors using go-wish
    was starting to exhibit Weird behaviors for only *some* error types.
    It's likely that this would be addressable using some kind of go-cmp
    customization, but go-wish doesn't really expose that ability.
    The quicktest library does.
    
    Switching to quicktest also brings a bunch of other nice features
    along with it, like stack traces and other forms of additional info.
    The holistic feel of it is also pretty similar to go-wish (particularly
    since https://github.com/frankban/quicktest/pull/77 ), so many things
    should be easy to switch.  I suspect I might want some more checker
    functions to assert on types... but those should be easy to add as
    a third party, either as a go-cmp.Transformer or a qt.Checker (and
    then we can work on upstreaming at leisure, if appropriate).
    
    In this commit, I'm handling the error list situation using a
    go-cmp.Transformer to stringify all the errors.  This means that the
    error *types* aren't checked, which is definitely loses ditches some
    information... but the upside is that its easy to use the tests to
    check that the eventual string of the error message is human-readable.
    In this API, I think that readability is the higher priority.
    a50802c3
Analyzing file…
go.mod 570 Bytes