diff options
author | Lars Uebernickel <lars@uebernic.de> | 2015-09-09 18:16:41 +0200 |
---|---|---|
committer | Lars Uebernickel <lars@uebernic.de> | 2015-09-09 18:16:41 +0200 |
commit | 046cd3a7dd67935eac5f8377996423c434f44419 (patch) | |
tree | 746b0670db87e76e29a803ceb26d8cfa67466f3a /tests/test-timezone-timedated.cpp | |
parent | 60f30453fb89d3769874af42a4f24c372bcad714 (diff) | |
download | ayatana-indicator-datetime-046cd3a7dd67935eac5f8377996423c434f44419.tar.gz ayatana-indicator-datetime-046cd3a7dd67935eac5f8377996423c434f44419.tar.bz2 ayatana-indicator-datetime-046cd3a7dd67935eac5f8377996423c434f44419.zip |
glib-fixture: fail tests on unexpected warnings
This requires specifying which warnings are expected to be thrown (only
test-timezone-file needed this for now).
However, only fail on warnings in the Indicator-Datetime log domain so
that we don't fail on gstreamer (or other library) warnings for now.
Diffstat (limited to 'tests/test-timezone-timedated.cpp')
-rw-r--r-- | tests/test-timezone-timedated.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test-timezone-timedated.cpp b/tests/test-timezone-timedated.cpp index 5cfc311..7300649 100644 --- a/tests/test-timezone-timedated.cpp +++ b/tests/test-timezone-timedated.cpp @@ -69,8 +69,8 @@ TEST_F(TimezoneFixture, NoFile) remove(TIMEZONE_FILE); ASSERT_FALSE(g_file_test(TIMEZONE_FILE, G_FILE_TEST_EXISTS)); + expectLogMessage(G_LOG_DOMAIN, G_LOG_LEVEL_WARNING, "*No such file or directory*"); TimedatedTimezone tz(TIMEZONE_FILE); - testLogCount(G_LOG_LEVEL_WARNING, 1); } /** @@ -82,6 +82,7 @@ TEST_F(TimezoneFixture, DefaultValueNoFile) remove(TIMEZONE_FILE); ASSERT_FALSE(g_file_test(TIMEZONE_FILE, G_FILE_TEST_EXISTS)); + expectLogMessage(G_LOG_DOMAIN, G_LOG_LEVEL_WARNING, "*No such file or directory*"); TimedatedTimezone tz(TIMEZONE_FILE); ASSERT_EQ(expected_timezone, tz.timezone.get()); } |