z_commondao_must_execute_0_filetest.gno
0.55 Kb ยท 27 lines
1// PKGPATH: gno.land/r/test
2package test
3
4import (
5 "time"
6
7 "gno.land/p/nt/commondao"
8)
9
10type testPropDef struct{}
11
12func (testPropDef) Title() string { return "" }
13func (testPropDef) Body() string { return "" }
14func (testPropDef) VotingPeriod() time.Duration { return 0 }
15func (testPropDef) Execute(cur realm) error { return nil }
16
17func (testPropDef) Tally(commondao.ReadonlyVotingRecord, commondao.MemberSet) (bool, error) {
18 return true, nil
19}
20
21func main() {
22 commondao.MustExecute(testPropDef{})
23 println("ok")
24}
25
26// Output:
27// ok