summaryrefslogtreecommitdiffstats
path: root/gfx/angle/src/tests/preprocessor_tests/if_test.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-07-11 18:11:13 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-07-11 18:11:13 +0200
commit4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0 (patch)
treef000dd831240707a03b8c806db292c2a15cde3ce /gfx/angle/src/tests/preprocessor_tests/if_test.cpp
parent3b7ffb477eec078c7036c92c6a51bb5de6de4f28 (diff)
downloadUXP-4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0.tar
UXP-4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0.tar.gz
UXP-4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0.tar.lz
UXP-4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0.tar.xz
UXP-4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0.zip
Roll back to ANGLE/2845
Diffstat (limited to 'gfx/angle/src/tests/preprocessor_tests/if_test.cpp')
-rwxr-xr-xgfx/angle/src/tests/preprocessor_tests/if_test.cpp94
1 files changed, 0 insertions, 94 deletions
diff --git a/gfx/angle/src/tests/preprocessor_tests/if_test.cpp b/gfx/angle/src/tests/preprocessor_tests/if_test.cpp
index 7940b564a..27bfbbbb4 100755
--- a/gfx/angle/src/tests/preprocessor_tests/if_test.cpp
+++ b/gfx/angle/src/tests/preprocessor_tests/if_test.cpp
@@ -952,97 +952,3 @@ TEST_F(IfTest, UnterminatedDefinedInMacro2)
pp::Token token;
mPreprocessor.lex(&token);
}
-
-// Undefined shift: negative shift offset.
-TEST_F(IfTest, BitShiftLeftOperatorNegativeOffset)
-{
- const char *str =
- "#if 2 << -1 == 1\n"
- "foo\n"
- "#endif\n";
- ASSERT_TRUE(mPreprocessor.init(1, &str, 0));
-
- EXPECT_CALL(mDiagnostics,
- print(pp::Diagnostics::PP_UNDEFINED_SHIFT, pp::SourceLocation(0, 1), "2 << -1"));
-
- pp::Token token;
- mPreprocessor.lex(&token);
-}
-
-// Undefined shift: shift offset is out of range.
-TEST_F(IfTest, BitShiftLeftOperatorOffset32)
-{
- const char *str =
- "#if 2 << 32 == 1\n"
- "foo\n"
- "#endif\n";
- ASSERT_TRUE(mPreprocessor.init(1, &str, 0));
-
- EXPECT_CALL(mDiagnostics,
- print(pp::Diagnostics::PP_UNDEFINED_SHIFT, pp::SourceLocation(0, 1), "2 << 32"));
-
- pp::Token token;
- mPreprocessor.lex(&token);
-}
-
-// Left hand side of shift is negative.
-TEST_F(IfTest, BitShiftLeftOperatorNegativeLHS)
-{
- const char *str =
- "#if (-2) << 1 == -4\n"
- "pass\n"
- "#endif\n";
- const char *expected =
- "\n"
- "pass\n"
- "\n";
-
- preprocess(str, expected);
-}
-
-// Undefined shift: shift offset is out of range.
-TEST_F(IfTest, BitShiftRightOperatorNegativeOffset)
-{
- const char *str =
- "#if 2 >> -1 == 4\n"
- "foo\n"
- "#endif\n";
- ASSERT_TRUE(mPreprocessor.init(1, &str, 0));
-
- EXPECT_CALL(mDiagnostics,
- print(pp::Diagnostics::PP_UNDEFINED_SHIFT, pp::SourceLocation(0, 1), "2 >> -1"));
-
- pp::Token token;
- mPreprocessor.lex(&token);
-}
-
-// Undefined shift: shift offset is out of range.
-TEST_F(IfTest, BitShiftRightOperatorOffset32)
-{
- const char *str =
- "#if 2 >> 32 == 0\n"
- "foo\n"
- "#endif\n";
- ASSERT_TRUE(mPreprocessor.init(1, &str, 0));
-
- EXPECT_CALL(mDiagnostics,
- print(pp::Diagnostics::PP_UNDEFINED_SHIFT, pp::SourceLocation(0, 1), "2 >> 32"));
-
- pp::Token token;
- mPreprocessor.lex(&token);
-}
-
-// Left hand side of shift is negative.
-TEST_F(IfTest, BitShiftRightOperatorNegativeLHS)
-{
- const char *str =
- "#if (-2) >> 1 == 0x7fffffff\n"
- "pass\n"
- "#endif\n";
- const char *expected =
- "\n"
- "pass\n"
- "\n";
-
- preprocess(str, expected);
-}