chore: scaffold tracks and tooling
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6dc5bdde9e
commit
e150b7fefb
27 files changed
+282
No files matched your search
@@ -0,0 +1,23 @@
|
||||
module Snake.Tests.M00Sanity
|
||||
|
||||
open System.Text.Json
|
||||
open Expecto
|
||||
open Snake.Tests
|
||||
|
||||
[<Tests>]
|
||||
let tests =
|
||||
testList "M00 sanity" [
|
||||
test "arithmetic" { Expect.equal (1 + 1) 2 "1 + 1" }
|
||||
|
||||
test "fixture loads and cases hold" {
|
||||
Expect.equal ((Fixtures.load "m00-sanity").GetProperty("function").GetString()) "sanity" "function"
|
||||
for c in Fixtures.cases "m00-sanity" do
|
||||
let a = c.GetProperty("args").EnumerateArray() |> Seq.map (fun e -> e.GetInt32()) |> List.ofSeq
|
||||
Expect.equal (List.sum a) (c.GetProperty("expected").GetInt32()) (c.GetProperty("name").GetString())
|
||||
}
|
||||
|
||||
test "opt decodes null" {
|
||||
use d = JsonDocument.Parse("null")
|
||||
Expect.isNone (Fixtures.opt (fun e -> e.GetInt32()) d.RootElement) "null"
|
||||
}
|
||||
]
|
||||
Reference in new issue
Block a user