| |
1 |
1 |
#include "stdafx.h" |
| |
2 |
2 |
#include "gtest/gtest.h" |
| |
3 |
3 |
#include "gmock/gmock.h" |
| |
4 |
4 |
#include "../TPath.h" |
| |
5 |
5 |
#include "../TCoreException.h" |
| |
|
6 |
#include "../TPathContainer.h" |
| |
6 |
7 |
|
| |
7 |
8 |
using namespace chcore; |
| |
8 |
9 |
|
| |
9 |
10 |
TEST(TSmartPathTests, EmptyPathToString) |
| |
10 |
11 |
{ |
| |
11 |
12 |
TSmartPath tPath; |
| |
12 |
13 |
EXPECT_STREQ(tPath.ToString(), _T("")); |
| |
13 |
14 |
} |
| |
14 |
15 |
|
| |
15 |
16 |
TEST(TSmartPathTests, PathFromString) |
| |
16 |
17 |
{ |
| |
17 |
18 |
TSmartPath tPath; |
| |
18 |
19 |
tPath.FromString(_T("c:\\test")); |
| |
19 |
20 |
EXPECT_STREQ(tPath.ToString(), _T("c:\\test")); |
| |
20 |
21 |
} |
| |
21 |
22 |
|
| |
22 |
23 |
TEST(TSmartPathTests, PathFromNullString) |
| |
23 |
24 |
{ |
| |
24 |
25 |
TSmartPath tPath; |
| |
25 |
26 |
EXPECT_THROW(tPath.FromString(NULL), TCoreException); |