Commit 137443e8 authored by Adam Simpkins's avatar Adam Simpkins Committed by Facebook Github Bot

fix SingletonTestGlobal in shared library builds

Summary:
The SingletonTestGlobal code asserted that there was exactly one singleton
object registered (the one defined in this test file).  However if folly is
built as a shared library, all of it will be loaded, and several other
singletons are also defined by other parts of folly.  (Currently 7 singletons
get registered.)

Reviewed By: yfeldblum

Differential Revision: D6817544

fbshipit-source-id: de3947770690ffb68d097040bbbfbe42bce3bf94
parent b60217fa
......@@ -39,7 +39,7 @@ Singleton<GlobalWatchdog> global_watchdog;
// be used).
TEST(Singleton, BasicGlobalUsage) {
EXPECT_EQ(Watchdog::creation_order().size(), 0);
EXPECT_EQ(SingletonVault::singleton()->registeredSingletonCount(), 1);
EXPECT_GE(SingletonVault::singleton()->registeredSingletonCount(), 1);
EXPECT_EQ(SingletonVault::singleton()->livingSingletonCount(), 0);
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment