MCPcopy Create free account
hub / github.com/WICG/webpackage / TestEmptyIntegrityBlock

Function TestEmptyIntegrityBlock

go/integrityblock/integrityblock_test.go:15–32  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

13)
14
15func TestEmptyIntegrityBlock(t *testing.T) {
16 integrityBlock := generateEmptyIntegrityBlock()
17
18 integrityBlockBytes, err := integrityBlock.CborBytes()
19 if err != nil {
20 t.Errorf("integrityBlock.CborBytes. err: %v", err)
21 }
22
23 want := `["🖋📦" "1b\x00\x00" []]`
24
25 got, err := testhelper.CborBinaryToReadableString(integrityBlockBytes)
26 if err != nil {
27 t.Fatal(err)
28 }
29 if got != want {
30 t.Errorf("integrityblock: got: %s\nwant: %s", got, want)
31 }
32}
33
34func TestAddNewSignatureToIntegrityBlock(t *testing.T) {
35 integrityBlock := generateEmptyIntegrityBlock()

Callers

nothing calls this directly

Calls 3

CborBytesMethod · 0.80

Tested by

no test coverage detected