aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/unit/unitTest.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2017-06-10 13:22:55 +1000
committerNeil <nyamatongwe@gmail.com>2017-06-10 13:22:55 +1000
commita4051422b4364d1193abc9a31d1f3df42fdedc47 (patch)
tree07921c16f9037ded3307136bb8a1f7c76a34d7c3 /test/unit/unitTest.cxx
parentc417a997eb6d3e46ad3b8fab175796ff69f60cef (diff)
downloadscintilla-mirror-a4051422b4364d1193abc9a31d1f3df42fdedc47.tar.gz
Avoid warnings when compiling unit tests with recent GCC.
Diffstat (limited to 'test/unit/unitTest.cxx')
-rw-r--r--test/unit/unitTest.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/unit/unitTest.cxx b/test/unit/unitTest.cxx
index a6feed204..eb554abc2 100644
--- a/test/unit/unitTest.cxx
+++ b/test/unit/unitTest.cxx
@@ -38,6 +38,14 @@
#include "Platform.h"
+#if defined(__GNUC__)
+// Want to avoid misleading indentation warnings in catch.hpp but the pragma
+// may not be available so protect by turning off pragma warnings
+#pragma GCC diagnostic ignored "-Wunknown-pragmas"
+#pragma GCC diagnostic ignored "-Wpragmas"
+#pragma GCC diagnostic ignored "-Wmisleading-indentation"
+#endif
+
#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
#include "catch.hpp"