[glibmm] tests: Use EXIT_* for clarity.



commit ab38520b659d5d66d19eb83fb80c41ddc8391eb8
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Feb 24 13:45:00 2011 +0100

    tests: Use EXIT_* for clarity.
    
    * tests/*.cc: Use EXIT_SUCCESS rather than 0 because I think that is clearer.

 ChangeLog                                    |    6 ++++++
 tests/giomm_asyncresult_sourceobject/main.cc |    2 +-
 tests/giomm_ioerror/main.cc                  |    2 +-
 tests/giomm_simple/main.cc                   |    2 +-
 tests/glibmm_bool_arrayhandle/main.cc        |    2 +-
 tests/glibmm_bool_vector/main.cc             |    2 +-
 tests/glibmm_btree/main.cc                   |    4 ++--
 tests/glibmm_buildfilename/main.cc           |    2 +-
 tests/glibmm_date/main.cc                    |    2 +-
 tests/glibmm_nodetree/main.cc                |    2 +-
 tests/glibmm_ustring_compose/main.cc         |    2 +-
 tests/glibmm_ustring_format/main.cc          |    2 +-
 tests/glibmm_value/main.cc                   |    2 +-
 tests/glibmm_valuearray/main.cc              |    4 ++--
 tests/glibmm_variant/main.cc                 |    2 +-
 15 files changed, 22 insertions(+), 16 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 4eb6430..497d72c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2011-02-24  Murray Cumming  <murrayc murrayc com>
 
+	tests: Use EXIT_* for clarity.
+
+	* tests/*.cc: Use EXIT_SUCCESS rather than 0 because I think that is clearer.
+
+2011-02-24  Murray Cumming  <murrayc murrayc com>
+
 	Actually run all tests, and check some failures.
 
 	* tests/Makefile.am: Add all tests to TESTS so they are really run during 
diff --git a/tests/giomm_asyncresult_sourceobject/main.cc b/tests/giomm_asyncresult_sourceobject/main.cc
index 9c3bf70..c9f79e5 100644
--- a/tests/giomm_asyncresult_sourceobject/main.cc
+++ b/tests/giomm_asyncresult_sourceobject/main.cc
@@ -35,5 +35,5 @@ int main(int, char**)
   file->read_async(&on_read_async);
 
   mainloop->run();
-  return 0;
+  return EXIT_SUCCESS;
 }
diff --git a/tests/giomm_ioerror/main.cc b/tests/giomm_ioerror/main.cc
index c54c427..a375e94 100644
--- a/tests/giomm_ioerror/main.cc
+++ b/tests/giomm_ioerror/main.cc
@@ -65,6 +65,6 @@ int main(int, char**)
     return EXIT_FAILURE; 
   }
 
-  return 0;
+  return EXIT_SUCCESS;
 }
 
diff --git a/tests/giomm_simple/main.cc b/tests/giomm_simple/main.cc
index f892d0d..274fb66 100644
--- a/tests/giomm_simple/main.cc
+++ b/tests/giomm_simple/main.cc
@@ -41,6 +41,6 @@ int main(int, char**)
     return EXIT_FAILURE; 
   }
 
-  return 0;
+  return EXIT_SUCCESS;
 }
 
diff --git a/tests/glibmm_bool_arrayhandle/main.cc b/tests/glibmm_bool_arrayhandle/main.cc
index ebf8459..9f5e17b 100644
--- a/tests/glibmm_bool_arrayhandle/main.cc
+++ b/tests/glibmm_bool_arrayhandle/main.cc
@@ -93,5 +93,5 @@ int main()
   ostr << "deque:\n";
   cxx_print_bool_array (d);
 
-  return 0;
+  return EXIT_SUCCESS;
 }
diff --git a/tests/glibmm_bool_vector/main.cc b/tests/glibmm_bool_vector/main.cc
index 48085e3..0548d75 100644
--- a/tests/glibmm_bool_vector/main.cc
+++ b/tests/glibmm_bool_vector/main.cc
@@ -85,5 +85,5 @@ int main(int, char**)
 
   cxx_print_bool_array(va);
 
-  return 0;
+  return EXIT_SUCCESS;
 }
diff --git a/tests/glibmm_btree/main.cc b/tests/glibmm_btree/main.cc
index 6cf091a..c678c37 100644
--- a/tests/glibmm_btree/main.cc
+++ b/tests/glibmm_btree/main.cc
@@ -68,7 +68,7 @@ my_p_key_compare(const type_p_key_value& key_a, const type_p_key_value& key_b)
   if(*key_a > *key_b)
     return 1;
 
-  return 0;
+  return EXIT_SUCCESS;
 } 
 
 int
@@ -226,5 +226,5 @@ main()
   pvalue = ptree->search(sigc::ptr_fun(my_p_search), &pstr3);
   g_assert(pvalue == NULL);
 
-  return 0;
+  return EXIT_SUCCESS;
 }
diff --git a/tests/glibmm_buildfilename/main.cc b/tests/glibmm_buildfilename/main.cc
index b163d73..42fb798 100644
--- a/tests/glibmm_buildfilename/main.cc
+++ b/tests/glibmm_buildfilename/main.cc
@@ -39,6 +39,6 @@ int main(int, char**)
     dir_1, dir_2, file_2);
   ostr << "Path 5: " << path << std::endl;
 
-  return 0;
+  return EXIT_SUCCESS;
 }
 
diff --git a/tests/glibmm_date/main.cc b/tests/glibmm_date/main.cc
index 6dac796..db31cb6 100644
--- a/tests/glibmm_date/main.cc
+++ b/tests/glibmm_date/main.cc
@@ -30,5 +30,5 @@ int main(int, char**)
     (int) copy_date.get_day() << "/" << copy_date.get_year() << "." <<
       std::endl;
 
-  return 0;
+  return EXIT_SUCCESS;
 }
diff --git a/tests/glibmm_nodetree/main.cc b/tests/glibmm_nodetree/main.cc
index 74538b7..f444e87 100644
--- a/tests/glibmm_nodetree/main.cc
+++ b/tests/glibmm_nodetree/main.cc
@@ -134,5 +134,5 @@ int main()
 
   delete root;
 
-  return 0;
+  return EXIT_SUCCESS;
 }
diff --git a/tests/glibmm_ustring_compose/main.cc b/tests/glibmm_ustring_compose/main.cc
index f954733..7248c89 100644
--- a/tests/glibmm_ustring_compose/main.cc
+++ b/tests/glibmm_ustring_compose/main.cc
@@ -31,6 +31,6 @@ int main(int, char**)
 
   //TODO: More tests.
 
-  return 0;
+  return EXIT_SUCCESS;
 }
 
diff --git a/tests/glibmm_ustring_format/main.cc b/tests/glibmm_ustring_format/main.cc
index 1ed73de..3f44a53 100644
--- a/tests/glibmm_ustring_format/main.cc
+++ b/tests/glibmm_ustring_format/main.cc
@@ -26,5 +26,5 @@ int main(int, char**)
   //This threw an exception before we added a ustring::FormatStream::stream(char*) overload.
   Glib::ustring::format(cptr);
 
-  return 0;
+  return EXIT_SUCCESS;
 }
diff --git a/tests/glibmm_value/main.cc b/tests/glibmm_value/main.cc
index 1f318f0..cc2b374 100644
--- a/tests/glibmm_value/main.cc
+++ b/tests/glibmm_value/main.cc
@@ -3,6 +3,6 @@
 
 int main(int, char**)
 {
-  return 0;
+  return EXIT_SUCCESS;
 }
 
diff --git a/tests/glibmm_valuearray/main.cc b/tests/glibmm_valuearray/main.cc
index b85cdbf..b3e3184 100644
--- a/tests/glibmm_valuearray/main.cc
+++ b/tests/glibmm_valuearray/main.cc
@@ -19,7 +19,7 @@ int on_compare(const Glib::ValueBase& v1, const Glib::ValueBase& v2)
   if(int1 < int2)
     return -1;
   else if(int1 == int2)
-    return 0;
+    return EXIT_SUCCESS;
   else
     return 1;
 }
@@ -82,5 +82,5 @@ int main(int, char**)
   }
   ostr << std::endl; // End of line for list of array elements.
 
-  return 0;
+  return EXIT_SUCCESS;
 }
diff --git a/tests/glibmm_variant/main.cc b/tests/glibmm_variant/main.cc
index 257408d..cfe12ac 100644
--- a/tests/glibmm_variant/main.cc
+++ b/tests/glibmm_variant/main.cc
@@ -107,5 +107,5 @@ int main(int, char**)
       " in the variant are: " << value << '.' << std::endl;
   }
 
-  return 0;
+  return EXIT_SUCCESS;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]