author | Christian Urban <urbanc@in.tum.de> |
Tue, 13 Aug 2019 10:23:20 +0100 | |
changeset 275 | eb1b4ad23941 |
parent 268 | e43f7e92ba26 |
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)) |