# HG changeset patch # User Tatsuki IHA # Date 1483652939 -32400 # Node ID 50d0d1b468aa28653ad97c5f4afa2c8a3468cc61 # Parent da8ca04eb4f3a7b9a4b175a85c41f7c8ac6f9690 Fix stack_test diff -r da8ca04eb4f3 -r 50d0d1b468aa src/parallel_execution/test/stack_test.c --- a/src/parallel_execution/test/stack_test.c Fri Jan 06 05:51:23 2017 +0900 +++ b/src/parallel_execution/test/stack_test.c Fri Jan 06 06:48:59 2017 +0900 @@ -2,13 +2,14 @@ #include "../context.h" #include "../origin_cs.h" #include + extern __code initContext(struct Context* context); __code stack_test1(struct Context* context, struct Task* task, struct Stack* stack) { task->code = C_stack_test1; stack->next = C_stack_test2; stack->data = (union Data*)task; - goto meta(context, stack->push); + goto meta(context, stack->stack->Stack.push); } __code stack_test1_stub(struct Context* context) { @@ -18,14 +19,14 @@ context->data[D_Stack]->Stack.stack = (union Data*)stack; goto stack_test1(context, task, - &context->data[D_Stack]->Stack.stack->Stack); + &context->data[D_Stack]->Stack); } __code stack_test2(struct Context* context, struct Task* task, struct Stack* stack) { task->code = C_stack_test2; stack->next = C_stack_test3; stack->data = (union Data*)task; - goto meta(context, stack->push); + goto meta(context, stack->stack->Stack.push); } __code stack_test2_stub(struct Context* context) { @@ -33,27 +34,26 @@ Task* task = &ALLOCATE(context, Task)->Task; goto stack_test2(context, task, - &context->data[D_Stack]->Stack.stack->Stack); + &context->data[D_Stack]->Stack); } __code stack_test3(struct Context* context, struct Stack* stack) { stack->next = C_stack_test4; - goto meta(context, stack->pop); + goto meta(context, stack->stack->Stack.pop); } __code stack_test3_stub(struct Context* context) { assert(context->data[D_Stack]->Stack.stack->Stack.stack->SingleLinkedStack.top->data->Task.code == C_stack_test2); - assert(context->data[D_Stack]->Stack.stack->Stack.stack->SingleLinkedStack.top->data->Task.code == C_stack_test1); goto stack_test3(context, - &context->data[D_Stack]->Stack.stack->Stack); + &context->data[D_Stack]->Stack); } __code stack_test4(struct Context* context) { - goto meta(context, exit_code); + goto meta(context, C_exit_code); } __code stack_test4_stub(struct Context* context) { - assert(context->data[D_Stack]->Stack.stack->Stack.data->Task.code == C_stack_test1); + assert(context->data[D_Stack]->Stack.data->Task.code == C_stack_test2); assert(context->data[D_Stack]->Stack.stack->Stack.stack->SingleLinkedStack.top->data->Task.code == C_stack_test1); goto stack_test4(context); }