Skip to content

Commit

Permalink
Merge pull request #1157 from joroKr21/reify
Browse files Browse the repository at this point in the history
Add a regression test for Reify
  • Loading branch information
joroKr21 authored May 8, 2021
2 parents 1b1fb4f + f790cd1 commit a56beb7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/src/test/scala/shapeless/coproduct.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1862,6 +1862,7 @@ class CoproductTests {

@Test
def testReify: Unit = {
import GenericTestsAux._
import syntax.singleton._

assertTypedEquals(HNil, Reify[CNil].apply())
Expand All @@ -1872,6 +1873,9 @@ class CoproductTests {
val s2 = Coproduct.`'a, 1, "b", true`
assertEquals(Symbol("a").narrow :: 1.narrow :: "b".narrow :: true.narrow :: HNil, Reify[s2.T].apply())

val gen = Generic[Enum]
assertEquals(A :: B :: C :: HNil, Reify[gen.Repr].apply())

illTyped(""" Reify[String :+: Int :+: CNil] """)
illTyped(""" Reify[String :+: Coproduct.`'a, 1, "b", true`.T] """)
}
Expand Down

0 comments on commit a56beb7

Please sign in to comment.