@@ -18,7 +18,6 @@ import {
18
18
19
19
export const EMULATOR : string = process . env . EMULATOR ?? `${ require ( 'os' ) . homedir ( ) } /Arduino/libraries/WARDuino/build-emu/wdcli` ;
20
20
21
-
22
21
const EXAMPLES : string = `${ __dirname } /../examples/` ;
23
22
24
23
/**
@@ -312,7 +311,6 @@ const stepOverTest: TestScenario = {
312
311
313
312
integration . test ( stepOverTest ) ;
314
313
315
- // EDWARD tests with mock proxy
316
314
317
315
const dumpEventsTest : TestScenario = {
318
316
title : 'Test DUMPEvents' ,
@@ -332,4 +330,57 @@ const dumpEventsTest: TestScenario = {
332
330
333
331
integration . test ( dumpEventsTest ) ;
334
332
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