Lines Matching refs:Singleton
21 using chre::Singleton;
23 TEST(Singleton, Lifecycle) { in TEST() argument
24 EXPECT_FALSE(Singleton<int>::isInitialized()); in TEST()
25 EXPECT_EQ(Singleton<int>::safeGet(), nullptr); in TEST()
27 Singleton<int>::init(0x1337); in TEST()
28 ASSERT_NE(Singleton<int>::get(), nullptr); in TEST()
29 EXPECT_TRUE(Singleton<int>::isInitialized()); in TEST()
30 EXPECT_EQ(*Singleton<int>::get(), 0x1337); in TEST()
31 Singleton<int>::init(0xcafe); in TEST()
32 ASSERT_NE(Singleton<int>::get(), nullptr); in TEST()
33 EXPECT_TRUE(Singleton<int>::isInitialized()); in TEST()
34 EXPECT_EQ(*Singleton<int>::get(), 0x1337); in TEST()
36 Singleton<int>::deinit(); in TEST()
37 EXPECT_EQ(Singleton<int>::safeGet(), nullptr); in TEST()
38 EXPECT_FALSE(Singleton<int>::isInitialized()); in TEST()
40 Singleton<int>::init(0xface); in TEST()
41 ASSERT_NE(Singleton<int>::get(), nullptr); in TEST()
42 EXPECT_TRUE(Singleton<int>::isInitialized()); in TEST()
43 EXPECT_EQ(*Singleton<int>::get(), 0xface); in TEST()