templates.test_annots

 1import smartpy as sp
 2
 3
 4@sp.module
 5def main():
 6    class C(sp.Contract):
 7        def __init__(self):
 8            self.data.x = sp.cast(
 9                {}, sp.map[sp.record(a=sp.nat, b=sp.address, c=sp.nat), sp.unit]
10            )
11
12        @sp.entrypoint
13        def ep(self):
14            assert self.data.x.contains(sp.record(a=0, b=sp.sender, c=0))
15
16
17@sp.add_test()
18def test():
19    scenario = sp.test_scenario("annots", main)
20    scenario += main.C()