|
|
@@ -4,6 +4,7 @@ |
|
|
|
using namespace Microsoft::VisualStudio::CppUnitTestFramework; |
|
|
|
#define FileName_1 "../code/config/1_ContainsNearbyDuplicate.ini" |
|
|
|
#define FileName_2 "../code/config/2_ExcelSheetColumnTiTle.ini" |
|
|
|
#define FileName_3 "../code/config/3_IsUgly.ini" |
|
|
|
|
|
|
|
|
|
|
|
namespace test1 |
|
|
@@ -46,4 +47,22 @@ namespace test2 |
|
|
|
} |
|
|
|
}; |
|
|
|
} |
|
|
|
namespace test3 |
|
|
|
{ |
|
|
|
TEST_CLASS(UnitTest_1) |
|
|
|
{ |
|
|
|
TEST_METHOD(TestMethode1) |
|
|
|
{ |
|
|
|
char Section_Name[100][10] = { 0 }; |
|
|
|
int Section_Count = CalcCount(100, Section_Name, FileName_3); |
|
|
|
CString Na, nExpect; |
|
|
|
for (int i = 0; i < Section_Count; i++) { |
|
|
|
GetPrivateProfileString(Section_Name[i], "Na", " ", Na.GetBuffer(20), 20, FileName_3); |
|
|
|
GetPrivateProfileString(Section_Name[i], "nExpect", " ", nExpect.GetBuffer(20), 20, FileName_3); |
|
|
|
bool nReal = IsUgly(_ttoi(Na)); |
|
|
|
Assert::AreEqual(nReal, CstrToBool(nExpect)); |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
} |
|
|
|
|