MCPcopy Create free account
hub / github.com/chain/txvm / TestRunlimits

Function TestRunlimits

protocol/txvm/asm/runlimit_test.go:12–414  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

10)
11
12func TestRunlimits(t *testing.T) {
13 cases := []struct {
14 name string
15 pre string
16 src string
17 want int64
18 }{
19 {
20 name: "int",
21 pre: "x'01'",
22 src: "int",
23 want: 1,
24 },
25 {
26 name: "add",
27 pre: "3 4",
28 src: "add",
29 want: 1,
30 },
31 {
32 name: "neg",
33 pre: "1",
34 src: "neg",
35 want: 1,
36 },
37 {
38 name: "mul",
39 pre: "3 4",
40 src: "mul",
41 want: 1,
42 },
43 {
44 name: "div",
45 pre: "6 2",
46 src: "div",
47 want: 1,
48 },
49 {
50 name: "mod",
51 pre: "6 4",
52 src: "mod",
53 want: 1,
54 },
55 {
56 name: "gt",
57 pre: "5 6",
58 src: "gt",
59 want: 1,
60 },
61 {
62 name: "not 0",
63 pre: "0",
64 src: "not",
65 want: 1,
66 },
67 {
68 name: "not 1",
69 pre: "1",

Callers

nothing calls this directly

Calls 3

ValidateFunction · 0.92
GetRunlimitFunction · 0.92
AssembleFunction · 0.85

Tested by

no test coverage detected