summaryrefslogtreecommitdiff
path: root/test/util/pass.test.cpp
blob: 10651f854b4186c5150d76d66311d39bc0365859 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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);
}