Git Product home page Git Product logo

go-testing's People

Contributors

codacy-badger avatar dependabot[bot] avatar ffmiruz avatar gtourkas avatar mzampetakis avatar ppapapetrou76 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

go-testing's Issues

Error message when asserting string slices

any.go:28: assertion failed: expected value of = %!v(PANIC=String method: runtime error: invalid memory address or nil pointer dereference), to be equal to %!v(PANIC=String method: runtime error: invalid memory address or nil pointer dereference)

Detailed diff expands pointers into values

It looks like: #13 partially added this feature, but it would be nice to be able to expand nested structs that have references to pointers as values and compare. This gives someone a better idea what the true differences are when the tests are failing. Something like this would be very helpful.

Implement soft assertions

With soft assertions, the library should collect all assertion errors instead of stopping at the first one, and then the client should tell the library to assert everything all together.

Containable functions fail if the arguments is not a slice / map etc. but a single element

In the example below the variable actual is of type []string and oneElement is a string

assert.ThatSlice(t, actual).ContainsOnly(oneElement)

The code is trying to get the length of element which us a byte array instead of the length of the arguments
We need to check the type before we get the length

the code works fine as below

assert.ThatSlice(t, actual).ContainsOnly([]string{oneElement})

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.