changeset 216:6578c5c274ba

Not use cast for queue_test
author Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
date Fri, 06 Jan 2017 06:53:54 +0900
parents 50d0d1b468aa
children c34e6aa10967
files src/parallel_execution/test/queue_test.c
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/parallel_execution/test/queue_test.c	Fri Jan 06 06:48:59 2017 +0900
+++ b/src/parallel_execution/test/queue_test.c	Fri Jan 06 06:53:54 2017 +0900
@@ -33,8 +33,8 @@
 
 __code queueTest2_stub(struct Context* context) {
     SingleLinkedQueue* singleLinkedQueue = &context->data[D_Queue]->Queue.queue->Queue.queue->SingleLinkedQueue;
-    assert(((struct Task*)singleLinkedQueue->top->data)->code == C_queueTest1);
-    assert(((struct Task*)singleLinkedQueue->last->data)->code == C_queueTest1);
+    assert(singleLinkedQueue->top->data->Task.code == C_queueTest1);
+    assert(singleLinkedQueue->last->data->Task.code == C_queueTest1);
     Task* task = &ALLOCATE(context, Task)->Task;
     goto queueTest2(context,
             task,
@@ -48,8 +48,8 @@
 
 __code queueTest3_stub(struct Context* context) {
     SingleLinkedQueue* singleLinkedQueue = &context->data[D_Queue]->Queue.queue->Queue.queue->SingleLinkedQueue;
-    assert(((struct Task*)singleLinkedQueue->top->data)->code == C_queueTest1);
-    assert(((struct Task*)singleLinkedQueue->last->data)->code == C_queueTest2);
+    assert(singleLinkedQueue->top->data->Task.code == C_queueTest1);
+    assert(singleLinkedQueue->last->data->Task.code == C_queueTest2);
     goto queueTest3(context,
             &context->data[D_Queue]->Queue);
 }
@@ -60,9 +60,9 @@
 
 __code queueTest4_stub(struct Context* context) {
     SingleLinkedQueue* singleLinkedQueue = &context->data[D_Queue]->Queue.queue->Queue.queue->SingleLinkedQueue;
-    assert(((struct Task*)context->data[D_Queue]->Queue.data)->code == C_queueTest1);
-    assert(((struct Task*)singleLinkedQueue->top->data)->code == C_queueTest2);
-    assert(((struct Task*)singleLinkedQueue->last->data)->code == C_queueTest2);
+    assert(context->data[D_Queue]->Queue.data->Task.code == C_queueTest1);
+    assert(singleLinkedQueue->top->data->Task.code == C_queueTest2);
+    assert(singleLinkedQueue->last->data->Task.code == C_queueTest2);
     goto queueTest4(context);
 }