From 35ba4364313f82643332bf10d96740deaa366bea Mon Sep 17 00:00:00 2001 From: Mike Vink Date: Sun, 26 Feb 2023 23:26:57 +0100 Subject: add tests --- 2022/01/calories/calories_suite_test.go | 13 +++++++++++++ 2022/01/calories/elfs_test.go | 18 ++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 2022/01/calories/calories_suite_test.go create mode 100644 2022/01/calories/elfs_test.go (limited to '2022') diff --git a/2022/01/calories/calories_suite_test.go b/2022/01/calories/calories_suite_test.go new file mode 100644 index 0000000..72ce48b --- /dev/null +++ b/2022/01/calories/calories_suite_test.go @@ -0,0 +1,13 @@ +package calories_test + +import ( + "testing" + + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" +) + +func TestCalories(t *testing.T) { + RegisterFailHandler(Fail) + RunSpecs(t, "Calories Suite") +} diff --git a/2022/01/calories/elfs_test.go b/2022/01/calories/elfs_test.go new file mode 100644 index 0000000..ca7ee65 --- /dev/null +++ b/2022/01/calories/elfs_test.go @@ -0,0 +1,18 @@ +package calories + +import ( + "testing" + + . "github.com/onsi/ginkgo/v2" +) + +var _ = Describe("Elfs", func() { +}) + +var data = make([]int, 1000000) + +func BenchmarkSum(b *testing.B) { + for i := 0; i < b.N; i++ { + sum(data) + } +} -- cgit v1.2.3