| function assert(expr, message) { |
| throw new Error(`Assertion Failed: ${message}`); |
| equals(actual, expected) { |
| assert(actual === expected, `expected ${expected} but found ${actual}`); |
| if (typeof errorType === "function") |
| assert(e instanceof errorType, `expected to throw ${errorType.name} but threw ${e}`); |
| assert(false, `expected to throw, but no exception was thrown.`); |
| noInline(C.prototype.setField); |
| noInline(C.prototype.getField); |
| noDFG(C.prototype.setField); |
| noFTL(C.prototype.setField); |
| assert.equals(c.getField(), 'test'); |
| assert.equals(c.getField(), 'foo' + i); |