summaryrefslogtreecommitdiff
path: root/test/files/jvm/signum.scala
blob: feb28d3e43628a6ce98db7401ce349d5b6490ed9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
object Test {
  def main(args: Array[String]) {
    assert(math.signum(Long.MaxValue) == 1L)
    assert(math.signum(1L) == 1L)
    assert(math.signum(0L) == 0L)
    assert(math.signum(-1L) == -1L)
    assert(math.signum(Long.MinValue) == -1L)

    assert(math.signum(Int.MaxValue) == 1)
    assert(math.signum(1) == 1)
    assert(math.signum(0) == 0)
    assert(math.signum(-1) == -1)
    assert(math.signum(Int.MinValue) == -1)
  }
}