consts_test.gno
0.61 Kb ยท 34 lines
1package genesis_test
2
3import (
4 "testing"
5
6 "gno.land/p/sys/genesis"
7)
8
9func TestGenesisConstants(t *testing.T) {
10 // Test that Time is not zero
11 if genesis.Time.IsZero() {
12 t.Error("Time should not be zero")
13 }
14
15 // Test that Height is not zero
16 if genesis.Height == 0 {
17 t.Error("Height should not be zero")
18 }
19
20 // Test that Domain is not empty
21 if genesis.Domain == "" {
22 t.Error("Domain should not be empty")
23 }
24
25 // Test that Uptime is not zero
26 if genesis.Uptime() != 0 {
27 t.Error("Uptime should be zero")
28 }
29
30 // Test that Upheight is not zero
31 if genesis.Upheight() != 0 {
32 t.Error("Upheight should be zero")
33 }
34}