16 using namespace boost::unit_test_framework;
20 void testFileNotFound();
21 void testErrorInDmapFile();
22 void testNoDataInDmapFile();
32 test_case* testErrorInDmapFile =
34 test_case* testNoDataInDmapFile =
38 add(testFileNotFound);
39 add(testErrorInDmapFile);
41 add(testNoDataInDmapFile);
46 framework::master_test_suite().p_name.value =
"DMapFileParser class test suite";
53 std::string file_path =
"../dummypath.dmap";
60 std::string incorrect_dmap_file =
"invalid.dmap";
71 std::string empty_dmap_file =
"empty.dmap";
78 std::string file_path =
"valid.dmap";
80 boost::shared_ptr<ChimeraTK::DeviceInfoMap> mapFilePtr = fileParser.
parse(file_path);
97 deviceInfo4, absPathToDmap,
"card4",
"(pci:mtcadummys0?map=goodMapFile_withoutModules.map)",
"");
106 BOOST_REQUIRE(mapFilePtr->getSize() == 4);
115 auto pluginLibraries = mapFilePtr->getPluginLibraries();
117 BOOST_CHECK(pluginLibraries.size() == 2);
118 BOOST_CHECK(pluginLibraries[0] == absPathToDmapDir +
"libMyLib.so");
119 BOOST_CHECK(pluginLibraries[1] ==
"/system/libAnotherLib.so");