diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-07-18 08:24:24 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-07-18 08:24:24 +0200 |
commit | fc61780b35af913801d72086456f493f63197da6 (patch) | |
tree | f85891288a7bd988da9f0f15ae64e5c63f00d493 /gfx/angle/src/tests/compiler_tests/IntermNode_test.cpp | |
parent | 69f7f9e5f1475891ce11cc4f431692f965b0cd30 (diff) | |
parent | 50d3e596bbe89c95615f96eb71f6bc5be737a1db (diff) | |
download | UXP-9ccb235f04529c1ec345d87dad6521cb567d20bb.tar UXP-9ccb235f04529c1ec345d87dad6521cb567d20bb.tar.gz UXP-9ccb235f04529c1ec345d87dad6521cb567d20bb.tar.lz UXP-9ccb235f04529c1ec345d87dad6521cb567d20bb.tar.xz UXP-9ccb235f04529c1ec345d87dad6521cb567d20bb.zip |
Merge commit '50d3e596bbe89c95615f96eb71f6bc5be737a1db' into Basilisk-releasev2018.07.18
# Conflicts:
# browser/app/profile/firefox.js
# browser/components/preferences/jar.mn
Diffstat (limited to 'gfx/angle/src/tests/compiler_tests/IntermNode_test.cpp')
-rwxr-xr-x | gfx/angle/src/tests/compiler_tests/IntermNode_test.cpp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/gfx/angle/src/tests/compiler_tests/IntermNode_test.cpp b/gfx/angle/src/tests/compiler_tests/IntermNode_test.cpp index 1a14ad86c..b0f7404d3 100755 --- a/gfx/angle/src/tests/compiler_tests/IntermNode_test.cpp +++ b/gfx/angle/src/tests/compiler_tests/IntermNode_test.cpp @@ -13,8 +13,6 @@ #include "compiler/translator/IntermNode.h" #include "compiler/translator/PoolAlloc.h" -using namespace sh; - class IntermNodeTest : public testing::Test { public: @@ -149,8 +147,10 @@ TEST_F(IntermNodeTest, DeepCopyBinaryNode) { TType type(EbtFloat, EbpHigh); - TIntermBinary *original = new TIntermBinary(EOpAdd, createTestSymbol(), createTestSymbol()); + TIntermBinary *original = new TIntermBinary(EOpAdd); original->setLine(getTestSourceLoc()); + original->setLeft(createTestSymbol()); + original->setRight(createTestSymbol()); TIntermTyped *copyTyped = original->deepCopy(); TIntermBinary *copy = copyTyped->getAsBinaryNode(); ASSERT_NE(nullptr, copy); @@ -168,8 +168,9 @@ TEST_F(IntermNodeTest, DeepCopyUnaryNode) { TType type(EbtFloat, EbpHigh); - TIntermUnary *original = new TIntermUnary(EOpPreIncrement, createTestSymbol()); + TIntermUnary *original = new TIntermUnary(EOpPreIncrement); original->setLine(getTestSourceLoc()); + original->setOperand(createTestSymbol()); TIntermTyped *copyTyped = original->deepCopy(); TIntermUnary *copy = copyTyped->getAsUnaryNode(); ASSERT_NE(nullptr, copy); @@ -209,24 +210,24 @@ TEST_F(IntermNodeTest, DeepCopyAggregateNode) } } -// Check that the deep copy of a ternary node is an actual copy with the same attributes as the +// Check that the deep copy of a selection node is an actual copy with the same attributes as the // original. Child nodes also need to be copies with the same attributes as the original children. -TEST_F(IntermNodeTest, DeepCopyTernaryNode) +TEST_F(IntermNodeTest, DeepCopySelectionNode) { TType type(EbtFloat, EbpHigh); - TIntermTernary *original = new TIntermTernary(createTestSymbol(TType(EbtBool, EbpUndefined)), - createTestSymbol(), createTestSymbol()); + TIntermSelection *original = new TIntermSelection( + createTestSymbol(TType(EbtBool, EbpUndefined)), createTestSymbol(), createTestSymbol()); original->setLine(getTestSourceLoc()); TIntermTyped *copyTyped = original->deepCopy(); - TIntermTernary *copy = copyTyped->getAsTernaryNode(); + TIntermSelection *copy = copyTyped->getAsSelectionNode(); ASSERT_NE(nullptr, copy); ASSERT_NE(original, copy); checkTestSourceLoc(copy->getLine()); checkTypeEqualWithQualifiers(original->getType(), copy->getType()); checkSymbolCopy(original->getCondition(), copy->getCondition()); - checkSymbolCopy(original->getTrueExpression(), copy->getTrueExpression()); - checkSymbolCopy(original->getFalseExpression(), copy->getFalseExpression()); + checkSymbolCopy(original->getTrueBlock(), copy->getTrueBlock()); + checkSymbolCopy(original->getFalseBlock(), copy->getFalseBlock()); } |