aboutsummaryrefslogtreecommitdiff
path: root/types/stitem_test.go
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2021-05-25 11:29:29 +0200
committerLinus Nordberg <linus@nordberg.se>2021-05-25 11:29:29 +0200
commitf9aae584c787950e84cf3b098290a0c73330d8ac (patch)
treed3a018493954529794de3c21c9f4f6b0c846a925 /types/stitem_test.go
parent533f683ef1ae999c2fdc0086cbc3de4e675d1e33 (diff)
parent6a20aec8e8a93ce11f8b940659f49c889f94aef1 (diff)
Merge branch 'design' of github.com:system-transparency/stfe into design
Diffstat (limited to 'types/stitem_test.go')
-rw-r--r--types/stitem_test.go64
1 files changed, 0 insertions, 64 deletions
diff --git a/types/stitem_test.go b/types/stitem_test.go
deleted file mode 100644
index 90d6808..0000000
--- a/types/stitem_test.go
+++ /dev/null
@@ -1,64 +0,0 @@
-package types
-
-import (
- "strings"
- "testing"
-)
-
-// TestStItemString checks that the String() function prints the right format,
-// and that the body is printed without a nil-pointer panic.
-func TestStItemString(t *testing.T) {
- wantPrefix := map[StFormat]string{
- StFormatReserved: "Format(reserved)",
- StFormatSignedTreeHeadV1: "Format(signed_tree_head_v1): &{TreeHead",
- StFormatCosignedTreeHeadV1: "Format(cosigned_tree_head_v1): &{SignedTreeHead",
- StFormatConsistencyProofV1: "Format(consistency_proof_v1): &{LogId",
- StFormatInclusionProofV1: "Format(inclusion_proof_v1): &{LogId",
- StFormatSignedChecksumV1: "Format(signed_checksum_v1): &{Data",
- StFormat(1<<16 - 1): "unknown StItem: unknown StFormat: 65535",
- }
- tests := append(test_cases_stitem(t), testCaseSerialize{
- description: "valid: unknown StItem",
- item: StItem{
- Format: StFormat(1<<16 - 1),
- },
- })
- for _, table := range tests {
- item, ok := table.item.(StItem)
- if !ok {
- t.Fatalf("must cast to StItem in test %q", table.description)
- }
-
- prefix, ok := wantPrefix[item.Format]
- if !ok {
- t.Fatalf("must have prefix for StFormat %v in test %q", item.Format, table.description)
- }
- if got, want := item.String(), prefix; !strings.HasPrefix(got, want) {
- t.Errorf("got %q but wanted prefix %q in test %q", got, want, table.description)
- }
- }
-}
-
-// TODO: TestNewSignedTreeHeadV1
-func TestNewSignedTreeHeadV1(t *testing.T) {
-}
-
-// TODO: TestNewCosignedTreeHeadV1
-func TestNewCosignedTreeHeadV1(t *testing.T) {
-}
-
-// TODO: TestNewConsistencyProofV1
-func TestNewConsistencyProofV1(t *testing.T) {
-}
-
-// TODO: TestNewInclusionProofV1
-func TestNewInclusionProofV1(t *testing.T) {
-}
-
-// TODO: TestNewSignedChecksumV1
-func TestNewSignedChecksumV1(t *testing.T) {
-}
-
-// TODO: TestNewTreeHeadV1
-func TestNewTreeHeadV1(t *testing.T) {
-}