-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ch 7 unit tests pass #146
Ch 7 unit tests pass #146
Conversation
* formatted solutions * Add solution for additional filtering tests Co-authored-by: oldfartdeveloper <[email protected]>
Did you know that you can write derive instance eqPhoneType :: Eq PhoneType and have the compiler write this code for you? |
@hdgarrood Dang, you're right; I forgot all about |
d894b67
to
690b9d1
Compare
I don't think that's possible, but don't worry about it. We can either just make a note about exercises without tests, remove the exercise, or replace with a new testable exercise.
I believe all the prerequisites for that are covered in Ch6, but feel free continue on with the book.
A guide on running tests will be part of Ch2 (PR #144), so I don't think we need to write much more about in in Ch7. |
I rebased the solutions branch on master to remove the distracting newtype wrapper changes from this PR. You'll want to rebase your solutions on the latest solutions branch too to re-sync everything. |
In order to not confuse readers when adding this to the AddressBook.purs file, I think it would be good to cover derive instance eqPhoneType :: Eq PhoneType |
How about just a comment next to the statement containing the |
Just a comment on |
@milesfrain After your rebase, there were some merge conflicts which I resolved. Travis passed. |
2fd2bd6
to
ccf6e00
Compare
Per PR #147, modified this one's first unit test to match the |
@@ -6,6 +6,25 @@ import Data.Maybe (Maybe(..)) | |||
import Data.Path (filename, root) | |||
import Data.Tuple (fst) | |||
import Effect (Effect) | |||
import Test.Solutions | |||
( allTrue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't seem like this is rebased correctly on the latest solutions (or master) branch, since there shouldn't be any changes here outside of ch7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I've noticed (and wondered about) that as well. It's become tricky.
I'll need to rebase solutions on master again. But to spare the hassle in coordinating that, feel free to just redirect this PR to the |
When I switch the target to |
@oldfartdeveloper |
Issue #109
TLDR: I have all but three of the exercises covered by unit tests:
lift3
. This is proven by failed compilation; at some point I'll find a way to write a unit test that can respond to failed compilations.Traversable
instance for a binary tree. I want to read more of the book so that I can write the tests for this as @milesfrain and @hdgarrood have suggested.traverse
implemented insequence
and vice-versa. I want to go on and come back to this.Other Details
Initial Test
I needed to add
to AddressBook.purs to get the unit tests to run. Hence, in addition I wrote a unit test to test this as the proof that unit tests are set up for this chapter.
Changes to
AddressBook.purs
andValidation.purs
Brought in @milesfrain simplifications to these two packages.
Brought in @milesfrain changes in branch
master
So this PR will replace this branch's
test/chapter7.md
with themaster
branch one.Still to be Done
master
branch chapter 7 changes; will hopefully get that done today.