MCPcopy Create free account
hub / github.com/tendermint/tendermint / TestBlockString

Function TestBlockString

types/block_test.go:177–186  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

175}
176
177func TestBlockString(t *testing.T) {
178 assert.Equal(t, "nil-Block", (*Block)(nil).String())
179 assert.Equal(t, "nil-Block", (*Block)(nil).StringIndented(""))
180 assert.Equal(t, "nil-Block", (*Block)(nil).StringShort())
181
182 block := MakeBlock(int64(3), []Tx{Tx("Hello World")}, nil, nil)
183 assert.NotEqual(t, "nil-Block", block.String())
184 assert.NotEqual(t, "nil-Block", block.StringIndented(""))
185 assert.NotEqual(t, "nil-Block", block.StringShort())
186}
187
188func makeBlockIDRandom() BlockID {
189 var (

Callers

nothing calls this directly

Calls 6

MakeBlockFunction · 0.70
TxTypeAlias · 0.70
EqualMethod · 0.65
StringMethod · 0.65
StringIndentedMethod · 0.45
StringShortMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…