diff options
| author | Mike Vink <mike1994vink@gmail.com> | 2023-02-26 23:26:57 +0100 |
|---|---|---|
| committer | Mike Vink <mike1994vink@gmail.com> | 2023-02-26 23:26:57 +0100 |
| commit | 35ba4364313f82643332bf10d96740deaa366bea (patch) | |
| tree | 27219f146a5b2e39485294bffc4b0386c96b641b | |
| parent | 975cb8653cd64b5f26c71339e7ec3151d077ba5e (diff) | |
add testsmain
| -rw-r--r-- | 2022/01/calories/calories_suite_test.go | 13 | ||||
| -rw-r--r-- | 2022/01/calories/elfs_test.go | 18 |
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) + } +} |
