aboutsummaryrefslogtreecommitdiff
path: root/test/opt/local_single_store_elim_test.cpp
diff options
context:
space:
mode:
authordan sinclair <dj2@everburning.com>2018-07-11 09:24:49 -0400
committerGitHub <noreply@github.com>2018-07-11 09:24:49 -0400
commit2cce2c5b97a9a4a253e626322e33bab9d8eb00c1 (patch)
tree0da7c8b0933968ce17c4471a7b8bb4d50119598e /test/opt/local_single_store_elim_test.cpp
parent7d6c90c9129c7cae8e3ac0ecf2bea278d99fd653 (diff)
downloadspirv-tools-2cce2c5b97a9a4a253e626322e33bab9d8eb00c1.tar.gz
Move tests into namespaces (#1689)
This CL moves the test into namespaces based on their directories.
Diffstat (limited to 'test/opt/local_single_store_elim_test.cpp')
-rw-r--r--test/opt/local_single_store_elim_test.cpp43
1 files changed, 22 insertions, 21 deletions
diff --git a/test/opt/local_single_store_elim_test.cpp b/test/opt/local_single_store_elim_test.cpp
index 35abc9ac..e42c6faf 100644
--- a/test/opt/local_single_store_elim_test.cpp
+++ b/test/opt/local_single_store_elim_test.cpp
@@ -16,10 +16,10 @@
#include "pass_fixture.h"
#include "pass_utils.h"
+namespace spvtools {
+namespace opt {
namespace {
-using namespace spvtools;
-
using LocalSingleStoreElimTest = PassTest<::testing::Test>;
TEST_F(LocalSingleStoreElimTest, PositiveAndNegative) {
@@ -120,8 +120,8 @@ OpReturn
OpFunctionEnd
)";
- SinglePassRunAndCheck<opt::LocalSingleStoreElimPass>(
- predefs + before, predefs + after, true, true);
+ SinglePassRunAndCheck<LocalSingleStoreElimPass>(predefs + before,
+ predefs + after, true, true);
}
TEST_F(LocalSingleStoreElimTest, ThreeStores) {
@@ -186,8 +186,8 @@ OpReturn
OpFunctionEnd
)";
- SinglePassRunAndCheck<opt::LocalSingleStoreElimPass>(
- predefs + before, predefs + before, true, true);
+ SinglePassRunAndCheck<LocalSingleStoreElimPass>(predefs + before,
+ predefs + before, true, true);
}
TEST_F(LocalSingleStoreElimTest, MultipleLoads) {
@@ -290,8 +290,8 @@ OpReturn
OpFunctionEnd
)";
- SinglePassRunAndCheck<opt::LocalSingleStoreElimPass>(
- predefs + before, predefs + after, true, true);
+ SinglePassRunAndCheck<LocalSingleStoreElimPass>(predefs + before,
+ predefs + after, true, true);
}
TEST_F(LocalSingleStoreElimTest, NoStoreElimWithInterveningAccessChainLoad) {
@@ -368,8 +368,8 @@ OpReturn
OpFunctionEnd
)";
- SinglePassRunAndCheck<opt::LocalSingleStoreElimPass>(
- predefs + before, predefs + after, true, true);
+ SinglePassRunAndCheck<LocalSingleStoreElimPass>(predefs + before,
+ predefs + after, true, true);
}
TEST_F(LocalSingleStoreElimTest, NoReplaceOfDominatingPartialStore) {
@@ -423,8 +423,8 @@ OpReturn
OpFunctionEnd
)";
- SinglePassRunAndCheck<opt::LocalSingleStoreElimPass>(assembly, assembly, true,
- true);
+ SinglePassRunAndCheck<LocalSingleStoreElimPass>(assembly, assembly, true,
+ true);
}
TEST_F(LocalSingleStoreElimTest, ElimIfCopyObjectInFunction) {
@@ -526,8 +526,8 @@ OpReturn
OpFunctionEnd
)";
- SinglePassRunAndCheck<opt::LocalSingleStoreElimPass>(
- predefs + before, predefs + after, true, true);
+ SinglePassRunAndCheck<LocalSingleStoreElimPass>(predefs + before,
+ predefs + after, true, true);
}
TEST_F(LocalSingleStoreElimTest, NoOptIfStoreNotDominating) {
@@ -606,8 +606,8 @@ OpReturn
OpFunctionEnd
)";
- SinglePassRunAndCheck<opt::LocalSingleStoreElimPass>(assembly, assembly, true,
- true);
+ SinglePassRunAndCheck<LocalSingleStoreElimPass>(assembly, assembly, true,
+ true);
}
TEST_F(LocalSingleStoreElimTest, OptInitializedVariableLikeStore) {
@@ -665,8 +665,8 @@ OpReturn
OpFunctionEnd
)";
- SinglePassRunAndCheck<opt::LocalSingleStoreElimPass>(
- predefs + before, predefs + after, true, true);
+ SinglePassRunAndCheck<LocalSingleStoreElimPass>(predefs + before,
+ predefs + after, true, true);
}
TEST_F(LocalSingleStoreElimTest, PointerVariable) {
@@ -766,8 +766,7 @@ OpFunctionEnd
)";
SetAssembleOptions(SPV_TEXT_TO_BINARY_OPTION_PRESERVE_NUMERIC_IDS);
- SinglePassRunAndCheck<opt::LocalSingleStoreElimPass>(before, after, true,
- true);
+ SinglePassRunAndCheck<LocalSingleStoreElimPass>(before, after, true, true);
}
// TODO(greg-lunarg): Add tests to verify handling of these cases:
@@ -775,4 +774,6 @@ OpFunctionEnd
// Other types
// Others?
-} // anonymous namespace
+} // namespace
+} // namespace opt
+} // namespace spvtools