diff options
author | Murray Cumming <murrayc@murrayc.com> | 2011-02-24 13:42:57 +0100 |
---|---|---|
committer | Murray Cumming <murrayc@murrayc.com> | 2011-02-24 13:42:57 +0100 |
commit | 6edb045a2ec86f67e8a0b3a217c00be6336c05d8 (patch) | |
tree | a26347bfb7a83dbf408dcc3df98903ed584e506a /tests/glibmm_date | |
parent | ba29ea78537d2d41c6b6f54a6180a52ac3ae2937 (diff) | |
download | glibmm-6edb045a2ec86f67e8a0b3a217c00be6336c05d8.tar.gz |
Actually run all tests, and check some failures.
* tests/Makefile.am: Add all tests to TESTS so they are really run during
make check, instead of just built.
* tests/giomm_asyncresult_sourceobject/main.cc:
* tests/giomm_ioerror/main.cc:
* tests/giomm_simple/main.cc:
* tests/glibmm_bool_arrayhandle/main.cc:
* tests/glibmm_bool_vector/main.cc:
* tests/glibmm_buildfilename/main.cc:
* tests/glibmm_date/main.cc:
* tests/glibmm_ustring_compose/main.cc:
* tests/glibmm_valuearray/main.cc:
* tests/glibmm_variant/main.cc:
* tests/glibmm_vector/main.cc: Remove all use of std::cout by default,
allowing it to be renabled by changing a line.
Return (or) exit with EXIT_FAILURE after any use of std::cerr, so that
make check can report it.
Diffstat (limited to 'tests/glibmm_date')
-rw-r--r-- | tests/glibmm_date/main.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/glibmm_date/main.cc b/tests/glibmm_date/main.cc index 3272c856..6dac796d 100644 --- a/tests/glibmm_date/main.cc +++ b/tests/glibmm_date/main.cc @@ -1,6 +1,13 @@ #include <glibmm.h> #include <iostream> +//Use this line if you want debug output: +//std::ostream& ostr = std::cout; + +//This seems nicer and more useful than putting an ifdef around the use of ostr: +std::stringstream debug; +std::ostream& ostr = debug; + int main(int, char**) { Glib::Date date; @@ -9,7 +16,7 @@ int main(int, char**) date.subtract_days(1); date.add_years(1); - std::cout << "The date a year and a month from yesterday will be: " << + ostr << "The date a year and a month from yesterday will be: " << date.get_month() << "/" << (int) date.get_day() << "/" << date.get_year() << "." << std::endl; @@ -19,7 +26,7 @@ int main(int, char**) assigned_date = copy_date; - std::cout << "The copied date is: " << copy_date.get_month() << "/" << + ostr << "The copied date is: " << copy_date.get_month() << "/" << (int) copy_date.get_day() << "/" << copy_date.get_year() << "." << std::endl; |