MCPcopy Create free account
hub / github.com/CPChain/chain / TestDefaults

Function TestDefaults

core/vm/runtime/runtime_test.go:31–57  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

29)
30
31func TestDefaults(t *testing.T) {
32 cfg := new(Config)
33 setDefaults(cfg)
34
35 if cfg.Difficulty == nil {
36 t.Error("expected difficulty to be non nil")
37 }
38
39 if cfg.Time == nil {
40 t.Error("expected time to be non nil")
41 }
42 if cfg.GasLimit == 0 {
43 t.Error("didn't expect gaslimit to be zero")
44 }
45 if cfg.GasPrice == nil {
46 t.Error("expected time to be non nil")
47 }
48 if cfg.Value == nil {
49 t.Error("expected time to be non nil")
50 }
51 if cfg.GetHashFn == nil {
52 t.Error("expected time to be non nil")
53 }
54 if cfg.BlockNumber == nil {
55 t.Error("expected block number to be non nil")
56 }
57}
58
59func TestEVM(t *testing.T) {
60 defer func() {

Callers

nothing calls this directly

Calls 2

setDefaultsFunction · 0.85
ErrorMethod · 0.65

Tested by

no test coverage detected