MCPcopy Create free account
hub / github.com/NatLabRockies/OpenStudio / TEST

Function TEST

src/lib/test/ApplicationPathHelpers_GTest.cpp:15–34  ·  view source on GitHub ↗

Want to make sure what getOpenStudioModule actually returns

Source from the content-addressed store, hash-verified

13
14// Want to make sure what getOpenStudioModule actually returns
15TEST(ApplicationPathHelpers, Simple_test_forThisModule) {
16 path openstudioModulePath = getOpenStudioModule();
17 EXPECT_TRUE(exists(openstudioModulePath));
18 // The expected path is the utilities one, but resolved for symlinks (we don't want to hardcode the version eg openstudio_utilities_tests-2.8.0)
19#if defined(_WIN32)
20# if defined(NINJA)
21 openstudio::path expectedOpenstudioModulePath = getApplicationBuildDirectory() / toPath("Products/openstudiolib.dll");
22# elif _DEBUG
23 openstudio::path expectedOpenstudioModulePath = getApplicationBuildDirectory() / toPath("Products/Debug/openstudiolib.dll");
24# else
25 openstudio::path expectedOpenstudioModulePath = getApplicationBuildDirectory() / toPath("Products/Release/openstudiolib.dll");
26# endif
27#elif __APPLE__
28 openstudio::path expectedOpenstudioModulePath = getApplicationBuildDirectory() / toPath("Products/libopenstudiolib.dylib");
29#else
30 openstudio::path expectedOpenstudioModulePath = getApplicationBuildDirectory() / toPath("Products/libopenstudiolib.so");
31#endif
32 expectedOpenstudioModulePath = completeAndNormalize(expectedOpenstudioModulePath);
33 EXPECT_EQ(toString(expectedOpenstudioModulePath), toString(openstudioModulePath));
34}

Callers

nothing calls this directly

Calls 3

completeAndNormalizeFunction · 0.85
toPathFunction · 0.50
toStringFunction · 0.50

Tested by

no test coverage detected