Ticket #4522: 4522.diff
File 4522.diff, 1.3 KB (added by , 7 years ago) |
---|
-
source/simulation2/tests/test_CmpTemplateManager.h
17 17 18 18 #include "lib/self_test.h" 19 19 20 #include <boost/algorithm/string.hpp> 21 20 22 #include "simulation2/system/ComponentManager.h" 21 23 22 24 #include "simulation2/components/ICmpTemplateManager.h" … … 223 225 { 224 226 g_VFS = CreateVfs(20 * MiB); 225 227 TS_ASSERT_OK(g_VFS->Mount(L"", DataDir()/"mods"/"public", VFS_MOUNT_MUST_EXIST)); 228 TS_ASSERT_OK(g_VFS->Mount(L"", DataDir()/"mods"/"mod", VFS_MOUNT_MUST_EXIST)); 226 229 TS_ASSERT_OK(g_VFS->Mount(L"cache", DataDir()/"_testcache")); 227 230 CXeromyces::Startup(); 228 231 } … … 245 248 CmpPtr<ICmpTemplateManager> cmpTemplateManager(sim, SYSTEM_ENTITY); 246 249 TS_ASSERT(cmpTemplateManager); 247 250 248 std::vector<std::string> templates = cmpTemplateManager->FindAllTemplates(true); 249 for (size_t i = 0; i < templates.size(); ++i) 251 for (const std::string& name : cmpTemplateManager->FindAllTemplates(true)) 250 252 { 251 std::string name = templates[i]; 253 if (boost::algorithm::starts_with(name, L"special_filter/")) 254 continue; 255 252 256 printf("# %s\n", name.c_str()); 253 257 const CParamNode* p = cmpTemplateManager->GetTemplate(name); 254 258 TS_ASSERT(p != NULL);