MCPcopy Create free account
hub / github.com/NPP-JSONViewer/JSON-Viewer / ProfileTest

Class ProfileTest

tests/UnitTest/ProfileTest.cpp:53–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51 };
52
53 class ProfileTest : public ::testing::Test
54 {
55 protected:
56 std::unique_ptr<ProfileSettingEx> m_pProfile;
57
58 void SetUp() override
59 {
60 std::wstring exePath;
61 wchar_t path[MAX_PATH];
62 DWORD size = GetModuleFileName(nullptr, path, MAX_PATH);
63 if (size)
64 {
65 exePath = path;
66 size_t pos = exePath.find_last_of(L"\\/");
67 if (pos != std::wstring::npos)
68 {
69 // Remove the executable name, leave only the directory
70 exePath = exePath.substr(0, pos + 1);
71 }
72 }
73 exePath += L"test_profile.ini";
74
75 m_pProfile = std::make_unique<ProfileSettingEx>(exePath);
76 }
77
78 void TearDown() override {}
79 };
80
81 TEST_F(ProfileTest, ReadValueInt_Default)
82 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected