Lines Matching refs:code
6 // * Redistributions of source code must retain the above copyright
129 * Returns true if code throws specified exception.
131 function assertThrows(code, type_opt, cause_opt) {
134 if (typeof code == 'function') {
135 code();
137 eval(code);
155 * Throws an exception if code throws.
157 function assertDoesNotThrow(code, name_opt) {
159 if (typeof code == 'function') {
160 code();
162 eval(code);