UNPKG

shift-interpreter

Version:

Shift-interpreter is an experimental JavaScript meta-interpreter useful for reverse engineering and analysis. One notable difference from other projects is that shift-interpreter retains state over an entire script but can be fed expressions and statement

12 lines 585 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const util_1 = require("../util"); describe('UpdateExpression', () => { it('should evaluate operators the same as the host environment', () => { util_1.assertResult(util_1.compare(`let a = 0; let b = a++; b`)); util_1.assertResult(util_1.compare(`let a = 0; let b = ++a; b`)); util_1.assertResult(util_1.compare(`let a = 0; let b = a--; b`)); util_1.assertResult(util_1.compare(`let a = 0; let b = --a; b`)); }); }); //# sourceMappingURL=update-expressions.test.js.map