mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-25 01:51:38 +08:00
tests updated to vs2015
This commit is contained in:
parent
7bf45bcf14
commit
e226bfc35d
@ -36,7 +36,7 @@ TEST_CASE("file_helper_size", "[file_helper::size()]]")
|
||||
write_with_helper(helper, expected_size);
|
||||
REQUIRE(helper.size() == expected_size);
|
||||
}
|
||||
REQUIRE(filesize(filename) == expected_size);
|
||||
REQUIRE(get_filesize(filename) == expected_size);
|
||||
}
|
||||
|
||||
|
||||
|
@ -52,9 +52,9 @@ TEST_CASE("rotating_file_logger2", "[rotating_logger]]")
|
||||
logger->info("Test message {}", i);
|
||||
|
||||
logger->flush();
|
||||
REQUIRE(filesize(filename) <= 1024);
|
||||
REQUIRE(get_filesize(filename) <= 1024);
|
||||
auto filename1 = basename + ".1.txt";
|
||||
REQUIRE(filesize(filename1) <= 1024);
|
||||
REQUIRE(get_filesize(filename1) <= 1024);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
@ -26,26 +26,26 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v120</PlatformToolset>
|
||||
<PlatformToolset>v140</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>MultiByte</CharacterSet>
|
||||
</PropertyGroup>
|
||||
@ -126,10 +126,12 @@
|
||||
<ClCompile Include="format.cpp" />
|
||||
<ClCompile Include="main.cpp" />
|
||||
<ClCompile Include="registry.cpp" />
|
||||
<ClCompile Include="utils.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="catch.hpp" />
|
||||
<ClInclude Include="includes.h" />
|
||||
<ClInclude Include="utils.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
|
@ -30,6 +30,9 @@
|
||||
<ClCompile Include="file_helper.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="utils.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="includes.h">
|
||||
@ -38,5 +41,8 @@
|
||||
<ClInclude Include="catch.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="utils.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -34,7 +34,7 @@ std::size_t count_lines(const std::string& filename)
|
||||
return counter;
|
||||
}
|
||||
|
||||
std::ifstream::pos_type filesize(const std::string& filename)
|
||||
std::size_t get_filesize(const std::string& filename)
|
||||
{
|
||||
std::ifstream ifs(filename, std::ifstream::ate | std::ifstream::binary);
|
||||
if (!ifs)
|
||||
|
@ -11,5 +11,5 @@ std::string file_contents(const std::string& filename);
|
||||
|
||||
std::size_t count_lines(const std::string& filename);
|
||||
|
||||
std::ifstream::pos_type filesize(const std::string& filename);
|
||||
std::size_t get_filesize(const std::string& filename);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user