MCPcopy Create free account
hub / github.com/chain/Core / TestFuzzAssetIdNilPointer

Function TestFuzzAssetIdNilPointer

protocol/validation/fuzz_test.go:10–29  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

8)
9
10func TestFuzzAssetIdNilPointer(t *testing.T) {
11 const (
12 blockchainID = `50935a092ffad7ec9fbac4f4486db6c3b8cd5b9f51cf697248584dde286a7220`
13 input = `07300730303030303030000001302b3030303030303030303030303030303030303030303030303030303030303030303030303030303030303000253030303030303030303030303030303030303030303030303030303030303030303030303000`
14 )
15
16 var testBlockchainID bc.Hash
17 err := testBlockchainID.UnmarshalText([]byte(blockchainID))
18 if err != nil {
19 t.Fatal(err)
20 }
21
22 var tx legacy.Tx
23 err = tx.UnmarshalText([]byte(input))
24 if err != nil {
25 t.Fatal(err)
26 }
27
28 ValidateTx(tx.Tx, testBlockchainID)
29}

Callers

nothing calls this directly

Calls 3

UnmarshalTextMethod · 0.95
UnmarshalTextMethod · 0.95
ValidateTxFunction · 0.85

Tested by

no test coverage detected