Changeset 21201 for v6/smop/test/12_p6opaque.sm0p
- Timestamp:
- 07/03/08 23:23:38 (5 months ago)
- Files:
-
- 1 modified
-
v6/smop/test/12_p6opaque.sm0p (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
v6/smop/test/12_p6opaque.sm0p
r21129 r21201 8 8 smop_init(); 9 9 10 printf("1.. 5\n");10 printf("1..4\n"); 11 11 12 12 … … 16 16 SMOP__INTPTR__InterpreterInstance,NULL,NULL)); 17 17 SMOP__Object* frame; 18 SMOP__Object* scalar1 = SMOP__S1P__Scalar_create(SMOP__NATIVE__bool_true); 19 18 SMOP__Object* how = SMOP__NATIVE__bool_true; 19 SMOP__Object* p6opaque = 20 SMOP_DISPATCH(SMOP__INTPTR__InterpreterInstance, SMOP__p6opaque__RI, 21 SMOP__ID__REPR_CREATE, SMOP__NATIVE__capture_create(SMOP__INTPTR__InterpreterInstance, 22 SMOP__INTPTR__InterpreterInstance,NULL,NULL)); 23 20 24 $frame = q:sm0p { 21 $scalar1; 22 SMOP__p6opaque__RI.SMOP__ID__REPR_CREATE(); 23 SMOP__SLIME__CurrentFrame.move_capturize(SMOP__SLIME__Capturize.new(2,(1),(),1)); 24 $scalar1.SMOP__ID__STORE(); 25 ; 26 $p6opaque.SMOP__ID__new(); 25 27 }; 28 // SMOP__SLIME__CurrentFrame.move_responder(7,2); 29 // SMOP__SLIME__CurrentFrame.move_capturize(SMOP__SLIME__Capturize.new(9,(),(),1)); 30 // SMOP__p6opaque__RI.SMOP__ID__new(); 31 //}; 26 32 27 33 if (!frame) printf("not "); 28 34 printf("ok 1 - frame created.\n"); 29 35 36 SMOP_RELEASE(interpreter,p6opaque); 30 37 SMOP_DISPATCH(interpreter, SMOP_RI(interpreter), 31 38 SMOP__ID__goto, … … 41 48 42 49 43 SMOP__Object* r1 = SMOP__S1P__Scalar_FETCH(scalar1);44 if (SMOP_RI(r1) != (SMOP__ResponderInterface*)SMOP__p6opaque__RI) printf("not ");45 printf("ok 4 - P6 Opaque created inside the interpreter loop\n");46 47 SMOP_RELEASE(interpreter,scalar1);48 49 SMOP_DISPATCH(interpreter, SMOP_RI(interpreter),50 SMOP__ID__loop, SMOP__NATIVE__capture_create(interpreter,51 SMOP_REFERENCE(interpreter,interpreter),52 NULL, NULL));53 54 50 SMOP_RELEASE(SMOP__INTPTR__InterpreterInstance,interpreter); 55 51 56 printf("ok 5- Scalar destroyed should free the p6opaque object also.\n");52 printf("ok 4 - Scalar destroyed should free the p6opaque object also.\n"); 57 53 58 54 smop_destr();
