Skip to content

Commit c96c0fb

Browse files
author
pkiersznowski
committed
removing redundancy in scalacheck module
1 parent facb302 commit c96c0fb

File tree

4 files changed

+35
-24
lines changed

4 files changed

+35
-24
lines changed

scalacheck/src/test/scala-2/pl/iterators/kebs/scalacheck/AnyValGeneratorsTests.scala

+1-9
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,7 @@ import org.scalatest.matchers.should.Matchers
44
import pl.iterators.kebs.scalacheck._
55
import java.net.{URI, URL}
66
import java.time.{Duration, Instant, LocalDate, LocalDateTime, LocalTime, ZonedDateTime}
7-
8-
case class WrappedInt(int: Int)
9-
case class WrappedIntAnyVal(int: Int) extends AnyVal
10-
case class BasicSample(
11-
someNumber: Int,
12-
someText: String,
13-
wrappedNumber: WrappedInt,
14-
wrappedNumberAnyVal: WrappedIntAnyVal,
15-
)
7+
import pl.iterators.kebs.scalacheck.model._
168

179
class AnyValGeneratorsTests extends AnyFunSuite with Matchers {
1810

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package pl.iterators.kebs.scalacheck
2+
3+
package object model {
4+
case class WrappedInt(int: Int)
5+
case class WrappedIntAnyVal(int: Int) extends AnyVal
6+
case class BasicSample(
7+
someNumber: Int,
8+
someText: String,
9+
wrappedNumber: WrappedInt,
10+
wrappedNumberAnyVal: WrappedIntAnyVal,
11+
)
12+
}

scalacheck/src/test/scala-3/pl/iterators/kebs/scalacheck/OpaqueGeneratorsTests.scala

+1-15
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,7 @@ import org.scalatest.matchers.should.Matchers
55
import java.net.{URI, URL}
66
import java.time.{Duration, Instant, LocalDate, LocalDateTime, LocalTime, ZonedDateTime}
77
import pl.iterators.kebs.opaque.Opaque
8-
9-
10-
case class WrappedInt(int: Int)
11-
12-
opaque type OpaqueInt = Int
13-
object OpaqueInt extends Opaque[OpaqueInt, Int] {
14-
override def apply(value: Int) = value
15-
}
16-
17-
case class BasicSampleWithOpaque(
18-
someNumber: Int,
19-
someText: String,
20-
wrappedNumber: WrappedInt,
21-
opaqueInt: OpaqueInt
22-
)
8+
import pl.iterators.kebs.scalacheck.model._
239

2410
class OpaqueGeneratorsTests extends AnyFunSuite with Matchers {
2511

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package pl.iterators.kebs.scalacheck
2+
3+
import pl.iterators.kebs.opaque.Opaque
4+
5+
package object model {
6+
7+
case class WrappedInt(int: Int)
8+
9+
opaque type OpaqueInt = Int
10+
object OpaqueInt extends Opaque[OpaqueInt, Int] {
11+
override def apply(value: Int) = value
12+
}
13+
14+
case class BasicSampleWithOpaque(
15+
someNumber: Int,
16+
someText: String,
17+
wrappedNumber: WrappedInt,
18+
opaqueInt: OpaqueInt
19+
)
20+
21+
}

0 commit comments

Comments
 (0)