mirror of
https://github.com/RussellChamp/advent-of-code-2021.git
synced 2026-10-27 21:52:32 +00:00
day 8 work and jumbled together
This commit is contained in:
1 parent
e76cb1a355
commit
c7ea0afedc
18 files changed
+457
-21
No files matched your search
@@ -0,0 +1,24 @@
|
||||
package assert
|
||||
|
||||
import "testing"
|
||||
|
||||
func IsTrue(t *testing.T, expr bool, message string) {
|
||||
if expr != true {
|
||||
t.Logf("Expected true but got false: %s", message)
|
||||
t.Fail()
|
||||
}
|
||||
}
|
||||
|
||||
func EqualsStr(t *testing.T, actual, expected, message string) {
|
||||
if actual != expected {
|
||||
t.Logf("Expected value '%s' but got '%s': %s", expected, actual, message)
|
||||
t.Fail()
|
||||
}
|
||||
}
|
||||
|
||||
func EqualsInt(t *testing.T, actual, expected int, message string) {
|
||||
if actual != expected {
|
||||
t.Logf("Expected value '%d' but got '%d': %s", expected, actual, message)
|
||||
t.Fail()
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user