test: Initial test work

This commit is contained in:
2025-10-19 22:51:10 +01:00
parent f013d3320d
commit a5efb0ae8d
3 changed files with 37 additions and 7 deletions

View File

@@ -1,13 +1,21 @@
import gleeunit
import dllist
import startest
pub fn main() -> Nil {
gleeunit.main()
startest.run(startest.default_config())
}
// gleeunit test functions end in `_test`
pub fn hello_world_test() {
let name = "Joe"
let greeting = "Hello, " <> name <> "!"
pub fn is_empty_tests() {
startest.describe("is_emtpy", [
startest.it("terminated list", fn() {
assert dllist.is_empty(dllist.new())
assert greeting == "Hello, Joe!"
assert !dllist.is_empty(dllist.new() |> dllist.insert(1))
}),
startest.it("cyclic list", fn() {
assert dllist.is_empty(dllist.new_cyclic())
assert !dllist.is_empty(dllist.new_cyclic() |> dllist.insert(1))
}),
])
}