-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
27c7c9f
commit b5c12d6
Showing
5 changed files
with
54 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
module TestDay09 (test) where | ||
|
||
import Day09 | ||
import Test.Hspec | ||
|
||
input :: String | ||
input = "0 3 6 9 12 15\n 1 3 6 10 15 21\n10 13 16 21 30 45" | ||
|
||
test1 :: Expectation | ||
test1 = part1 input `shouldBe` "114" | ||
|
||
test2 :: Expectation | ||
test2 = part2 input `shouldBe` "2" | ||
|
||
test :: IO () | ||
test = hspec $ do | ||
describe "day09" $ do | ||
describe "part1" $ do | ||
it "should work for the examples" test1 | ||
|
||
describe "part2" $ do | ||
it "should work for the examples" test2 |