Finished go/pov

This commit is contained in:
2017-08-24 12:10:01 -05:00
parent 862e37f5fb
commit 169f72ca40
11 changed files with 1117 additions and 22 deletions

View File

@@ -0,0 +1,21 @@
# Hello World
The classical introductory exercise. Just say "Hello, World!".
["Hello, World!"](http://en.wikipedia.org/wiki/%22Hello,_world!%22_program) is
the traditional first program for beginning programming in a new language
or environment.
The objectives are simple:
- Write a function that returns the string "Hello, World!".
- Run the test suite and make sure that it succeeds.
- Submit your solution and check it at the website.
If everything goes well, you will be ready to fetch your first real exercise.
## Source
This is an exercise to introduce users to using Exercism [http://en.wikipedia.org/wiki/%22Hello,_world!%22_program](http://en.wikipedia.org/wiki/%22Hello,_world!%22_program)
## Submitting Incomplete Solutions
It's possible to submit an incomplete solution so you can see how others have completed the exercise.

View File

@@ -0,0 +1,17 @@
{
"name": "hello-world",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"output"
],
"dependencies": {
"purescript-prelude": "^3.0.0",
"purescript-console": "^3.0.0"
},
"devDependencies": {
"purescript-psci-support": "^3.0.0",
"purescript-test-unit": "^11.0.0"
}
}

View File

@@ -0,0 +1 @@
module HelloWorld where

View File

@@ -0,0 +1,18 @@
module Test.Main where
import Prelude
import Test.Unit (suite, test)
import Test.Unit.Main (runTest)
import Test.Unit.Assert as Assert
import Data.Maybe (Maybe(Just, Nothing))
import HelloWorld (helloWorld)
main = runTest do
suite "HelloWorld.helloWorld" do
test "Hello with no name" do
Assert.equal "Hello, World!" (helloWorld Nothing)
test "Hello to a sample name" do
Assert.equal "Hello, Alice!" (helloWorld (Just "Alice"))
test "Hello to another sample name" do
Assert.equal "Hello, Bob!" (helloWorld (Just "Bob"))