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

Function TestOpcodeVals

protocol/txvm/op/opcode_test.go:5–85  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

3import "testing"
4
5func TestOpcodeVals(t *testing.T) {
6 cases := []struct {
7 symbolic, numeric int
8 }{
9 {Int, 0x20},
10 {Add, 0x21},
11 {Neg, 0x22},
12 {Mul, 0x23},
13 {Div, 0x24},
14 {Mod, 0x25},
15 {GT, 0x26},
16 {Not, 0x27},
17 {And, 0x28},
18 {Or, 0x29},
19 {Roll, 0x2a},
20 {Bury, 0x2b},
21 {Reverse, 0x2c},
22 {Get, 0x2d},
23 {Put, 0x2e},
24 {Depth, 0x2f},
25 {Nonce, 0x30},
26 {Merge, 0x31},
27 {Split, 0x32},
28 {Issue, 0x33},
29 {Retire, 0x34},
30 {Amount, 0x35},
31 {AssetID, 0x36},
32 {Anchor, 0x37},
33 {VMHash, 0x38},
34 {SHA256, 0x39},
35 {SHA3, 0x3a},
36 {CheckSig, 0x3b},
37 {Log, 0x3c},
38 {PeekLog, 0x3d},
39 {TxID, 0x3e},
40 {Finalize, 0x3f},
41 {Verify, 0x40},
42 {JumpIf, 0x41},
43 {Exec, 0x42},
44 {Call, 0x43},
45 {Yield, 0x44},
46 {Wrap, 0x45},
47 {Input, 0x46},
48 {Output, 0x47},
49 {Contract, 0x48},
50 {Seed, 0x49},
51 {Self, 0x4a},
52 {Caller, 0x4b},
53 {ContractProgram, 0x4c},
54 {TimeRange, 0x4d},
55 {Prv, 0x4e},
56 {Ext, 0x4f},
57 {Eq, 0x50},
58 {Dup, 0x51},
59 {Drop, 0x52},
60 {Peek, 0x53},
61 {Tuple, 0x54},
62 {Untuple, 0x55},

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected