X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/a6dbc279b78e4a84b3921b509f3138ed01399bca..544079e0f098e38c191623fde08e05a931685273:/teshsuite/simdag/basic/basic6.c diff --git a/teshsuite/simdag/basic/basic6.c b/teshsuite/simdag/basic/basic6.c index 7f1cbb8cbc..5a2b3d5d74 100644 --- a/teshsuite/simdag/basic/basic6.c +++ b/teshsuite/simdag/basic/basic6.c @@ -1,11 +1,9 @@ -/* Copyright (c) 2007-2012, 2014. The SimGrid Team. +/* Copyright (c) 2007-2012, 2014-2015. The SimGrid Team. * All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -#include -#include #include "simgrid/simdag.h" #include "xbt/asserts.h" #include "xbt/log.h" @@ -26,25 +24,20 @@ int main(int argc, char **argv) { double comm_cost[] = { 0.0, 0.0, 0.0, 0.0 }; double comp_cost[] = { 1.0 }; - SD_task_t taskA, taskB; xbt_dynar_t ret; SD_init(&argc, argv); SD_create_environment(argv[1]); - taskA = SD_task_create("Task A", NULL, 1.0); - taskB = SD_task_create("Task B", NULL, 1.0); + SD_task_t taskA = SD_task_create("Task A", NULL, 1.0); + SD_task_t taskB = SD_task_create("Task B", NULL, 1.0); - SD_task_schedule(taskA, 1, SD_workstation_get_list(), comp_cost, - comm_cost, -1.0); - SD_task_schedule(taskB, 1, SD_workstation_get_list(), comp_cost, - comm_cost, -1.0); + SD_task_schedule(taskA, 1, sg_host_list(), comp_cost, comm_cost, -1.0); + SD_task_schedule(taskB, 1, sg_host_list(), comp_cost, comm_cost, -1.0); ret = SD_simulate(-1.0); - xbt_assert(xbt_dynar_length(ret) == 2, - "I was expecting the terminaison of 2 tasks, but I got %lu instead", - xbt_dynar_length(ret)); - xbt_dynar_free(&ret); + xbt_assert(xbt_dynar_length(ret) == 2, "I was expecting the completion of 2 tasks, but I got %lu instead", + xbt_dynar_length(ret)); SD_task_destroy(taskA); SD_task_destroy(taskB);