From ab38520b659d5d66d19eb83fb80c41ddc8391eb8 Mon Sep 17 00:00:00 2001 From: Murray Cumming Date: Thu, 24 Feb 2011 13:45:00 +0100 Subject: 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 4eb6430d..497d72c0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-02-24 Murray Cumming + + tests: Use EXIT_* for clarity. + + * tests/*.cc: Use EXIT_SUCCESS rather than 0 because I think that is clearer. + 2011-02-24 Murray Cumming Actually run all tests, and check some failures. diff --git a/tests/giomm_asyncresult_sourceobject/main.cc b/tests/giomm_asyncresult_sourceobject/main.cc index 9c3bf70a..c9f79e58 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 c54c4279..a375e940 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 f892d0d9..274fb662 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 ebf84592..9f5e17b1 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 48085e37..0548d756 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 6cf091a3..c678c37a 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 b163d739..42fb7982 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 6dac796d..db31cb60 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 74538b77..f444e870 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 f954733f..7248c891 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 1ed73de6..3f44a531 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 1f318f05..cc2b374f 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 b85cdbf2..b3e3184f 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 257408d9..cfe12acb 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; } -- cgit v1.2.1