From 66156181ee656a3c96175edb3bf3c5904102786a Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Wed, 4 May 2016 22:10:06 +0200 Subject: cryptocore: support Go 1.4 in tests --- internal/cryptocore/cryptocore_go1.4_test.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 internal/cryptocore/cryptocore_go1.4_test.go (limited to 'internal/cryptocore/cryptocore_go1.4_test.go') diff --git a/internal/cryptocore/cryptocore_go1.4_test.go b/internal/cryptocore/cryptocore_go1.4_test.go new file mode 100644 index 0000000..3460d02 --- /dev/null +++ b/internal/cryptocore/cryptocore_go1.4_test.go @@ -0,0 +1,19 @@ +// +build !go1.5 +// = go 1.4 or lower + +package cryptocore + +import ( + "testing" +) + +// Native Go crypto with 128-bit IVs is only supported on Go 1.5 and up +func TestCryptoCoreNewGo14(t *testing.T) { + defer func() { + if r := recover(); r == nil { + t.Errorf("The code did not panic") + } + }() + key := make([]byte, 32) + New(key, false, true) +} -- cgit v1.2.3