summaryrefslogtreecommitdiff
path: root/test/util/pass.test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/util/pass.test.cpp')
-rw-r--r--test/util/pass.test.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/util/pass.test.cpp b/test/util/pass.test.cpp
new file mode 100644
index 0000000000..10651f854b
--- /dev/null
+++ b/test/util/pass.test.cpp
@@ -0,0 +1,16 @@
+#include <mbgl/test/util.hpp>
+
+#include <mbgl/util/pass_types.hpp>
+
+TEST(Pass, NoCopy) {
+ static int copyCount = 0;
+ struct A {
+ A() = default;
+ A(A&&) = default;
+ A(const A&) { ++copyCount; }
+ static mbgl::Pass<A> create() { return A(); }
+ };
+ A a = A::create();
+ (void)a;
+ EXPECT_EQ(0, copyCount);
+} \ No newline at end of file