Skip to content

Commit

Permalink
contentenc: simplify testRange tables
Browse files Browse the repository at this point in the history
Get rid of this eyesore.
  • Loading branch information
rfjakob committed Feb 21, 2023
1 parent 6dc8c26 commit e9a5b89
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions internal/contentenc/content_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ type testRange struct {
}

func TestSplitRange(t *testing.T) {
var ranges []testRange

ranges = append(ranges, testRange{0, 70000},
testRange{0, 10},
testRange{234, 6511},
testRange{65444, 54},
testRange{0, 1024 * 1024},
testRange{0, 65536},
testRange{6654, 8945})
ranges := []testRange{
{0, 70000},
{0, 10},
{234, 6511},
{65444, 54},
{0, 1024 * 1024},
{0, 65536},
{6654, 8945},
}

key := make([]byte, cryptocore.KeyLen)
cc := cryptocore.New(key, cryptocore.BackendGoGCM, DefaultIVBits, true)
Expand All @@ -42,13 +42,13 @@ func TestSplitRange(t *testing.T) {
}

func TestCiphertextRange(t *testing.T) {
var ranges []testRange

ranges = append(ranges, testRange{0, 70000},
testRange{0, 10},
testRange{234, 6511},
testRange{65444, 54},
testRange{6654, 8945})
ranges := []testRange{
{0, 70000},
{0, 10},
{234, 6511},
{65444, 54},
{6654, 8945},
}

key := make([]byte, cryptocore.KeyLen)
cc := cryptocore.New(key, cryptocore.BackendGoGCM, DefaultIVBits, true)
Expand Down

0 comments on commit e9a5b89

Please sign in to comment.