persist: Phase 1 — log + kv facets on injectable in-memory backend + 28 tests
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m3s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 1m3s
event/backend/log/kv/api over one injected backend protocol (mem default). log: append/read/read-from, sequential per-stream seq, stream isolation. kv: get/put/delete/has?/keys/get-or/update. conformance.sh + 3 suites, 28/28. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
30
lib/persist/tests/event.sx
Normal file
30
lib/persist/tests/event.sx
Normal file
@@ -0,0 +1,30 @@
|
||||
; Phase 1 — event record accessors. Uses the persist-test harness
|
||||
; (persist-test name got expected) provided by conformance.sh.
|
||||
|
||||
(persist-test
|
||||
"event-stream"
|
||||
(persist/event-stream
|
||||
(persist/event "s" 1 "t" 0 {}))
|
||||
"s")
|
||||
(persist-test
|
||||
"event-seq"
|
||||
(persist/event-seq (persist/event "s" 3 "t" 0 {}))
|
||||
3)
|
||||
(persist-test
|
||||
"event-type"
|
||||
(persist/event-type
|
||||
(persist/event "s" 1 "create" 0 {}))
|
||||
"create")
|
||||
(persist-test
|
||||
"event-at"
|
||||
(persist/event-at (persist/event "s" 1 "t" 42 {}))
|
||||
42)
|
||||
(persist-test
|
||||
"event-data"
|
||||
(persist/event-data
|
||||
(persist/event "s" 1 "t" 0 {:x 9}))
|
||||
{:x 9})
|
||||
(persist-test
|
||||
"event is a dict with all fields"
|
||||
(len (keys (persist/event "s" 1 "t" 0 {})))
|
||||
5)
|
||||
Reference in New Issue
Block a user