From 4efc54554b94e2f927a1c5f70e771351de6983ea Mon Sep 17 00:00:00 2001 From: Hiroyuki Komatsu Date: Fri, 2 Feb 2024 03:30:18 +0000 Subject: [PATCH] Remove ifdef of MOZC_USE_MOZC_TESTING. * Fix the build failures caused by 4bc273d0851c20dc45fc807ce239534bd23b99d1 PiperOrigin-RevId: 603552730 --- src/testing/friend_test.h | 4 ---- src/testing/googletest.cc | 2 -- src/testing/googletest.h | 4 ---- src/testing/googletest_test.cc | 2 -- src/testing/gtest_main.cc | 2 -- 5 files changed, 14 deletions(-) diff --git a/src/testing/friend_test.h b/src/testing/friend_test.h index 6b1ab7535..d449d5c44 100644 --- a/src/testing/friend_test.h +++ b/src/testing/friend_test.h @@ -30,7 +30,6 @@ #ifndef MOZC_TESTING_GUNIT_PROD_H_ #define MOZC_TESTING_GUNIT_PROD_H_ -#ifdef MOZC_USE_MOZC_TESTING // The following macro is originally defined in . // Here we use a private copy instead to avoid dependency on // from production code. @@ -39,8 +38,5 @@ friend class test_case_name##_##test_name##_Test #endif // FRIEND_TEST -#else // MOZC_USE_MOZC_TESTING -#include "testing/production_stub/public/gunit_prod.h" // IWYU pragma: export -#endif // MOZC_USE_MOZC_TESTING #endif // MOZC_TESTING_GUNIT_PROD_H_ diff --git a/src/testing/googletest.cc b/src/testing/googletest.cc index a2e34c521..41ed2c29d 100644 --- a/src/testing/googletest.cc +++ b/src/testing/googletest.cc @@ -27,7 +27,6 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#ifdef MOZC_USE_MOZC_TESTING #include "testing/googletest.h" @@ -72,4 +71,3 @@ void InitTestFlags() { } // namespace mozc -#endif // MOZC_USE_MOZC_TESTING diff --git a/src/testing/googletest.h b/src/testing/googletest.h index 1c3dd4674..1e81202c5 100644 --- a/src/testing/googletest.h +++ b/src/testing/googletest.h @@ -30,7 +30,6 @@ #ifndef MOZC_TESTING_GOOGLETEST_H_ #define MOZC_TESTING_GOOGLETEST_H_ -#ifdef MOZC_USE_MOZC_TESTING #include "absl/flags/declare.h" #include "absl/flags/flag.h" @@ -53,8 +52,5 @@ namespace mozc { void InitTestFlags(); } // namespace mozc -#else // MOZC_USE_MOZC_TESTING -#include "testing/base/public/googletest.h" // IWYU pragma: export -#endif // MOZC_USE_MOZC_TESTING #endif // MOZC_TESTING_GOOGLETEST_H_ diff --git a/src/testing/googletest_test.cc b/src/testing/googletest_test.cc index e4c1f4163..bc3312d0f 100644 --- a/src/testing/googletest_test.cc +++ b/src/testing/googletest_test.cc @@ -28,7 +28,6 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // This test is only relevant when mozc is using its own test main. -#ifdef MOZC_USE_MOZC_TESTING #include "testing/googletest.h" @@ -61,4 +60,3 @@ TEST(GoogleTest, TestFlags) { } // namespace } // namespace mozc -#endif // MOZC_USE_MOZC_TESTING diff --git a/src/testing/gtest_main.cc b/src/testing/gtest_main.cc index 7c04a10cf..ee36ff50d 100644 --- a/src/testing/gtest_main.cc +++ b/src/testing/gtest_main.cc @@ -27,7 +27,6 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#ifdef MOZC_USE_MOZC_TESTING #ifdef _WIN32 #include @@ -64,4 +63,3 @@ int main(int argc, char **argv) { return RUN_ALL_TESTS(); } -#endif // MOZC_USE_MOZC_TESTING