Skip to content

Commit

Permalink
Test LongRanges
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkusAmshove committed Jan 5, 2017
1 parent 09a588d commit 58311e8
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,21 @@ class ShouldBeInRangeTests : Spek({
assertFails { 5.`should be in range`(6..9) }
}
}
on("checking a long value which is in a range") {
it("should pass with lower and upper bound") {
0L.`should be in range`(Long.MIN_VALUE, Long.MAX_VALUE)
}
it("should pass with lower a LongRange") {
0L.`should be in range`(Long.MIN_VALUE..Long.MAX_VALUE)
}
}
on("checking a long value which is not in a range") {
it("should fail with lower and upper bound") {
assertFails { Long.MIN_VALUE.`should be in range`(0L, Long.MAX_VALUE) }
}
it("should fail with a LongRange") {
assertFails { Long.MIN_VALUE.`should be in range`(0L..Long.MAX_VALUE) }
}
}
}
})

0 comments on commit 58311e8

Please sign in to comment.