diff --git a/tests/latch/latch-0.4.3.tgz b/tests/latch/latch-0.4.3.tgz deleted file mode 100644 index 85b171bff..000000000 Binary files a/tests/latch/latch-0.4.3.tgz and /dev/null differ diff --git a/tests/latch/latch-0.5.0.tgz b/tests/latch/latch-0.5.0.tgz new file mode 100644 index 000000000..53ee87eef Binary files /dev/null and b/tests/latch/latch-0.5.0.tgz differ diff --git a/tests/latch/package-lock.json b/tests/latch/package-lock.json index 88852dbfb..f3650b197 100644 --- a/tests/latch/package-lock.json +++ b/tests/latch/package-lock.json @@ -8,7 +8,7 @@ "name": "warduino-testsuite", "version": "1.0.0", "devDependencies": { - "latch": "file:./latch-0.4.1.tgz", + "latch": "file:./latch-0.5.0.tgz", "mqtt": "^4.3.7", "serialport": "^10.4.0", "typescript": "^4.5.5" @@ -247,6 +247,82 @@ "url": "https://opencollective.com/serialport/donate" } }, + "node_modules/@thi.ng/checks": { + "version": "3.8.8", + "resolved": "https://registry.npmjs.org/@thi.ng/checks/-/checks-3.8.8.tgz", + "integrity": "sha512-M2KXml9m2bhqtDAJou0HJWip2xjvXO2i4DhlJ4ouFRoRPY5aCA+EcHFlxNl/DeVtns/Cv86xIUtBGzXksVHk2A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/postspectacular" + }, + { + "type": "patreon", + "url": "https://patreon.com/thing_umbrella" + }, + { + "type": "liberapay", + "url": "https://liberapay.com/thi.ng" + } + ], + "license": "Apache-2.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/@thi.ng/errors": { + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/@thi.ng/errors/-/errors-2.6.7.tgz", + "integrity": "sha512-jFvECE7RPtB8P3BPL+XYOgGZqRheVtq32DAy3LJwbqgFP2v/lSyTwzvA47KsDKn1VDOGPGBhR5cM8eR7mnNbdQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/postspectacular" + }, + { + "type": "patreon", + "url": "https://patreon.com/thing_umbrella" + }, + { + "type": "liberapay", + "url": "https://liberapay.com/thi.ng" + } + ], + "license": "Apache-2.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/@thi.ng/leb128": { + "version": "3.1.83", + "resolved": "https://registry.npmjs.org/@thi.ng/leb128/-/leb128-3.1.83.tgz", + "integrity": "sha512-joed1lVCUA1GfrQjuftc/EO2VUXrhZogNfhRFk1wbtn4mquTVB1VORVSqiLgcRysRkTpwUeDG0py+o/zFXgdXw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/postspectacular" + }, + { + "type": "patreon", + "url": "https://patreon.com/thing_umbrella" + }, + { + "type": "liberapay", + "url": "https://liberapay.com/thi.ng" + } + ], + "license": "Apache-2.0", + "dependencies": { + "@thi.ng/checks": "^3.8.8", + "@thi.ng/errors": "^2.6.7" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/@tsconfig/node10": { "version": "1.0.12", "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.12.tgz", @@ -276,20 +352,20 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "24.10.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-24.10.1.tgz", - "integrity": "sha512-GNWcUTRBgIRJD5zj+Tq0fKOJ5XZajIiBroOF0yvj2bSU1WvNdYS/dn9UxwsujGW4JX06dnHyjV2y9rRaybH0iQ==", + "version": "25.6.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-25.6.0.tgz", + "integrity": "sha512-+qIYRKdNYJwY3vRCZMdJbPLJAtGjQBudzZzdzwQYkEPQd+PJGixUL5QfvCLDaULoLv+RhT3LDkwEfKaAkgSmNQ==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "undici-types": "~7.16.0" + "undici-types": "~7.19.0" } }, "node_modules/acorn": { - "version": "8.15.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", - "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz", + "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", "dev": true, "license": "MIT", "bin": { @@ -300,9 +376,9 @@ } }, "node_modules/acorn-walk": { - "version": "8.3.4", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", - "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", + "version": "8.3.5", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.5.tgz", + "integrity": "sha512-HEHNfbars9v4pgpW6SO1KSPkfoS0xVOM/9UzkJltjlsHZmJasxg8aXkuZa7SMf8vKGIBhpUsPluQSqhJFCqebw==", "dev": true, "license": "MIT", "dependencies": { @@ -383,9 +459,9 @@ } }, "node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.14.tgz", + "integrity": "sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g==", "dev": true, "license": "MIT", "dependencies": { @@ -527,9 +603,9 @@ } }, "node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.4.tgz", + "integrity": "sha512-X07nttJQkwkfKfvTPG/KSnE2OMdcUCao6+eXF3wmnIQRn2aPAHH3VxDbDOdegkd6JbPsXqShpvEOHfAT+nCNwQ==", "dev": true, "license": "BSD-3-Clause", "engines": { @@ -574,9 +650,9 @@ "license": "ISC" }, "node_modules/get-east-asian-width": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.4.0.tgz", - "integrity": "sha512-QZjmEOC+IT1uk6Rx0sX22V6uHWVwbdbxf1faPqJ1QhLdGgsRGCZoyaQBm/piRdJy/D2um6hM1UP7ZEeQ4EkP+Q==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.5.0.tgz", + "integrity": "sha512-CQ+bEO+Tva/qlmw24dCejulK5pMzVnUOFOijVogd3KQs07HnRIgp8TGipvCCRT06xeYEbpbgwaCxglFyiuIcmA==", "dev": true, "license": "MIT", "engines": { @@ -590,7 +666,7 @@ "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "deprecated": "Glob versions prior to v9 are no longer supported", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", "dev": true, "license": "ISC", "dependencies": { @@ -697,11 +773,12 @@ } }, "node_modules/latch": { - "version": "0.4.1", - "resolved": "file:latch-0.4.1.tgz", - "integrity": "sha512-GvpSRSwFcXl6t5h2gKyVbCB65QMJhzDhhSR+Yrl7H+AtApqJqYowl0vaDIUVrDgRvq/VBASZNYwy33TCuuxWlg==", + "version": "0.5.0", + "resolved": "file:latch-0.5.0.tgz", + "integrity": "sha512-2IzWl3cDGPkE6+7+GySZvkw3TPOimkoamNIjAdNXiiWJPdqJ5PP6MEJgp+uQibolpPz6UDZjOq6kpIuwr21caQ==", "dev": true, "dependencies": { + "@thi.ng/leb128": "^3.1.75", "ansi-colors": "^4.1.3", "ieee754": "^1.2.1", "ora": "^8.0.1", @@ -784,9 +861,9 @@ } }, "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", "dev": true, "license": "ISC", "dependencies": { @@ -957,9 +1034,9 @@ "license": "MIT" }, "node_modules/pump": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.3.tgz", - "integrity": "sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.4.tgz", + "integrity": "sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA==", "dev": true, "license": "MIT", "dependencies": { @@ -1145,13 +1222,13 @@ } }, "node_modules/strip-ansi": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", - "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", "dev": true, "license": "MIT", "dependencies": { - "ansi-regex": "^6.0.1" + "ansi-regex": "^6.2.2" }, "engines": { "node": ">=12" @@ -1224,6 +1301,7 @@ "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", "dev": true, "license": "Apache-2.0", + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -1233,12 +1311,11 @@ } }, "node_modules/undici-types": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.16.0.tgz", - "integrity": "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==", + "version": "7.19.2", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.19.2.tgz", + "integrity": "sha512-qYVnV5OEm2AW8cJMCpdV20CDyaN3g0AjDlOGf1OW4iaDEx8MwdtChUp4zu4H0VP3nDRF/8RKWH+IPp9uW0YGZg==", "dev": true, - "license": "MIT", - "peer": true + "license": "MIT" }, "node_modules/util-deprecate": { "version": "1.0.2", diff --git a/tests/latch/package.json b/tests/latch/package.json index 68e0e1f17..9b23efe98 100644 --- a/tests/latch/package.json +++ b/tests/latch/package.json @@ -8,7 +8,7 @@ "comptest": "npx ts-node ./src/comp.test.ts" }, "devDependencies": { - "latch": "file:./latch-0.4.3.tgz", + "latch": "file:./latch-0.5.0.tgz", "mqtt": "^4.3.7", "serialport": "^10.4.0", "typescript": "^4.5.5" diff --git a/tests/latch/src/comp.test.ts b/tests/latch/src/comp.test.ts index f38095a2b..d00eb8a56 100644 --- a/tests/latch/src/comp.test.ts +++ b/tests/latch/src/comp.test.ts @@ -11,7 +11,7 @@ import { } from "latch"; const framework = Framework.getImplementation(); -framework.style(StyleType.github); +framework.reporter.style(StyleType.github) const suite = framework.suite('Specification test suite for WebAssembly'); suite.testee('emulator [:8500]', new EmulatorSpecification(8500)); @@ -89,4 +89,4 @@ suite.test({ // run tests -framework.run([suite]); +framework.analyse([suite]); diff --git a/tests/latch/src/debugger.test.ts b/tests/latch/src/debugger.test.ts index b78eaec27..03231ac96 100644 --- a/tests/latch/src/debugger.test.ts +++ b/tests/latch/src/debugger.test.ts @@ -26,7 +26,7 @@ const EXAMPLES: string = `${__dirname}/../examples/`; */ const framework = Framework.getImplementation(); -framework.style(StyleType.github); +framework.reporter.style(StyleType.github) const integration: Suite = framework.suite('Integration tests: Debugger'); // must be called first @@ -332,4 +332,4 @@ const dumpEventsTest: TestScenario = { integration.test(dumpEventsTest); -framework.run([integration]); +framework.analyse([integration]); diff --git a/tests/latch/src/primitives.test.ts b/tests/latch/src/primitives.test.ts index a08cd28e3..ef10ef52e 100644 --- a/tests/latch/src/primitives.test.ts +++ b/tests/latch/src/primitives.test.ts @@ -15,7 +15,7 @@ import Type = WASM.Type; import {Breakpoint} from "latch/dist/types/debug/Breakpoint"; const framework = Framework.getImplementation(); -framework.style(StyleType.github); +framework.reporter.style(StyleType.github) // TODO disclaimer: file is currently disabled until latch supports AS compilation @@ -165,4 +165,4 @@ export function listen(topic: string): PureAction { comms.test(scenario); -framework.run([]); +framework.analyse([]); diff --git a/tests/latch/src/spec.test.ts b/tests/latch/src/spec.test.ts index dcc1a06a9..4c579b18a 100644 --- a/tests/latch/src/spec.test.ts +++ b/tests/latch/src/spec.test.ts @@ -58,14 +58,14 @@ if (TESTFILE.length > 0) { // run tests const framework = Framework.getImplementation(); -framework.style(StyleType.github); +framework.reporter.style(StyleType.github) const spec = framework.suite('Specification test suite for WebAssembly'); spec.testee('emulator [:8500]', new EmulatorSpecification(8500)); //spec.testee('esp wrover', new ArduinoSpecification('/dev/ttyUSB0', 'esp32:esp32:esp32wrover'), new HybridScheduler()); spec.tests(tests); -framework.run([spec]); +framework.analyse([spec]); // Helper function @@ -75,8 +75,8 @@ function createTest(module: string, asserts: string[]): TestScenario { for (const assert of asserts) { const cursor = {value: 0}; const func: string = find(/invoke "([^"]+)"/, assert); - const args: WASM.Value[] = parseArguments(assert.replace(`(invoke "${func} "`, ''), cursor); - const result: WASM.Value | undefined = parseResult(assert.slice(cursor.value)); + const args: WASM.Value[] = parseArguments(assert.replace(`(invoke "${func} "`, ''), cursor); + const result: WASM.Value | undefined = parseResult(assert.slice(cursor.value)); steps.push({ title: assert, diff --git a/tests/latch/src/util/spec.util.ts b/tests/latch/src/util/spec.util.ts index 94c5a63c9..02dabaa6f 100644 --- a/tests/latch/src/util/spec.util.ts +++ b/tests/latch/src/util/spec.util.ts @@ -5,7 +5,7 @@ interface Cursor { value: number; } -export function parseResult(input: string): WASM.Value | undefined { +export function parseResult(input: string): WASM.Value | undefined { let cursor = 0; let delta: number = consume(input, cursor, /\(/d); if (delta === 0) { @@ -14,13 +14,13 @@ export function parseResult(input: string): WASM.Value | undefined { cursor += delta; delta = consume(input, cursor, /^[^.)]*/d); - const type: WASM.Type = WASM.typing.get(input.slice(cursor, cursor + delta)) ?? WASM.Type.i64; + const type: WASM.Type = WASM.typing.get(input.slice(cursor, cursor + delta)) ?? WASM.Integer.i64; cursor += delta + consume(input, cursor + delta); let value; delta = consume(input, cursor, /^[^)]*/d); - if (type === WASM.Type.f32 || type === WASM.Type.f64) { + if (type === WASM.Float.f32 || type === WASM.Float.f64) { value = parseHexFloat(input.slice(cursor, cursor + delta)); } else { value = parseInteger(input.slice(cursor, cursor + delta)); @@ -33,8 +33,8 @@ export function parseResult(input: string): WASM.Value | undefined { return {type, value}; } -export function parseArguments(input: string, index: Cursor): WASM.Value[] { - const args: WASM.Value[] = []; +export function parseArguments(input: string, index: Cursor): WASM.Value[] { + const args: WASM.Value[] = []; let cursor: number = consume(input, 0, /invoke "[^"]+"/d); while (cursor < input.length) { @@ -45,12 +45,12 @@ export function parseArguments(input: string, index: Cursor): WASM.Value[] { cursor += delta; delta = consume(input, cursor, /^[^.)]*/d); - const type: WASM.Type = WASM.typing.get(input.slice(cursor + delta - 3, cursor + delta)) ?? WASM.Type.i64; + const type: WASM.Type = WASM.typing.get(input.slice(cursor + delta - 3, cursor + delta)) ?? WASM.Integer.i64; cursor += delta + consume(input, cursor + delta, /^[^)]*const /d); delta = consume(input, cursor, /^[^)]*/d); let maybe: number | undefined; - if (type === WASM.Type.f32 || type === WASM.Type.f64) { + if (type === WASM.Float.f32 || type === WASM.Float.f64) { maybe = parseHexFloat(input.slice(cursor, cursor + delta)); } else { maybe = parseInteger(input.slice(cursor, cursor + delta));