* Throws an exception containing the user_message (if any) and the values.
(expected, found, user_message = '')
| 99 | * Throws an exception containing the user_message (if any) and the values. |
| 100 | */ |
| 101 | function fail(expected, found, user_message = '') { |
| 102 | // TODO(cira): Replace String with PrettyPrint for objects and arrays. |
| 103 | var message = 'Failure' + (user_message ? ' (' + user_message + ')' : '') + |
| 104 | ': expected <' + String(expected) + '>, found <' + String(found) + '>.'; |
| 105 | throw new Error(message); |
| 106 | } |
| 107 | |
| 108 | |
| 109 | /** |
no test coverage detected
searching dependent graphs…