-
-
Notifications
You must be signed in to change notification settings - Fork 203
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
Port tests to munit #943
Port tests to munit #943
Conversation
Signed-off-by: Carlos Quiroz <[email protected]>
Looks great. I didn't see any test disabled. |
@@ -20,7 +20,7 @@ class StringsSpec extends MonocleSuite { | |||
checkAll("String to Int", PrismTests(stringToInt)) | |||
checkAll("String to Long", PrismTests(stringToLong)) | |||
checkAll("String to UUID", PrismTests(stringToUUID)) | |||
checkAll("String to URI", PrismTests(stringToURI)) | |||
// checkAll("String to URI", PrismTests(stringToURI)) |
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.
Here is one.
} | ||
|
||
test("monocle.std.all._ brings all polymorphic Optic instances in scope for standard Scala classes") { | ||
import monocle.function.all._ | ||
|
||
// do not compile because Head instance for HList is not in scope | ||
illTyped("""head[Int :: HNil, Int].modify(1 :: HNil, _ + 1) shouldEqual (2 :: HNil)""") | ||
illTyped("""assertEquals(head[Int :: HNil, Int].modify(1 :: HNil, _ + 1), (2 :: HNil))""") |
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.
On a second pass, we may want to use compileErrors
from munit instead of illTyped
I propose that we merge it and a few tickets to tackle the commented tests. WDYT? |
Sounds good, I think munit will make it easier to support dotty |
Definitely! |
} | ||
|
||
test("GenIso nullary equality") { | ||
GenIso.unit[Nullary] shouldEqual _nullary | ||
test("GenIso nullary equality".ignore) { |
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.
These are not working anymore, but TBH I don't know how could that have worked in the past
@@ -20,7 +20,7 @@ class StringsSpec extends MonocleSuite { | |||
checkAll("String to Int", PrismTests(stringToInt)) | |||
checkAll("String to Long", PrismTests(stringToLong)) | |||
checkAll("String to UUID", PrismTests(stringToUUID)) | |||
checkAll("String to URI", PrismTests(stringToURI)) | |||
// checkAll("String to URI", PrismTests(stringToURI)) |
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.
This one is odd. I think it is related to changes on Scalia check but I can't pinpoint the reason. Enabling it triggers an error during the generation of URIs
This PR ports all tests to munit. I had to disable a few tests that I'll point in the comments.
This also upgrades discipline-core