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
Fix #315 #342 #343
Fix #315 #342 #343
Changes from 2 commits
7b12cd6
118dd26
2b0fc20
1cbeeb4
ed10e63
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,18 +7,17 @@ import org.scalacheck.Arbitrary | |
import org.typelevel.discipline.Laws | ||
|
||
import scalaz.Equal | ||
import scalaz.std.option._ | ||
|
||
object AtTests extends Laws { | ||
|
||
def apply[S, I, A](i: I)(implicit aEq: Equal[A], aArb: Arbitrary[A], | ||
sEq: Equal[S], sArb: Arbitrary[S], | ||
evAt: At[S, I, A]): RuleSet = | ||
new SimpleRuleSet("At", LensTests(at(i)).props: _*) | ||
def apply[S, I, A](implicit aEq: Equal[A], aArb: Arbitrary[A], | ||
sEq: Equal[S], sArb: Arbitrary[S], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do you mind to maintain the vertical alignment |
||
iArb: Arbitrary[I], evAt: At[S, I, A]): RuleSet = { | ||
new SimpleRuleSet("At", LensTests(at(_: I)).props: _*) | ||
} | ||
|
||
def defaultIntIndex[S, A](implicit aEq: Equal[A], aArb: Arbitrary[A], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we can probably remove |
||
sEq: Equal[S], sArb: Arbitrary[S], | ||
evAt: At[S, Int, A]): RuleSet = | ||
apply[S, Int, A](2) | ||
|
||
sEq: Equal[S], sArb: Arbitrary[S], | ||
iArb: Arbitrary[Int], evAt: At[S, Int, A]): RuleSet = | ||
apply[S, Int, A] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,14 +10,14 @@ import scalaz.Equal | |
|
||
object IndexTests extends Laws { | ||
|
||
def apply[S, I, A](i: I)(implicit aEq: Equal[A], aArb: Arbitrary[A], | ||
sEq: Equal[S], sArb: Arbitrary[S], | ||
evIndex: Index[S, I, A]): RuleSet = | ||
new SimpleRuleSet("Index", OptionalTests(index(i)).props: _*) | ||
def apply[S, I, A](implicit aEq: Equal[A], aArb: Arbitrary[A], | ||
sEq: Equal[S], sArb: Arbitrary[S], | ||
iArb: Arbitrary[I], evIndex: Index[S, I, A]): RuleSet = | ||
new SimpleRuleSet("Index", OptionalTests(index(_ : I)).props: _*) | ||
|
||
def defaultIntIndex[S, A](implicit aEq: Equal[A], aArb: Arbitrary[A], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same |
||
sEq: Equal[S], sArb: Arbitrary[S], | ||
evIndex: Index[S, Int, A]): RuleSet = | ||
apply[S, Int, A](2) | ||
sEq: Equal[S], sArb: Arbitrary[S], | ||
evIndex: Index[S, Int, A]): RuleSet = | ||
apply[S, Int, A] | ||
|
||
} |
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.
can you add "test" modifier