From 22c8a4b48efe4c6cfa563c734e771e77f4d7c1b0 Mon Sep 17 00:00:00 2001 From: Francis Murtagh Date: Tue, 4 Jul 2023 13:35:32 +0100 Subject: IVGCVSW-7862 Replacing use of std::filesystem with ghc::filesystem Even though we're using C++ 17 we still do a Debian buster build. This prevents using some new libraries. In this case std::filesystem. Change-Id: Icbdcac8a53d5931f25f8aa77c7422aa0b8ae94d4 Signed-off-by: Francis Murtagh --- tests/ExecuteNetwork/test/FileComparisonExecutorTests.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'tests') diff --git a/tests/ExecuteNetwork/test/FileComparisonExecutorTests.cpp b/tests/ExecuteNetwork/test/FileComparisonExecutorTests.cpp index c8a7171107..bd435e139a 100644 --- a/tests/ExecuteNetwork/test/FileComparisonExecutorTests.cpp +++ b/tests/ExecuteNetwork/test/FileComparisonExecutorTests.cpp @@ -5,12 +5,13 @@ #include #include -#include #include +#include + namespace { -namespace fs = std::filesystem; +namespace fs = ghc::filesystem; TEST_SUITE("FileComparisonExecutorTests") { @@ -34,7 +35,7 @@ TEST_SUITE("FileComparisonExecutorTests") TEST_CASE("ComparisonFileIsEmpty") { - std::filesystem::path fileName = fs::temp_directory_path().append("ComparisonFileIsEmpty.tmp"); + ghc::filesystem::path fileName = fs::temp_directory_path().append("ComparisonFileIsEmpty.tmp"); std::fstream tmpFile; tmpFile.open(fileName, std::ios::out); ExecuteNetworkParams params; @@ -44,12 +45,12 @@ TEST_SUITE("FileComparisonExecutorTests") // can't read a header. CHECK_THROWS_AS(classToTest.Execute(), armnn::ParseException); tmpFile.close(); - std::filesystem::remove(fileName); + ghc::filesystem::remove(fileName); } TEST_CASE("ComparisonFileHasValidHeaderAndData") { - std::filesystem::path fileName = fs::temp_directory_path().append("ComparisonFileHasValidHeaderAndData.tmp"); + ghc::filesystem::path fileName = fs::temp_directory_path().append("ComparisonFileHasValidHeaderAndData.tmp"); std::fstream tmpFile; tmpFile.open(fileName, std::ios::out); // Write a valid header. @@ -60,7 +61,7 @@ TEST_SUITE("FileComparisonExecutorTests") FileComparisonExecutor classToTest(params); // The read in tensor should consist of 1 float. std::vector results = classToTest.Execute(); - std::filesystem::remove(fileName); + ghc::filesystem::remove(fileName); // Should be one tensor in the data. CHECK_EQ(1, results.size()); // We expect there to be 1 element of value 1.1f. -- cgit v1.2.1