Fixing is_false_jmp, is_true_jmp opcodes; adding them to var_decl and assignment unit tests as partial checks.

This commit is contained in:
Ruben Ayrapetyan
2014-07-23 22:22:50 +04:00
parent d659b703a1
commit 2718d8e918
3 changed files with 24 additions and 14 deletions
+11 -7
View File
@@ -26,13 +26,17 @@ main( int __unused argc,
char __unused **argv)
{
const OPCODE test_program[] = {
getop_var_decl( 0),
getop_var_decl( 1),
getop_assignment( 0, OPCODE_ARG_TYPE_STRING, 1),
getop_assignment( 1, OPCODE_ARG_TYPE_VARIABLE, 0),
getop_assignment( 0, OPCODE_ARG_TYPE_SMALLINT, 253),
getop_assignment( 1, OPCODE_ARG_TYPE_NUMBER, 2),
getop_exitval( 0)
/* 0: */ getop_var_decl( 0),
/* 1: */ getop_var_decl( 1),
/* 2: */ getop_assignment( 0, OPCODE_ARG_TYPE_STRING, 1),
/* 3: */ getop_assignment( 1, OPCODE_ARG_TYPE_VARIABLE, 0),
/* 4: */ getop_is_true_jmp( 1, 6),
/* 5: */ getop_jmp_down( 5),
/* 6: */ getop_assignment( 0, OPCODE_ARG_TYPE_SMALLINT, 253),
/* 7: */ getop_assignment( 1, OPCODE_ARG_TYPE_NUMBER, 2),
/* 8: */ getop_is_false_jmp( 1, 10),
/* 9: */ getop_exitval( 0),
/* 10: */ getop_exitval( 1)
};
mem_init();