core/vm/runtime: fix error messages in test

This commit is contained in:
gitglorythegreat 2024-12-26 15:21:30 +08:00 committed by GitHub
parent 341647f186
commit c54cf77928
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -47,24 +47,32 @@ func TestDefaults(t *testing.T) {
cfg := new(Config) cfg := new(Config)
setDefaults(cfg) setDefaults(cfg)
if cfg.ChainConfig == nil {
t.Error("expected chainConfig to be non nil")
}
if cfg.Difficulty == nil { if cfg.Difficulty == nil {
t.Error("expected difficulty to be non nil") t.Error("expected difficulty to be non nil")
} }
if cfg.GasLimit == 0 { if cfg.GasLimit == 0 {
t.Error("didn't expect gaslimit to be zero") t.Error("didn't expect gaslimit to be zero")
} }
if cfg.GasPrice == nil { if cfg.GasPrice == nil {
t.Error("expected time to be non nil") t.Error("expected gasPrice to be non nil")
} }
if cfg.Value == nil { if cfg.Value == nil {
t.Error("expected time to be non nil") t.Error("expected value to be non nil")
} }
if cfg.GetHashFn == nil { if cfg.GetHashFn == nil {
t.Error("expected time to be non nil") t.Error("expected getHashFn to be non nil")
} }
if cfg.BlockNumber == nil { if cfg.BlockNumber == nil {
t.Error("expected block number to be non nil") t.Error("expected blockNumber to be non nil")
}
if cfg.BaseFee == nil {
t.Error("expected baseFee to be non nil")
}
if cfg.BlobBaseFee == nil {
t.Error("expected blobBaseFee to be non nil")
} }
} }