diff --git a/tests/file_helper.cpp b/tests/file_helper.cpp index f82e6758..f57ab707 100644 --- a/tests/file_helper.cpp +++ b/tests/file_helper.cpp @@ -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); } diff --git a/tests/file_log.cpp b/tests/file_log.cpp index e728a963..2abd0214 100644 --- a/tests/file_log.cpp +++ b/tests/file_log.cpp @@ -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); } diff --git a/tests/tests.vcxproj b/tests/tests.vcxproj index 7272c212..cd8e5a5d 100644 --- a/tests/tests.vcxproj +++ b/tests/tests.vcxproj @@ -1,5 +1,5 @@  - + Debug @@ -26,26 +26,26 @@ Application true - v120 + v140 MultiByte Application true - v120 + v140 MultiByte Application false - v120 + v140 true MultiByte Application false - v120 + v140 true MultiByte @@ -126,10 +126,12 @@ + + diff --git a/tests/tests.vcxproj.filters b/tests/tests.vcxproj.filters index bdadb0bc..8a1a5d6c 100644 --- a/tests/tests.vcxproj.filters +++ b/tests/tests.vcxproj.filters @@ -30,6 +30,9 @@ Source Files + + Source Files + @@ -38,5 +41,8 @@ Header Files + + Header Files + \ No newline at end of file diff --git a/tests/utils.cpp b/tests/utils.cpp index ef6018b6..140465bd 100644 --- a/tests/utils.cpp +++ b/tests/utils.cpp @@ -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) diff --git a/tests/utils.h b/tests/utils.h index eea5d6c5..1d9b6213 100644 --- a/tests/utils.h +++ b/tests/utils.h @@ -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);