@@ -18,7 +18,6 @@ import {
1818
1919export const EMULATOR : string = process . env . EMULATOR ?? `${ require ( 'os' ) . homedir ( ) } /Arduino/libraries/WARDuino/build-emu/wdcli` ;
2020
21-
2221const EXAMPLES : string = `${ __dirname } /../examples/` ;
2322
2423/**
@@ -312,7 +311,6 @@ const stepOverTest: TestScenario = {
312311
313312integration . test ( stepOverTest ) ;
314313
315- // EDWARD tests with mock proxy
316314
317315const dumpEventsTest : TestScenario = {
318316 title : 'Test DUMPEvents' ,
@@ -332,4 +330,57 @@ const dumpEventsTest: TestScenario = {
332330
333331integration . test ( dumpEventsTest ) ;
334332
335- framework . run ( [ integration ] ) ;
333+ // EDWARD tests
334+
335+ const oop = framework . suite ( 'Test Out-of-place primitives' ) ;
336+
337+ oop . testee ( 'supervisor[:8100] - proxy[:8150]' , new OutofPlaceSpecification ( 8100 , 8150 ) ) ;
338+
339+ oop . test ( {
340+ title : `Test store primitive` ,
341+ program : 'test/dummy.wast' ,
342+ dependencies : [ ] ,
343+ steps : [
344+ {
345+ title : '[supervisor] CHECK: execution at start of main' ,
346+ instruction : { kind : Kind . Request , value : dump } ,
347+ expected : [ { 'pc' : { kind : 'primitive' , value : 129 } as Expected < number > } ]
348+ } ,
349+
350+ {
351+ title : '[proxy] CHECK: execution at start of main' ,
352+ instruction : { kind : Kind . Request , value : dump } ,
353+ expected : [ { 'pc' : { kind : 'primitive' , value : 129 } as Expected < number > } ] ,
354+ target : Target . proxy
355+ } ,
356+
357+ new Invoker ( 'load' , [ WASM . i32 ( 32 ) ] , WASM . i32 ( 0 ) , Target . proxy ) ,
358+
359+ {
360+ title : '[supervisor] Send STEP command' ,
361+ instruction : { kind : Kind . Request , value : step }
362+ } ,
363+
364+ {
365+ title : '[supervisor] Send STEP command' ,
366+ instruction : { kind : Kind . Request , value : step }
367+ } ,
368+
369+ {
370+ title : '[supervisor] Send STEP command' ,
371+ instruction : { kind : Kind . Request , value : step }
372+ } ,
373+
374+ {
375+ title : '[supervisor] CHECK: execution took three steps' ,
376+ instruction : { kind : Kind . Request , value : dump } ,
377+ expected : [ { 'pc' : { kind : 'primitive' , value : 136 } as Expected < number > } ]
378+ } ,
379+
380+ new Invoker ( 'load' , [ WASM . i32 ( 32 ) ] , WASM . i32 ( 42 ) , Target . proxy ) ,
381+
382+ new Invoker ( 'load' , [ WASM . i32 ( 32 ) ] , WASM . i32 ( 42 ) , Target . supervisor )
383+ ]
384+ } ) ;
385+
386+ framework . run ( [ integration , oop ] ) ;
0 commit comments