// Test that loading a duplicate module fails. TEST_F(ModuleTest, DuplicateModule) { // Add duplicate module. Modules::Library* library = defaultModules.add_libraries(); library->set_name(DEFAULT_MODULE_LIBRARY_NAME); library->add_modules(DEFAULT_MODULE_NAME); EXPECT_ERROR(ModuleManager::load(defaultModules)); }
// Test that a module library gets loaded when provided with a // library name without any extension and without the "lib" prefix. TEST_F(ModuleTest, LibraryNameWithoutExtension) { Modules modules; Modules::Library* library = modules.add_libraries(); library->set_name(DEFAULT_MODULE_LIBRARY_NAME); library->add_modules(DEFAULT_MODULE_NAME); EXPECT_SOME(ModuleManager::load(modules)); }