Skip to content

Commit

Permalink
Failing test for issue #728
Browse files Browse the repository at this point in the history
  • Loading branch information
cchantep committed Mar 16, 2022
1 parent d841976 commit 92a5da0
Showing 1 changed file with 62 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ final class QuotesSpec extends AnyWordSpec with Matchers with org.scalatestplus.
"from Foo" in {
testWithTuple(
Foo("1", 2)
).mustEqual("scala.Tuple2[scala.Predef.String, scala.Int]/Foo(1,2)")
) mustEqual "scala.Tuple2[scala.Predef.String, scala.Int]/Foo(1,2)"
}

"from generic Bar" in {
Expand All @@ -87,6 +87,39 @@ final class QuotesSpec extends AnyWordSpec with Matchers with org.scalatestplus.
)
}

"from BigFat" in {
val tooBig = BigFat(
a = 1,
b = 2D,
c = 3F,
d = "d",
e = Seq(1, 2, 3),
f = 6,
g = 7D,
h = 8F,
i = "i",
j = Seq(4, 5),
k = 10,
l = 11D,
m = 12F,
n = "n",
o = Seq(6, 7),
p = 13,
q = 14D,
r = 15F,
s = "s",
t = Seq(8),
u = 16F,
v = "v",
w = Seq(9, 10, 11),
x = 12,
y = Seq(13, 14),
z = 15D
)

testWithTuple[BigFat](tooBig).mustEqual("TODO")
}

"from non-case class" when {
"fail when there is no Conversion[T, _ <: Product]" in {
"""testWithTuple(new TestUnion.UC("name", 2))""".mustNot(typeCheck)
Expand Down Expand Up @@ -143,6 +176,34 @@ case class Foo(bar: String, lorem: Int)

case class Bar[T](name: String, opt: Option[T], scores: Seq[Double])

case class BigFat(
a: Int,
b: Double,
c: Float,
d: String,
e: Seq[Int],
f: Int,
g: Double,
h: Float,
i: String,
j: Seq[Int],
k: Int,
l: Double,
m: Float,
n: String,
o: Seq[Int],
p: Int,
q: Double,
r: Float,
s: String,
t: Seq[Int],
u: Float,
v: String,
w: Seq[Int],
x: Int,
y: Seq[Int],
z: Double)

object TestUnion:
sealed trait UT
case object UA extends UT
Expand Down

0 comments on commit 92a5da0

Please sign in to comment.