summaryrefslogtreecommitdiff
path: root/lib/binary/binary_test.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2024-12-26 04:15:28 +0700
committerShulhan <ms@kilabit.info>2024-12-28 16:46:59 +0700
commit4003b6359747f6e43357e4bf190d4e71a66ec796 (patch)
treef219d067b0a5a3a2bfe8554f88f39f580a5c59d6 /lib/binary/binary_test.go
parent052d4673d0d7777bd429134f9f30c4a87462208f (diff)
downloadpakakeh.go-4003b6359747f6e43357e4bf190d4e71a66ec796.tar.xz
lib/binary: implement append-only binary file
The binary is new package that complement the standard binary package Currently it implement append-only binary that encode the data using [binary.Writer]. We call them "Apo" for short.
Diffstat (limited to 'lib/binary/binary_test.go')
-rw-r--r--lib/binary/binary_test.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/binary/binary_test.go b/lib/binary/binary_test.go
new file mode 100644
index 00000000..ca394101
--- /dev/null
+++ b/lib/binary/binary_test.go
@@ -0,0 +1,19 @@
+// SPDX-FileCopyrightText: 2024 M. Shulhan <ms@kilabit.info>
+//
+// SPDX-License-Identifier: BSD-3-Clause
+
+package binary
+
+import (
+ "os"
+ "testing"
+ "time"
+)
+
+func TestMain(m *testing.M) {
+ var now = time.Date(2024, 12, 26, 2, 21, 0, 0, time.UTC)
+ timeNow = func() time.Time {
+ return now
+ }
+ os.Exit(m.Run())
+}