mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-17 18:24:34 +00:00
[cleanup] Add some actual positive tests for equality. This unittest
never actually compared for equality two pointer unions that were equal. Fortunately, things seem to work. =] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207468 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -19,14 +19,18 @@ struct PointerUnionTest : public testing::Test {
|
|||||||
float f;
|
float f;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
PU a, b, n;
|
PU a, b, c, n;
|
||||||
|
|
||||||
PointerUnionTest() : f(3.14f), i(42), a(&f), b(&i), n() {}
|
PointerUnionTest() : f(3.14f), i(42), a(&f), b(&i), c(&i), n() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
TEST_F(PointerUnionTest, Comparison) {
|
TEST_F(PointerUnionTest, Comparison) {
|
||||||
|
EXPECT_TRUE(a == a);
|
||||||
|
EXPECT_FALSE(a != a);
|
||||||
EXPECT_TRUE(a != b);
|
EXPECT_TRUE(a != b);
|
||||||
EXPECT_FALSE(a == b);
|
EXPECT_FALSE(a == b);
|
||||||
|
EXPECT_TRUE(b == c);
|
||||||
|
EXPECT_FALSE(b != c);
|
||||||
EXPECT_TRUE(b != n);
|
EXPECT_TRUE(b != n);
|
||||||
EXPECT_FALSE(b == n);
|
EXPECT_FALSE(b == n);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user