Initial Dever 0.0.1

This commit is contained in:
Codex committed 2026-11-03 03:32:07 +00:00
commit 81233d098c
1479 files changed
+163782

No files matched your search

+35
View File
@@ -0,0 +1,35 @@
present(value: null) (answer: Bool) { answer = false }
present(value: Uuid) (answer: Bool) {
values = { value = 1 }
values = put(values, value, 2)
answer = uuid.toText(value) == "550e8400-e29b-41d4-a716-446655440000" and get(values, value) == 2 and length(values) == 1
}
verify() (answer: Bool) pure {
answer = present(uuid.parse("550E8400-E29B-41D4-A716-446655440000")) and uuid.parse("550e8400e29b41d4a716446655440000") == null and uuid.parse("00000000-0000-0000-0000-00000000000-") == null
}
normalized(value: null) (text: Text?) pure { text = null }
normalized(value: Uuid) (text: Text?) pure { text = uuid.toText(value) }
roundtrip(text: Text) (value: Text?) pure { value = normalized(uuid.parse(text)) }
batchWithPending(values: List<Text>) (formatted: List<Text?>) {
pending = run(dever.task.sleep(60000))
formatted = each(roundtrip, values)
stop(pending)
}
batchVerify() (answer: Bool) {
values = ["550E8400-E29B-41D4-A716-446655440000", "invalid"]
formatted = batchWithPending(values)
empty = batchWithPending([])
invalid = batchWithPending(["invalid"])
answer = length(formatted) == 2 and first(formatted) == "550e8400-e29b-41d4-a716-446655440000" and length(invalid) == 1 and first(invalid) == null and length(empty) == 0 and values == ["550E8400-E29B-41D4-A716-446655440000", "invalid"]
}
taskVerify() (answer: Bool) {
pending = run(roundtrip("550E8400-E29B-41D4-A716-446655440000"))
value = wait(pending)
answer = value == roundtrip("550E8400-E29B-41D4-A716-446655440000")
}