From 14c08046d40203c9d078768e4fe1bf9374865f34 Mon Sep 17 00:00:00 2001
From: Scott Talbert <swt@techie.net>
Date: Tue, 7 Apr 2020 01:48:38 +0200
Subject: [PATCH] Fix tests when run on ppc64le arch
---
tests/file/filetest.cpp | 2 +-
tests/filename/filenametest.cpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/file/filetest.cpp b/tests/file/filetest.cpp
index f1876daf94..9692bd3c60 100644
--- a/tests/file/filetest.cpp
+++ b/tests/file/filetest.cpp
@@ -159,7 +159,7 @@ TEST_CASE("wxFile::Special", "[file][linux][special-file]")
// All files in /sys seem to have size of 4KiB currently, even if they
// don't have that much data in them.
wxFile fileSys("/sys/power/state");
- CHECK( fileSys.Length() == 4096 );
+ CHECK( fileSys.Length() == sysconf(_SC_PAGESIZE) );
CHECK( fileSys.IsOpened() );
CHECK( fileSys.ReadAll(&s) );
CHECK( !s.empty() );
diff --git a/tests/filename/filenametest.cpp b/tests/filename/filenametest.cpp
index 240e95205c..2928b8d4cb 100644
--- a/tests/filename/filenametest.cpp
+++ b/tests/filename/filenametest.cpp
@@ -1060,7 +1060,7 @@ TEST_CASE("wxFileName::GetSizeSpecial", "[filename][linux][special-file]")
//CHECK( size > 0 );
// All files in /sys seem to have size of 4KiB currently.
- CHECK( wxFileName::GetSize("/sys/power/state") == 4096 );
+ CHECK( wxFileName::GetSize("/sys/power/state") == sysconf(_SC_PAGESIZE) );
}
#endif // __LINUX__
--
2.25.1