From 2881fe958f6345c57be00594337e64982f676047 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Tue, 8 Nov 2016 10:11:07 -0800 Subject: [PATCH] Rename validation tests to comply with Google style guide. --- test/val/CMakeLists.txt | 20 ++++++++++---------- ...lidate.Capability.cpp => val_capability_test.cpp} | 13 +++++++------ test/val/{Validate.CFG.cpp => val_cfg_test.cpp} | 2 +- test/val/{Validate.Data.cpp => val_data_test.cpp} | 8 ++++---- test/val/{ValidateFixtures.cpp => val_fixtures.cpp} | 2 +- test/val/{ValidateFixtures.h => val_fixtures.h} | 0 test/val/{ValidateID.cpp => val_id_test.cpp} | 0 .../val/{Validate.Layout.cpp => val_layout_test.cpp} | 4 ++-- test/val/{Validate.SSA.cpp => val_ssa_test.cpp} | 8 ++++---- test/val/{ValidationState.cpp => val_state_test.cpp} | 3 +-- .../{Validate.Storage.cpp => val_storage_test.cpp} | 2 +- 11 files changed, 31 insertions(+), 31 deletions(-) rename test/val/{Validate.Capability.cpp => val_capability_test.cpp} (99%) rename test/val/{Validate.CFG.cpp => val_cfg_test.cpp} (99%) rename test/val/{Validate.Data.cpp => val_data_test.cpp} (99%) rename test/val/{ValidateFixtures.cpp => val_fixtures.cpp} (98%) rename test/val/{ValidateFixtures.h => val_fixtures.h} (100%) rename test/val/{ValidateID.cpp => val_id_test.cpp} (100%) rename test/val/{Validate.Layout.cpp => val_layout_test.cpp} (99%) rename test/val/{Validate.SSA.cpp => val_ssa_test.cpp} (99%) rename test/val/{ValidationState.cpp => val_state_test.cpp} (99%) rename test/val/{Validate.Storage.cpp => val_storage_test.cpp} (99%) diff --git a/test/val/CMakeLists.txt b/test/val/CMakeLists.txt index 7988fe5..b00abc3 100644 --- a/test/val/CMakeLists.txt +++ b/test/val/CMakeLists.txt @@ -16,55 +16,55 @@ set(VAL_TEST_COMMON_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/../test_fixture.h ${CMAKE_CURRENT_SOURCE_DIR}/../unit_spirv.h ${CMAKE_CURRENT_SOURCE_DIR}/../unit_spirv.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/ValidateFixtures.h - ${CMAKE_CURRENT_SOURCE_DIR}/ValidateFixtures.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/val_fixtures.h + ${CMAKE_CURRENT_SOURCE_DIR}/val_fixtures.cpp ) add_spvtools_unittest(TARGET val_capability - SRCS ${CMAKE_CURRENT_SOURCE_DIR}/Validate.Capability.cpp + SRCS val_capability_test.cpp ${VAL_TEST_COMMON_SRCS} LIBS ${SPIRV_TOOLS} ) add_spvtools_unittest(TARGET val_cfg - SRCS ${CMAKE_CURRENT_SOURCE_DIR}/Validate.CFG.cpp + SRCS val_cfg_test.cpp ${VAL_TEST_COMMON_SRCS} LIBS ${SPIRV_TOOLS} ) add_spvtools_unittest(TARGET val_id - SRCS ${CMAKE_CURRENT_SOURCE_DIR}/ValidateID.cpp + SRCS val_id_test.cpp ${VAL_TEST_COMMON_SRCS} LIBS ${SPIRV_TOOLS} ) add_spvtools_unittest(TARGET val_layout - SRCS ${CMAKE_CURRENT_SOURCE_DIR}/Validate.Layout.cpp + SRCS val_layout_test.cpp ${VAL_TEST_COMMON_SRCS} LIBS ${SPIRV_TOOLS} ) add_spvtools_unittest(TARGET val_ssa - SRCS ${CMAKE_CURRENT_SOURCE_DIR}/Validate.SSA.cpp + SRCS val_ssa_test.cpp ${VAL_TEST_COMMON_SRCS} LIBS ${SPIRV_TOOLS} ) add_spvtools_unittest(TARGET val_storage - SRCS ${CMAKE_CURRENT_SOURCE_DIR}/Validate.Storage.cpp + SRCS val_storage_test.cpp ${VAL_TEST_COMMON_SRCS} LIBS ${SPIRV_TOOLS} ) add_spvtools_unittest(TARGET val_state - SRCS ${CMAKE_CURRENT_SOURCE_DIR}/ValidationState.cpp + SRCS val_state_test.cpp ${VAL_TEST_COMMON_SRCS} LIBS ${SPIRV_TOOLS} ) add_spvtools_unittest(TARGET val_data - SRCS ${CMAKE_CURRENT_SOURCE_DIR}/Validate.Data.cpp + SRCS val_data_test.cpp ${VAL_TEST_COMMON_SRCS} LIBS ${SPIRV_TOOLS} ) diff --git a/test/val/Validate.Capability.cpp b/test/val/val_capability_test.cpp similarity index 99% rename from test/val/Validate.Capability.cpp rename to test/val/val_capability_test.cpp index 494a553..9e13950 100644 --- a/test/val/Validate.Capability.cpp +++ b/test/val/val_capability_test.cpp @@ -14,17 +14,18 @@ // Validation tests for Logical Layout -#include -#include "test_fixture.h" -#include "unit_spirv.h" -#include "ValidateFixtures.h" -#include "source/assembly_grammar.h" - #include #include #include #include +#include + +#include "source/assembly_grammar.h" +#include "test_fixture.h" +#include "unit_spirv.h" +#include "val_fixtures.h" + namespace { using spvtest::ScopedContext; diff --git a/test/val/Validate.CFG.cpp b/test/val/val_cfg_test.cpp similarity index 99% rename from test/val/Validate.CFG.cpp rename to test/val/val_cfg_test.cpp index d0461e3..eb30827 100644 --- a/test/val/Validate.CFG.cpp +++ b/test/val/val_cfg_test.cpp @@ -27,7 +27,7 @@ #include "test_fixture.h" #include "unit_spirv.h" -#include "ValidateFixtures.h" +#include "val_fixtures.h" #include "source/diagnostic.h" #include "source/validate.h" diff --git a/test/val/Validate.Data.cpp b/test/val/val_data_test.cpp similarity index 99% rename from test/val/Validate.Data.cpp rename to test/val/val_data_test.cpp index bd19171..b3bfb94 100644 --- a/test/val/Validate.Data.cpp +++ b/test/val/val_data_test.cpp @@ -14,14 +14,14 @@ // Validation tests for Data Rules. -#include "unit_spirv.h" -#include "ValidateFixtures.h" -#include "gmock/gmock.h" - #include #include #include +#include "gmock/gmock.h" +#include "unit_spirv.h" +#include "val_fixtures.h" + using ::testing::HasSubstr; using ::testing::MatchesRegex; diff --git a/test/val/ValidateFixtures.cpp b/test/val/val_fixtures.cpp similarity index 98% rename from test/val/ValidateFixtures.cpp rename to test/val/val_fixtures.cpp index e10a6a6..3845b30 100644 --- a/test/val/ValidateFixtures.cpp +++ b/test/val/val_fixtures.cpp @@ -14,7 +14,7 @@ // Common validation fixtures for unit tests -#include "ValidateFixtures.h" +#include "val_fixtures.h" #include #include diff --git a/test/val/ValidateFixtures.h b/test/val/val_fixtures.h similarity index 100% rename from test/val/ValidateFixtures.h rename to test/val/val_fixtures.h diff --git a/test/val/ValidateID.cpp b/test/val/val_id_test.cpp similarity index 100% rename from test/val/ValidateID.cpp rename to test/val/val_id_test.cpp diff --git a/test/val/Validate.Layout.cpp b/test/val/val_layout_test.cpp similarity index 99% rename from test/val/Validate.Layout.cpp rename to test/val/val_layout_test.cpp index 6d5c817..7f92cdb 100644 --- a/test/val/Validate.Layout.cpp +++ b/test/val/val_layout_test.cpp @@ -21,9 +21,9 @@ #include "gmock/gmock.h" -#include "unit_spirv.h" -#include "ValidateFixtures.h" #include "source/diagnostic.h" +#include "unit_spirv.h" +#include "val_fixtures.h" using std::function; using std::ostream; diff --git a/test/val/Validate.SSA.cpp b/test/val/val_ssa_test.cpp similarity index 99% rename from test/val/Validate.SSA.cpp rename to test/val/val_ssa_test.cpp index 2386b15..e954cbf 100644 --- a/test/val/Validate.SSA.cpp +++ b/test/val/val_ssa_test.cpp @@ -14,14 +14,14 @@ // Validation tests for SSA -#include "unit_spirv.h" -#include "ValidateFixtures.h" -#include "gmock/gmock.h" - #include #include #include +#include "gmock/gmock.h" +#include "unit_spirv.h" +#include "val_fixtures.h" + using ::testing::HasSubstr; using ::testing::MatchesRegex; diff --git a/test/val/ValidationState.cpp b/test/val/val_state_test.cpp similarity index 99% rename from test/val/ValidationState.cpp rename to test/val/val_state_test.cpp index 23df7cc..d6635e0 100644 --- a/test/val/ValidationState.cpp +++ b/test/val/val_state_test.cpp @@ -15,8 +15,6 @@ // Unit tests for ValidationState_t. -#include "val/ValidationState.h" - #include #include "gtest/gtest.h" @@ -25,6 +23,7 @@ #include "enum_set.h" #include "val/Construct.h" #include "val/Function.h" +#include "val/ValidationState.h" #include "validate.h" namespace { diff --git a/test/val/Validate.Storage.cpp b/test/val/val_storage_test.cpp similarity index 99% rename from test/val/Validate.Storage.cpp rename to test/val/val_storage_test.cpp index 7954eb2..653429f 100644 --- a/test/val/Validate.Storage.cpp +++ b/test/val/val_storage_test.cpp @@ -18,8 +18,8 @@ #include #include -#include "ValidateFixtures.h" #include "gmock/gmock.h" +#include "val_fixtures.h" using ValidateStorage = spvtest::ValidateBase; -- 2.7.4