benbjohnson / benbjohnson/testing

Unclear on the usage of the assert function

Open
#6 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
538
Forks
37
PR merge metrics
No merged PRs in 30d

Description

Looking at the README the usage of the assert function is unclear as it looks like the actual test is happening before this function is being called? if so how is this done? Say I had two structures of the same type that I wanted to make sue that I wanted make sure matched how would I use your assert function to do so or would something like using the equals function or even `reflect.DeepEqual` be better.

Most other assert implementations I have found take two interfaces as arguments and do the comparison themself but most of what I have seen seem too heavy handed for me like [testify/assert](https://godoc.org/github.com/stretchr/testify/assert) or to simple like this one https://gist.github.com/samalba/6059502 (although this may not by to far off from this implementation if I knew how the check is actually done)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.