Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
model-checker : new tesh for snapshot comparison tests
[simgrid.git] / examples / msg / mc / test / snapshot_comparison2.c
@@ -8,7 +8,7 @@
 #include <simgrid/modelchecker.h>
 #include "mc/mc.h"
 
-XBT_LOG_NEW_DEFAULT_CATEGORY(snapshot_comparison_liveness2, "Debug information for snasphot comparison liveness1 test example");
+XBT_LOG_NEW_DEFAULT_CATEGORY(snapshot_comparison_liveness2, "Debug information for snasphot comparison liveness2 test example");
 
 int test(int argc, char **argv);
 
@@ -23,6 +23,8 @@ int test(int argc, char **argv){
 
   MSG_process_sleep(1);
 
+  XBT_INFO("First snapshot");
+
   char *toto = xbt_malloc(5);
   XBT_INFO("Toto allocated");
 
@@ -30,9 +32,9 @@ int test(int argc, char **argv){
 
   MSG_process_sleep(1);
 
-  int res = MC_compare_snapshots(snap1, snap2);
+  XBT_INFO("Second snapshot");
 
-  XBT_INFO("Test result : %d (0 = state equality, 1 = different states)", res);
+  XBT_INFO("Test result : %d (0 = state equality, 1 = different states)", MC_compare_snapshots(snap1, snap2));
   
   XBT_INFO("**** End test ****");