summaryrefslogtreecommitdiffstats
path: root/test/source/time.cpp
diff options
context:
space:
mode:
authorWilliam A. Kennington III <wak@google.com>2018-07-19 18:02:52 -0700
committerWilliam A. Kennington III <wak@google.com>2018-07-22 00:20:22 -0700
commit1072c7f086eb8938c90f42ee0e8c3845598c101e (patch)
treecfc46af12e95d888f7ae17602858a758dfb81405 /test/source/time.cpp
parent7e2e60e7393bce49a901eb0962465973762c43bc (diff)
downloadsdeventplus-1072c7f086eb8938c90f42ee0e8c3845598c101e.tar.gz
sdeventplus-1072c7f086eb8938c90f42ee0e8c3845598c101e.zip
test/time: Validate callback
Diffstat (limited to 'test/source/time.cpp')
-rw-r--r--test/source/time.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/source/time.cpp b/test/source/time.cpp
index 0ee612f..35ae6a0 100644
--- a/test/source/time.cpp
+++ b/test/source/time.cpp
@@ -81,6 +81,7 @@ TEST_F(TimeTest, ConstructSuccess)
.WillOnce(DoAll(SaveArg<1>(&userdata), Return(nullptr)));
Time<id> time(*event, expected_time, expected_accuracy,
std::move(callback));
+ EXPECT_FALSE(callback);
EXPECT_EQ(expected_event, time.get_event().get());
EXPECT_EQ(expected_source, time.get());
@@ -105,6 +106,7 @@ TEST_F(TimeTest, ConstructError)
EXPECT_THROW(
Time<id>(*event, expected_time, expected_accuracy, std::move(callback)),
SdEventError);
+ EXPECT_TRUE(callback);
}
class TimeMethodTest : public TimeTest
OpenPOWER on IntegriCloud