* Runs code() and asserts that it does now throw any exception.
(code, user_message = '')
| 181 | * Runs code() and asserts that it does now throw any exception. |
| 182 | */ |
| 183 | function assertDoesNotThrow(code, user_message = '') { |
| 184 | try { |
| 185 | if (typeof code == 'function') { |
| 186 | code(); |
| 187 | } else { |
| 188 | eval(code); |
| 189 | } |
| 190 | } catch (e) { |
| 191 | fail("no expection", "exception: " + String(e), user_message); |
| 192 | } |
| 193 | } |
| 194 | |
| 195 | |
| 196 | /** |
no test coverage detected
searching dependent graphs…