summaryrefslogtreecommitdiffstats
path: root/test/API/driver/kwsys/testConfigure.cxx
diff options
context:
space:
mode:
authorjhendersonHDF <jhenderson@hdfgroup.org>2023-05-02 19:52:39 (GMT)
committerJordan Henderson <jhenderson@hdfgroup.org>2023-05-03 18:26:57 (GMT)
commitc75b4af1a2630ace445da1ec661191601583f79a (patch)
treea345b94dc09dd1ea1c38c1136a133b00939ba395 /test/API/driver/kwsys/testConfigure.cxx
parent75d64819b050bb30b2a2751d9ba55651f9a1af79 (diff)
downloadhdf5-c75b4af1a2630ace445da1ec661191601583f79a.zip
hdf5-c75b4af1a2630ace445da1ec661191601583f79a.tar.gz
hdf5-c75b4af1a2630ace445da1ec661191601583f79a.tar.bz2
Add initial version of HDF5 API tests (#2877)
Diffstat (limited to 'test/API/driver/kwsys/testConfigure.cxx')
-rw-r--r--test/API/driver/kwsys/testConfigure.cxx30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/API/driver/kwsys/testConfigure.cxx b/test/API/driver/kwsys/testConfigure.cxx
new file mode 100644
index 0000000..a3c2ed3
--- /dev/null
+++ b/test/API/driver/kwsys/testConfigure.cxx
@@ -0,0 +1,30 @@
+/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+file Copyright.txt or https://cmake.org/licensing#kwsys for details. */
+#include "kwsysPrivate.h"
+#include KWSYS_HEADER(Configure.hxx)
+
+// Work-around CMake dependency scanning limitation. This must
+// duplicate the above list of headers.
+#if 0
+# include "Configure.hxx.in"
+#endif
+
+static bool testFallthrough(int n)
+{
+ int r = 0;
+ switch (n) {
+ case 1:
+ ++r;
+ KWSYS_FALLTHROUGH;
+ default:
+ ++r;
+ }
+ return r == 2;
+}
+
+int testConfigure(int, char* [])
+{
+ bool res = true;
+ res = testFallthrough(1) && res;
+ return res ? 0 : 1;
+}