Skip to content

Commit

Permalink
Bring back annotations test
Browse files Browse the repository at this point in the history
  • Loading branch information
KacperFKorban committed May 22, 2021
1 parent 3967fb1 commit 0ca4776
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/test/tests.scala
Expand Up @@ -257,6 +257,11 @@ class Tests extends munit.FunSuite {
assertEquals(res, "apple")
}

test("capture attributes against params") {
val res = summon[Show[String, Attributed]].show(Attributed("xyz", 100))
assertEquals(res, "Attributed{MyAnnotation(0)}{MyTypeAnnotation(2)}(p1{MyAnnotation(1)}{MyTypeAnnotation(0)}=xyz,p2{MyAnnotation(2)}{MyTypeAnnotation(1)}=100)")
}

test("test equality false") {
val res = Eq.derived[Entity].equal(Person("John Smith", 34), Person("", 0))
assert(!res)
Expand Down

0 comments on commit 0ca4776

Please sign in to comment.