summaryrefslogtreecommitdiff
path: root/2022
diff options
context:
space:
mode:
Diffstat (limited to '2022')
-rw-r--r--2022/01/calories/calories_suite_test.go13
-rw-r--r--2022/01/calories/elfs_test.go18
2 files changed, 31 insertions, 0 deletions
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)
+ }
+}