Add files via upload

This commit is contained in:
Gregory Bednov 2025-01-10 20:50:02 +03:00 committed by GitHub
commit fb6dd81f33
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 735 additions and 0 deletions

19
Tests/Test.hs Normal file
View file

@ -0,0 +1,19 @@
module Main (main) where -- move to main dir and rename into Main
import Ternary.Statement (Statement (..), st)
import Ternary.Universum (Universum (..), universum)
import Ternary.Vee (isObvious, think, cleared)
sylloTest :: IO ()
sylloTest = do
testStrs <- getContents
let tests = map (\x -> (read x :: (Statement String, Statement String, Statement String)) ) . lines $ testStrs
let run (_1, _2, _3)
= all (\vb -> any (\va -> (vb == va) || isObvious vb va) a) b where
a = think (universum Aristotle) $ map st [_1, _2]
b = think (universum Aristotle) [st _3]
putStrLn $ if all run tests
then "✅ Passed"
else "❌ Declined"
main = sylloTest