diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2015-03-05 04:01:01 -0800 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2015-03-06 03:45:26 -0800 |
commit | 9519a9a4202cd5fcaaad6d4cf0bf6bad38a27369 (patch) | |
tree | d89c628e0de68971753dbaa9d67b707ba3ebc1ad /src/test/main_tests.cpp | |
parent | 84a05b843b8ab704266289de67c9779ad733a196 (diff) |
Add correct bool combiner for net signals
Diffstat (limited to 'src/test/main_tests.cpp')
-rw-r--r-- | src/test/main_tests.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/main_tests.cpp b/src/test/main_tests.cpp index 2a72a220a4..5e968c26ff 100644 --- a/src/test/main_tests.cpp +++ b/src/test/main_tests.cpp @@ -21,4 +21,21 @@ BOOST_AUTO_TEST_CASE(subsidy_limit_test) BOOST_CHECK(nSum == 2099999997690000ULL); } +bool ReturnFalse() { return false; } +bool ReturnTrue() { return true; } + +BOOST_AUTO_TEST_CASE(test_combiner_all) +{ + boost::signals2::signal<bool (), CombinerAll> Test; + BOOST_CHECK(Test()); + Test.connect(&ReturnFalse); + BOOST_CHECK(!Test()); + Test.connect(&ReturnTrue); + BOOST_CHECK(!Test()); + Test.disconnect(&ReturnFalse); + BOOST_CHECK(Test()); + Test.disconnect(&ReturnTrue); + BOOST_CHECK(Test()); +} + BOOST_AUTO_TEST_SUITE_END() |