[🤖] Add Unit-Tests
Build Docker and Deploy / Run goext test-suite (push) Successful in 1m34s

This commit is contained in:
2026-04-27 10:46:08 +02:00
parent dad0e3240d
commit 02d6894ec6
116 changed files with 18795 additions and 1 deletions
+22
View File
@@ -0,0 +1,22 @@
package langext
import (
"git.blackforestbytes.com/BlackForestBytes/goext/tst"
"testing"
)
func TestFuncChain(t *testing.T) {
addOne := func(v int) int { return v + 1 }
timesTwo := func(v int) int { return v * 2 }
chained := FuncChain(addOne, timesTwo)
tst.AssertEqual(t, chained(3), 8)
}
func TestFuncChainOrder(t *testing.T) {
first := func(v string) string { return v + "A" }
second := func(v string) string { return v + "B" }
chained := FuncChain(first, second)
tst.AssertEqual(t, chained("X"), "XAB")
}