MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / TEST_F

Function TEST_F

test/DeclManager.cpp:166–177  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

164};
165
166TEST_F(DeclManagerTest, DeclTypeRegistration)
167{
168 auto creator = std::make_shared<TestDeclarationCreator>();
169 EXPECT_NO_THROW(GlobalDeclarationManager().registerDeclType("testdecl", creator));
170
171 // Registering the same type name twice should result in an exception
172 EXPECT_THROW(GlobalDeclarationManager().registerDeclType("testdecl", creator), std::logic_error);
173
174 // Passing a new creator instance doesn't help either
175 auto creator2 = std::make_shared<TestDeclarationCreator>();
176 EXPECT_THROW(GlobalDeclarationManager().registerDeclType("testdecl", creator2), std::logic_error);
177}
178
179TEST_F(DeclManagerTest, DeclTypeUnregistration)
180{

Callers

nothing calls this directly

Calls 15

checkKnownTestDeclNamesFunction · 0.85
checkKnownTestDecl2NamesFunction · 0.85
getAllDeclNamesFunction · 0.85
waitUntilFunction · 0.85
get_idFunction · 0.85
expectDeclIsPresentFunction · 0.85
expectDeclContainsFunction · 0.85
expectDeclIsNotPresentFunction · 0.85
expectDeclDoesNotContainFunction · 0.85
loadTextFromVfsFileFunction · 0.85
fileContainsTextFunction · 0.85
fileOrDirExistsFunction · 0.85

Tested by

no test coverage detected