OSDN Git Service

fix broken unit tests
authorTakashi Sawanaka <sdottaka@users.sourceforge.net>
Sun, 29 Jan 2017 02:12:15 +0000 (11:12 +0900)
committerTakashi Sawanaka <sdottaka@users.sourceforge.net>
Sun, 29 Jan 2017 02:12:15 +0000 (11:12 +0900)
Testing/GoogleTest/Encoding/charsets_test.cpp
Testing/GoogleTest/Encoding/codepage_detect_test.cpp
Testing/GoogleTest/Paths/paths_test.cpp
Testing/GoogleTest/UnitTests/UnitTests.vcxproj

index f1194e4..a991f68 100644 (file)
@@ -13,11 +13,13 @@ namespace
                CharsetsTest()
                {
                        // You can do set-up work for each test here.
+                       charsets_init();
                }
 
                virtual ~CharsetsTest()
                {
                        // You can do clean-up work     that doesn't throw exceptions here.
+                       charsets_cleanup();
                }
 
                // If   the     constructor     and     destructor are not enough for setting up
index 4aacf66..66d937f 100644 (file)
@@ -1,5 +1,6 @@
 #include <gtest/gtest.h>
 #include "codepage_detect.h"
+#include "charsets.h"
 
 namespace
 {
@@ -13,11 +14,13 @@ namespace
                CodepageDetectTest()
                {
                        // You can do set-up work for each test here.
+                       charsets_init();
                }
 
                virtual ~CodepageDetectTest()
                {
                        // You can do clean-up work     that doesn't throw exceptions here.
+                       charsets_cleanup();
                }
 
                // If   the     constructor     and     destructor are not enough for setting up
index ebb64b3..2bd391a 100644 (file)
@@ -106,8 +106,8 @@ namespace
        }\r
        TEST_F(PathTest, Exists_relfiles)\r
        {\r
-               const TCHAR path[] = _T(".\\..\\Paths\\paths::test.cpp");\r
-               const TCHAR path2[] = _T("..\\Paths\\paths::test.cpp");\r
+               const TCHAR path[] = _T(".\\..\\Paths\\paths_test.cpp");\r
+               const TCHAR path2[] = _T("..\\Paths\\paths_test.cpp");\r
                EXPECT_EQ(paths::IS_EXISTING_FILE, paths::DoesPathExist(path));\r
                EXPECT_EQ(paths::IS_EXISTING_FILE, paths::DoesPathExist(path2));\r
        }\r
index 1434e67..2a83d01 100644 (file)
     <ClCompile>\r
       <Optimization>Disabled</Optimization>\r
       <AdditionalIncludeDirectories>..\..\..\Src;..\..\..\Src\Common;..\..\..\Externals\boost;..\..\..\Externals\poco\Foundation\include;..\..\..\Externals\poco\XML\include;..\..\..\Externals\gtest\include;..\..\..\Externals\gtest\;..\..\..\Src\diffutils\src;..\..\..\Src\diffutils\lib;..\..\..\Src\diffutils\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;UNICODE;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <PreprocessorDefinitions>WIN32;WIN64;_DEBUG;_CONSOLE;UNICODE;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
       <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\r
       <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>\r
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
     <ClCompile>\r
       <AdditionalIncludeDirectories>..\..\..\Src;..\..\..\Src\Common;..\..\..\Externals\boost;..\..\..\Externals\poco\Foundation\include;..\..\..\Externals\poco\XML\include;..\..\..\Externals\gtest\include;..\..\..\Externals\gtest\;..\..\..\Src\diffutils\src;..\..\..\Src\diffutils\lib;..\..\..\Src\diffutils\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;UNICODE;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
+      <PreprocessorDefinitions>WIN32;WIN64;NDEBUG;_CONSOLE;UNICODE;POCO_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
       <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
       <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>\r
       <PrecompiledHeader>\r