Exemplo n.º 1
0
// 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));
}
Exemplo n.º 2
0
// 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));
}