author | Christian Urban <urbanc@in.tum.de> |
Thu, 01 Aug 2019 09:48:34 +0100 | |
changeset 268 | e43f7e92ba26 |
parent 261 | 8997430d9765 |
child 281 | 87b9e3e2c1a7 |
permissions | -rw-r--r-- |
268 | 1 |
def myassert(cond : => Boolean) = { |
2 |
try { |
|
3 |
assert(cond) |
|
4 |
} catch { |
|
5 |
case _ : Throwable => System.exit(1) |
|
6 |
} |
|
7 |
} |
|
260 | 8 |
|
268 | 9 |
myassert(get_delta(None, None) == None) |
10 |
myassert(get_delta(Some(50.0), None) == None) |
|
11 |
myassert(get_delta(None, Some(100.0)) == None) |
|
12 |
myassert(get_delta(Some(50.0), Some(100.0)) == Some(1.0)) |