I generally love working on systems problems, from virtualization to distributed systems, and more recently, ML problems. Learn more about me at my website.
See you soon!
-- Aaron
Simple assertions for Go (golang) tests
License: Apache License 2.0
I generally love working on systems problems, from virtualization to distributed systems, and more recently, ML problems. Learn more about me at my website.
See you soon!
-- Aaron
they should report one stack frame above. not sure if this is even possible to fix
The official Go FAQ outlines an Equaler
interface that looks like this:
type Equaler interface {
Equal(Equaler) bool
}
This library should provide that interface and check for it in assert.Equals
calls. If both arguments are Equaler
implementations, it should call expected.Equal(actual)
instead of using reflect.DeepEqual
.
This feature would allow people to write custom equality checks for use in tests and otherwise. It would help especially with testing equality on complex types like deeply nested structs or pointers.
It often doesn't make sense to fail a test because one iteration of a loop failed in a table driven test. It would be helpful to have some construct that you can create before the loop starts, report errors during iteration (concurrency safe) and then check afterward. Usage like this would be nice:
func TestExamples(t *testing.T) {
loopChecker := assert.NewLoop()
for exampleNum, exampleFunc := range examplesMap {
// True() calls exampleFunc and returns its value. It calls t.Errorf if it returned false
if !loopChecker.True(t, exampleNum, exampleFunc()) {
continue
}
}
}
// ReportFatal() calls t.Fatalf if any errors were reported in the loop
loopChecker.ReportFatal(t, "examples")
The examples in the README suggest that you call functions like assert.NoErr(err)
, when it should be assert.NoErr(t, err)
.
struct
s don't work - they should do "deep equal"also func Equal
doesn't work when one of the parameters is nil
This build failure was discovered in PR #12, and the specific build failure is here: https://travis-ci.org/arschles/assert/jobs/168611811
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.