Skip to content

Commit

Permalink
Remove unnecessary specs from NumericTypesSpec
Browse files Browse the repository at this point in the history
  • Loading branch information
sh0hei committed Jun 15, 2018
1 parent 0ee04b0 commit 2828bb2
Showing 1 changed file with 0 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,6 @@ class NumericTypesSpec extends Properties("NumericTypes") {
PosByte.from(-1: Byte) ?= Left("Predicate failed: (-1 > 0).")
}

property("PosByte.unapply(1: Byte)") = secure {
val PosByte(x) = 1: Byte
x ?= PosByte.unsafeFrom(1: Byte)
}

property("PosByte.unsafeFrom(1: Byte)") = wellTyped {
PosByte.unsafeFrom(1: Byte)
}

property("PosByte.unsafeFrom(-1: Byte)") = secure {
throws(classOf[IllegalArgumentException])(PosByte.unsafeFrom(-1: Byte))
}

property("NonNegByte.from(0: Byte)") = secure {
NonNegByte.from(0: Byte).isRight
}
Expand All @@ -47,19 +34,6 @@ class NumericTypesSpec extends Properties("NumericTypes") {
PosShort.from(-1: Short) ?= Left("Predicate failed: (-1 > 0).")
}

property("PosShort.unapply(1: Short)") = secure {
val PosShort(x) = 1: Short
x ?= PosShort.unsafeFrom(1: Short)
}

property("PosShort.unsafeFrom(1: Short)") = wellTyped {
PosShort.unsafeFrom(1: Short)
}

property("PosShort.unsafeFrom(-1: Short)") = secure {
throws(classOf[IllegalArgumentException])(PosShort.unsafeFrom(-1: Short))
}

property("NonNegShort.from(0: Short)") = secure {
NonNegShort.from(0: Short).isRight
}
Expand Down

0 comments on commit 2828bb2

Please sign in to comment.