diff src/parallel_execution/test/queue_test.c @ 209:5708390a9d88

fix compile errors
author mir3636
date Wed, 21 Dec 2016 22:13:57 +0900
parents b6ffdd99e525
children 37d875930061
line wrap: on
line diff
--- a/src/parallel_execution/test/queue_test.c	Tue Dec 20 19:39:51 2016 +0900
+++ b/src/parallel_execution/test/queue_test.c	Wed Dec 21 22:13:57 2016 +0900
@@ -4,66 +4,66 @@
 #include <assert.h>
 
 
-__code queue_test1(struct Context* context, struct Task* task, struct Queue* queue) {
-    task->code = C_queue_test1;
-    queue->next = C_queue_test2;
+__code queueTest1(struct Context* context, struct Task* task, struct Queue* queue) {
+    task->code = C_queueTest1;
+    queue->next = C_queueTest2;
     queue->data = (union Data*)task;
     goto meta(context, queue->queue->Queue.put);
 }
 
-__code queue_test1_stub(struct Context* context) {
+__code queueTest1_stub(struct Context* context) {
     Task* task = &ALLOCATE(context, Task)->Task;
     struct Queue* queue = &(createSingleLinkedQueue(context)->Queue);
     assert(queue->queue->SingleLinkedQueue.top == NULL);
     assert(queue->queue->SingleLinkedQueue.last == NULL);
     context->data[D_Queue]->Queue.queue = (union Data*)queue;
-    goto queue_test1(context,
+    goto queueTest1(context,
             task,
             &context->data[D_Queue]->Queue.queue);
 }
 
-__code queue_test2(struct Context* context, struct Task* task, struct Queue* queue) {
-    task->code = C_queue_test2;
-    queue->next = C_queue_test3;
+__code queueTest2(struct Context* context, struct Task* task, struct Queue* queue) {
+    task->code = C_queueTest2;
+    queue->next = C_queueTest3;
     queue->data = (union Data*)task;
     goto meta(context, queue->queue->Queue.put);
 }
 
-__code queue_test2_stub(struct Context* context) {
+__code queueTest2_stub(struct Context* context) {
     // assert(((struct Task)context->data[D_Queue]->queue.queue->queue.queue->singleLinkedQueue.top->data)->code == C_QueueTest1)
     // assert(((struct Task)context->data[D_Queue]->queue.queue->queue.queue->singleLinkedQueue.top->data)->code == C_QueueTest1)
     Task* task = &ALLOCATE(context, Task)->Task;
-    goto queue_test2(context,
+    goto queueTest2(context,
             task,
             &context->data[D_Queue]->Queue.queue);
 }
 
-__code queue_test3(struct Context* context, struct Queue* queue) {
-    queue->next = C_queue_test4;
+__code queueTest3(struct Context* context, struct Queue* queue) {
+    queue->next = C_queueTest4;
     goto meta(context, queue->queue->Queue.take);
 }
 
-__code queue_test3_stub(struct Context* context) {
+__code queueTest3_stub(struct Context* context) {
     // assert(((struct Task)context->data[D_Queue]->queue.queue->queue.queue->singleLinkedQueue.top->data)->code == C_QueueTest2)
     // assert(((struct Task)context->data[D_Queue]->queue.queue->queue.queue->singleLinkedQueue.top->data)->code == C_QueueTest1)
-    goto queue_test3(context,
+    goto queueTest3(context,
             &context->data[D_Queue]->Queue);
 }
 
-__code queue_test4(struct Context* context, struct Queue* queue) {
-    goto meta(context, C_queue_test4 /*Exit*/ );
+__code queueTest4(struct Context* context, struct Queue* queue) {
+    goto meta(context, C_queueTest4 /*Exit*/ );
 }
 
-__code queue_test4_stub(struct Context* context) {
-//    assert(((struct Task)context->data[D_Queue]->queue.queue.data)->code == C_queue_test1)
-//    assert(((struct Task)context->data[D_Queue]->queue.queue.last->data)->code == C_queue_test2)
-    goto queue_test4(context,
+__code queueTest4_stub(struct Context* context) {
+//    assert(((struct Task)context->data[D_Queue]->queue.queue.data)->code == C_queueTest1)
+//    assert(((struct Task)context->data[D_Queue]->queue.queue.last->data)->code == C_queueTest2)
+    goto queueTest4(context,
             &context->data[D_Queue]->Queue.queue);
 }
 
 int main(int argc, char const* argv[]) {
     struct Context* main_context = NEW(struct Context);
     initContext(main_context);
-    main_context->next = C_queue_test1;
+    main_context->next = C_queueTest1;
     goto start_code(main_context);
 }