/ tests / tests / execution / chain.adl
chain.adl
 1  /*
 2  seed = 123456789
 3  min_height = 16
 4  
 5  [case]
 6  program = "test.alpha"
 7  function = "main"
 8  input = ["1u32"]
 9  [case]
10  program = "test.alpha"
11  function = "main"
12  input = ["2u32"]
13  [case]
14  program = "test.alpha"
15  function = "main"
16  input = ["3u32"]
17  [case]
18  program = "test.alpha"
19  function = "main"
20  input = ["4u32"]
21  */
22  
23  program test.alpha {
24      transition main(x: u32) -> bool {
25          let c: u32 = 0u32;
26  
27          if x == 1u32 {
28              c = 1u32;
29          } else if x == 2u32 {
30              c = 2u32;
31          } else {
32              c = 3u32;
33          }
34          return c == x;
35      }
36  
37      @noupgrade
38      async constructor() {}
39  }