Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Debug/debugger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -394,15 +394,15 @@ void Debugger::printValue(const StackValue *v, const uint32_t idx,
v->value.uint64);
break;
case F32:
snprintf(buff, 255, R"("type":"F32","value":")" FMT(PRIx32) "\"",
snprintf(buff, 255, R"("type":"F32","value":")" FMT(PRIi32) "\"",
v->value.uint32);
break;
case F64:
snprintf(buff, 255, R"("type":"F64","value":")" FMT(PRIx64) "\"",
snprintf(buff, 255, R"("type":"F64","value":")" FMT(PRIi64) "\"",
v->value.uint64);
break;
default:
snprintf(buff, 255, R"("type":"%02x","value":")" FMT(PRIx64) "\"",
snprintf(buff, 255, R"("type":"%02x","value":")" FMT(PRIi64) "\"",
v->value_type, v->value.uint64);
}
this->channel->write(R"({"idx":%d,%s}%s)", idx, buff, end ? "" : ",");
Expand Down
36 changes: 36 additions & 0 deletions tests/latch/src/r3.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import {EmulatorSpecification, Framework, Kind, Message, StyleType, Suite, TestScenario} from 'latch';
import * as fs from 'fs';
import * as path from 'path';

const framework = Framework.getImplementation();
framework.reporter.style(StyleType.github);

// TODO disclaimer: file is currently disabled until latch supports AS compilation

const suite: Suite = framework.suite('End-to-end tests: R3 benchmark suite');

suite.testee('emulator [:8530]', new EmulatorSpecification(8530));

const scenarios: TestScenario[] = [];
const r3Directory = path.resolve(__dirname, '../static/r3');
console.error(r3Directory)

if (fs.existsSync(r3Directory)) {
fs.readdirSync(r3Directory)
.filter((file: string) => file.endsWith('.wat'))
.forEach((wasmFile: string) => {
scenarios.push({
title: `R3: ${wasmFile}`,
program: path.join(r3Directory, wasmFile),
dependencies: [],
steps: [{
title: `Run ${wasmFile}`,
instruction: {kind: Kind.Request, value: Message.run}
}]
});
});
}

suite.tests(scenarios);

framework.analyse([suite]);
2 changes: 1 addition & 1 deletion tests/latch/src/spec.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ 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

Expand Down
Loading