MCPcopy Create free account
hub / github.com/MITK/MITK / checkResourceInfo

Function checkResourceInfo

Modules/CppMicroServices/test/usModuleResourceTest.cpp:42–58  ·  view source on GitHub ↗

Please confirm that a character count differing from the following targets is not due to a misconfiguration of your versioning software (Correct line endings for your system) See issue #18 ( https://github.com/saschazelzer/CppMicroServices/issues/18 )

Source from the content-addressed store, hash-verified

40 // a misconfiguration of your versioning software (Correct line endings for your system)
41 // See issue #18 ( https://github.com/saschazelzer/CppMicroServices/issues/18 )
42void checkResourceInfo(const ModuleResource& res, const std::string& path,
43 const std::string& baseName,
44 const std::string& completeBaseName, const std::string& suffix,
45 const std::string& completeSuffix,
46 int size, bool children = false)
47{
48 US_TEST_CONDITION_REQUIRED(res.IsValid(), "Valid resource")
49 US_TEST_CONDITION(res.GetBaseName() == baseName, "GetBaseName()")
50 US_TEST_CONDITION(res.GetChildren().empty() == !children, "No children")
51 US_TEST_CONDITION(res.GetCompleteBaseName() == completeBaseName, "GetCompleteBaseName()")
52 US_TEST_CONDITION(res.GetName() == completeBaseName + "." + suffix, "GetName()")
53 US_TEST_CONDITION(res.GetResourcePath() == path + completeBaseName + "." + suffix, "GetResourcePath()")
54 US_TEST_CONDITION(res.GetPath() == path, "GetPath()")
55 US_TEST_CONDITION(res.GetSize() == size, "Data size")
56 US_TEST_CONDITION(res.GetSuffix() == suffix, "Suffix")
57 US_TEST_CONDITION(res.GetCompleteSuffix() == completeSuffix, "Complete suffix")
58}
59
60void testTextResource(Module* module)
61{

Callers 5

testTextResourceFunction · 0.85
testTextResourceAsBinaryFunction · 0.85
testSpecialCharactersFunction · 0.85
testBinaryResourceFunction · 0.85
testCompressedResourceFunction · 0.85

Calls 11

GetBaseNameMethod · 0.80
GetCompleteBaseNameMethod · 0.80
GetResourcePathMethod · 0.80
GetCompleteSuffixMethod · 0.80
IsValidMethod · 0.45
emptyMethod · 0.45
GetChildrenMethod · 0.45
GetNameMethod · 0.45
GetPathMethod · 0.45
GetSizeMethod · 0.45
GetSuffixMethod · 0.45

Tested by

no test coverage detected