diff options
| author | Andreas Grois <andi@grois.info> | 2025-01-11 23:39:24 +0100 |
|---|---|---|
| committer | Andreas Grois <andi@grois.info> | 2025-01-11 23:39:24 +0100 |
| commit | 0f1e30d0ab59a518c52eb64b0042eec4d212ef2f (patch) | |
| tree | 8dbb76e368050500c00ea0db21c2c48b570b1bce /LeanAStarTest.lean | |
| parent | bf12dcd38698d9e7fd0396722d7dd75ea1cefc88 (diff) | |
Add simple unit test (and fix path output, as discovered by test)
Diffstat (limited to 'LeanAStarTest.lean')
| -rw-r--r-- | LeanAStarTest.lean | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/LeanAStarTest.lean b/LeanAStarTest.lean new file mode 100644 index 0000000..adca44d --- /dev/null +++ b/LeanAStarTest.lean @@ -0,0 +1,14 @@ +import LeanAStarTest.Tests + +def main (params : List String) : IO UInt32 := do + if !params.isEmpty then + IO.println "Currently LeanAStarTest will run all tests, and not accept parameters." + return ⟨UInt32.size-1,by decide⟩ + let mut result : UInt32 := 0 + for (testName, test) in LeanAStarTests.ListTests do + if let Except.error e := test () then + IO.println s!"{testName} failed: {e}" + result := result + 1 + else + IO.println s!"{testName} succeeded." + return result |
