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.100 tracks/idris/exercises/hello-world/src/Test/HelloWorld.idr
trackler-2.2.1.99 tracks/idris/exercises/hello-world/src/Test/HelloWorld.idr
trackler-2.2.1.98 tracks/idris/exercises/hello-world/src/Test/HelloWorld.idr
trackler-2.2.1.97 tracks/idris/exercises/hello-world/src/Test/HelloWorld.idr
trackler-2.2.1.96 tracks/idris/exercises/hello-world/src/Test/HelloWorld.idr
trackler-2.2.1.95 tracks/idris/exercises/hello-world/src/Test/HelloWorld.idr
trackler-2.2.1.94 tracks/idris/exercises/hello-world/src/Test/HelloWorld.idr
trackler-2.2.1.93 tracks/idris/exercises/hello-world/src/Test/HelloWorld.idr
trackler-2.2.1.92 tracks/idris/exercises/hello-world/src/Test/HelloWorld.idr
trackler-2.2.1.91 tracks/idris/exercises/hello-world/src/Test/HelloWorld.idr
trackler-2.2.1.90 tracks/idris/exercises/hello-world/src/Test/HelloWorld.idr
trackler-2.2.1.89 tracks/idris/exercises/hello-world/src/Test/HelloWorld.idr
trackler-2.2.1.88 tracks/idris/exercises/hello-world/src/Test/HelloWorld.idr
trackler-2.2.1.87 tracks/idris/exercises/hello-world/src/Test/HelloWorld.idr
trackler-2.2.1.86 tracks/idris/exercises/hello-world/src/Test/HelloWorld.idr
trackler-2.2.1.85 tracks/idris/exercises/hello-world/src/Test/HelloWorld.idr
trackler-2.2.1.84 tracks/idris/exercises/hello-world/src/Test/HelloWorld.idr
trackler-2.2.1.83 tracks/idris/exercises/hello-world/src/Test/HelloWorld.idr
trackler-2.2.1.82 tracks/idris/exercises/hello-world/src/Test/HelloWorld.idr
trackler-2.2.1.81 tracks/idris/exercises/hello-world/src/Test/HelloWorld.idr