git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207466
91177308-0d34-0410-b5e6-
96231b3b80d8
typedef PointerUnion<int *, float *> PU;
-// Test fixture
-class PointerUnionTest : public testing::Test {};
+struct PointerUnionTest : public testing::Test {
+ float f;
+ int i;
-float f = 3.14f;
-int i = 42;
+ PU a, b, n;
-const PU a(&f);
-const PU b(&i);
-const PU n;
+ PointerUnionTest() : f(3.14f), i(42), a(&f), b(&i), n() {}
+};
TEST_F(PointerUnionTest, Comparison) {
EXPECT_TRUE(a != b);