Repository navigation
Expand file tree
/
Copy pathtest.cpp
More file actions
69 lines (51 loc) · 2.09 KB
/
Copy pathtest.cpp
File metadata and controls
69 lines (51 loc) · 2.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#include "pch.h"
#define _AFXDLL
#include "..\winralter\stdafx.h"
#include <gtest/gtest.h>
#include "..\winralter\CwrHelper.h"
namespace gtests {
namespace winralters_test {
// The fixture for testing class Foo.
class wrTest : public testing::Test
{
protected:
// You can remove any or all of the following functions if their bodies would
// be empty.
wrTest()
{
// You can do set-up work for each test here.
}
~wrTest() override
{
// You can do clean-up work that doesn't throw exceptions here.
}
// If the constructor and destructor are not enough for setting up
// and cleaning up each test, you can define the following methods:
void SetUp() override
{
// Code here will be called immediately after the constructor (right
// before each test).
}
void TearDown() override
{
// Code here will be called immediately after each test (right
// before the destructor).
}
// Class members declared here can be used by all tests in the test suite
// for Foo.
};
winralter::CwrHelper gwrHelper;
TEST_F(wrTest, GetPermanentConfig)
{
EXPECT_EQ(gwrHelper.GetConfigFilePath(0), "D:\\MyDocs\\winralter.ini"); // 0 = PermanentConfig
}
TEST_F(wrTest, GetTemporaryConfig)
{
EXPECT_EQ(gwrHelper.GetConfigFilePath(1), "D:\\MyDocs\\devProjects\\cpp\\gtest\\x64\\Debug\\winralter.inf"); // 1 = TemporaryConfig
}
} // namespace project
} // namespace gtests
int main(int argc, char** argv) {
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}