Sha256: 2c67f256c04c2a3fd6088457414fe272ed2c78d653bdd7005352a776c7613bb0

Contents?: true

Size: 573 Bytes

Versions: 221

Compression:

Stored size: 573 Bytes

Contents

module Test.HelloWorld

import HelloWorld

%access export

assertEq : Eq a => (given : a) -> (expected : a) -> IO ()
assertEq g e = putStrLn $ if g == e
                             then "Test Passed"
                             else "Test Failed"

testNothing : IO ()
testNothing = assertEq (greet Nothing) "Hello, World!"

testJustAlice : IO ()
testJustAlice = assertEq (greet (Just "Alice")) "Hello, Alice!"

testJustBob : IO ()
testJustBob = assertEq (greet (Just "Bob")) "Hello, Bob!"

runTests : IO ()
runTests = do
    testNothing
    testJustAlice
    testJustBob

Version data entries

221 entries across 221 versions & 1 rubygems

Version Path
trackler-2.2.1.80 tracks/idris/exercises/hello-world/src/Test/HelloWorld.idr
trackler-2.2.1.79 tracks/idris/exercises/hello-world/src/Test/HelloWorld.idr
trackler-2.2.1.78 tracks/idris/exercises/hello-world/src/Test/HelloWorld.idr
trackler-2.2.1.77 tracks/idris/exercises/hello-world/src/Test/HelloWorld.idr
trackler-2.2.1.76 tracks/idris/exercises/hello-world/src/Test/HelloWorld.idr
trackler-2.2.1.75 tracks/idris/exercises/hello-world/src/Test/HelloWorld.idr
trackler-2.2.1.74 tracks/idris/exercises/hello-world/src/Test/HelloWorld.idr
trackler-2.2.1.73 tracks/idris/exercises/hello-world/src/Test/HelloWorld.idr
trackler-2.2.1.72 tracks/idris/exercises/hello-world/src/Test/HelloWorld.idr
trackler-2.2.1.71 tracks/idris/exercises/hello-world/src/Test/HelloWorld.idr
trackler-2.2.1.70 tracks/idris/exercises/hello-world/src/Test/HelloWorld.idr
trackler-2.2.1.69 tracks/idris/exercises/hello-world/src/Test/HelloWorld.idr
trackler-2.2.1.68 tracks/idris/exercises/hello-world/src/Test/HelloWorld.idr
trackler-2.2.1.67 tracks/idris/exercises/hello-world/src/Test/HelloWorld.idr
trackler-2.2.1.66 tracks/idris/exercises/hello-world/src/Test/HelloWorld.idr
trackler-2.2.1.65 tracks/idris/exercises/hello-world/src/Test/HelloWorld.idr
trackler-2.2.1.64 tracks/idris/exercises/hello-world/src/Test/HelloWorld.idr
trackler-2.2.1.63 tracks/idris/exercises/hello-world/src/Test/HelloWorld.idr
trackler-2.2.1.62 tracks/idris/exercises/hello-world/src/Test/HelloWorld.idr
trackler-2.2.1.61 tracks/idris/exercises/hello-world/src/Test/HelloWorld.idr