aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorJakob Unterwurzacher2023-01-24 21:35:32 +0100
committerJakob Unterwurzacher2023-02-21 22:08:41 +0100
commite9a5b8962b0fc128acb95b75c2aabc0894d3e4ba (patch)
tree16ba4aeb1eac9dc767ead45184f5ad23cbbfeace /internal
parent6dc8c2610077e4f8f7f85b5d3a22df454883285c (diff)
contentenc: simplify testRange tables
Get rid of this eyesore.
Diffstat (limited to 'internal')
-rw-r--r--internal/contentenc/content_test.go32
1 files changed, 16 insertions, 16 deletions
diff --git a/internal/contentenc/content_test.go b/internal/contentenc/content_test.go
index 4a4b2de..b20ccb1 100644
--- a/internal/contentenc/content_test.go
+++ b/internal/contentenc/content_test.go
@@ -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)
@@ -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)