contract_test.gno
0.36 Kb · 18 lines
1package render
2
3import "testing"
4
5func Test(t *testing.T) {
6 shouldEqual(t, "hello", "Hello World!")
7 shouldEqual(t, "greetings/Manfred", "Welcome, Manfred!")
8 shouldEqual(t, "foobar", "404")
9}
10
11func shouldEqual(t *testing.T, path string, expected string) {
12 t.Helper()
13
14 got := Render(path)
15 if got != expected {
16 t.Fatalf("expected %d, got %d.", expected, got)
17 }
18}