(fixes) test-projects main have to run
This commit is contained in:
+21
-7
@@ -87,6 +87,8 @@ class LowerToIRVMServiceTest {
|
||||
fn("frame", "app", 20, ReadOnlyList.from(ret())),
|
||||
fn("__pbs.frame_wrapper$m0", "app", 40, ReadOnlyList.from(
|
||||
getGlobal(0),
|
||||
pushBool(true),
|
||||
eq(),
|
||||
jmpIfTrue("bootstrap_done"),
|
||||
callFunc("app", "__pbs.module_init$m0", 31),
|
||||
callFunc("app", "__pbs.project_init$m0", 32),
|
||||
@@ -101,13 +103,15 @@ class LowerToIRVMServiceTest {
|
||||
|
||||
assertEquals("__pbs.frame_wrapper$m0", lowered.module().functions().get(0).name());
|
||||
assertEquals(IRVMOp.GET_GLOBAL, lowered.module().functions().get(0).instructions().get(0).op());
|
||||
assertEquals(IRVMOp.JMP_IF_TRUE, lowered.module().functions().get(0).instructions().get(1).op());
|
||||
assertEquals(IRVMOp.CALL, lowered.module().functions().get(0).instructions().get(2).op());
|
||||
assertEquals(IRVMOp.CALL, lowered.module().functions().get(0).instructions().get(3).op());
|
||||
assertEquals(IRVMOp.PUSH_BOOL, lowered.module().functions().get(0).instructions().get(4).op());
|
||||
assertEquals(IRVMOp.SET_GLOBAL, lowered.module().functions().get(0).instructions().get(5).op());
|
||||
assertEquals(IRVMOp.CALL, lowered.module().functions().get(0).instructions().get(6).op());
|
||||
assertEquals(IRVMOp.RET, lowered.module().functions().get(0).instructions().get(7).op());
|
||||
assertEquals(IRVMOp.PUSH_BOOL, lowered.module().functions().get(0).instructions().get(1).op());
|
||||
assertEquals(IRVMOp.EQ, lowered.module().functions().get(0).instructions().get(2).op());
|
||||
assertEquals(IRVMOp.JMP_IF_TRUE, lowered.module().functions().get(0).instructions().get(3).op());
|
||||
assertEquals(IRVMOp.CALL, lowered.module().functions().get(0).instructions().get(4).op());
|
||||
assertEquals(IRVMOp.CALL, lowered.module().functions().get(0).instructions().get(5).op());
|
||||
assertEquals(IRVMOp.PUSH_BOOL, lowered.module().functions().get(0).instructions().get(6).op());
|
||||
assertEquals(IRVMOp.SET_GLOBAL, lowered.module().functions().get(0).instructions().get(7).op());
|
||||
assertEquals(IRVMOp.CALL, lowered.module().functions().get(0).instructions().get(8).op());
|
||||
assertEquals(IRVMOp.RET, lowered.module().functions().get(0).instructions().get(9).op());
|
||||
assertEquals(IRVMOp.RET, lowered.module().functions().stream()
|
||||
.filter(function -> "frame".equals(function.name()))
|
||||
.findFirst()
|
||||
@@ -645,4 +649,14 @@ class LowerToIRVMServiceTest {
|
||||
null,
|
||||
Span.none());
|
||||
}
|
||||
|
||||
private static IRBackendExecutableFunction.Instruction eq() {
|
||||
return new IRBackendExecutableFunction.Instruction(
|
||||
IRBackendExecutableFunction.InstructionKind.EQ,
|
||||
"",
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
Span.none());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user