Skip to content

Commit

Permalink
hello-world: Update tests and example to 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ee7 authored and amscotti committed Feb 8, 2019
1 parent 0b7fcba commit d1f7782
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
4 changes: 2 additions & 2 deletions exercises/hello-world/example.nim
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
proc helloworld*(name="World"): string =
return "Hello, " & name & "!"
proc hello*: string =
"Hello, World!"
14 changes: 4 additions & 10 deletions exercises/hello-world/hello_world_test.nim
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
import unittest
import hello_world

import helloworld
# version 1.1.0

suite "Hello World":

test "no name":
check helloworld() == "Hello, World!"

test "sample name":
check helloworld("Alice") == "Hello, Alice!"

test "other sample name":
check helloworld("Bob") == "Hello, Bob!"
test "say hi":
check hello() == "Hello, World!"

0 comments on commit d1f7782

Please sign in to comment.