aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/goccy/go-json/helper_test.go
blob: 53157ce93e2b4fe9cfdff99ced607621d950ab48 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package json_test

import "testing"

func assertErr(t *testing.T, err error) {
	t.Helper()
	if err != nil {
		t.Fatalf("%+v", err)
	}
}

func assertEq(t *testing.T, msg string, exp interface{}, act interface{}) {
	t.Helper()
	if exp != act {
		t.Fatalf("failed to test for %s. exp=[%v] but act=[%v]", msg, exp, act)
	}
}

func assertNeq(t *testing.T, msg string, exp interface{}, act interface{}) {
	t.Helper()
	if exp == act {
		t.Fatalf("failed to test for %s. expected value is not [%v] but got same value", msg, act)
	}
}