]> git.saurik.com Git - apple/xnu.git/blobdiff - tests/osptr_compat.cpp
xnu-7195.50.7.100.1.tar.gz
[apple/xnu.git] / tests / osptr_compat.cpp
diff --git a/tests/osptr_compat.cpp b/tests/osptr_compat.cpp
new file mode 100644 (file)
index 0000000..845dfb7
--- /dev/null
@@ -0,0 +1,18 @@
+//
+// Make sure we can #include OSPtr.h under various version of the C++ Standard.
+//
+
+#include <darwintest.h>
+#include <libkern/c++/OSPtr.h>
+
+T_GLOBAL_META(
+       T_META_NAMESPACE("osptr"),
+       T_META_CHECK_LEAKS(false),
+       T_META_RUN_CONCURRENTLY(true)
+       );
+
+#define CONCAT_PRIM(x, y) x ## y
+#define CONCAT(x, y) CONCAT_PRIM(x, y)
+T_DECL(CONCAT(osptr_compat_, OSPTR_STD), "osptr.compat") {
+       T_PASS("OSPtr compatibility test passed");
+}