From cbb904356cec0b90effe46892ae3af2b073af9e4 Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Thu, 29 Sep 2016 15:30:21 +0800 Subject: [PATCH] Remove main function in some unittest. --- paddle/math/tests/test_CpuGpuVector.cpp | 6 ------ paddle/math/tests/test_matrixCompare.cpp | 5 ----- paddle/math/tests/test_perturbation.cpp | 11 ----------- paddle/math/tests/test_sparseMatrixCompare.cpp | 6 ------ paddle/utils/tests/test_StringUtils.cpp | 5 ----- 5 files changed, 33 deletions(-) diff --git a/paddle/math/tests/test_CpuGpuVector.cpp b/paddle/math/tests/test_CpuGpuVector.cpp index 61b424e3c..7b50b020c 100644 --- a/paddle/math/tests/test_CpuGpuVector.cpp +++ b/paddle/math/tests/test_CpuGpuVector.cpp @@ -84,10 +84,4 @@ int main(int argc, char** argv) { return ret; } -#else - -int main(int argc, char const* argv[]) { - return 0; -} - #endif diff --git a/paddle/math/tests/test_matrixCompare.cpp b/paddle/math/tests/test_matrixCompare.cpp index ac50e7b74..fe8eacc2e 100644 --- a/paddle/math/tests/test_matrixCompare.cpp +++ b/paddle/math/tests/test_matrixCompare.cpp @@ -1851,10 +1851,5 @@ int main(int argc, char** argv) { initMain(argc, argv); return RUN_ALL_TESTS(); } -#else - -int main(int argc, char const* argv[]) { - return 0; -} #endif diff --git a/paddle/math/tests/test_perturbation.cpp b/paddle/math/tests/test_perturbation.cpp index 050f2ca9c..4fa9bc720 100644 --- a/paddle/math/tests/test_perturbation.cpp +++ b/paddle/math/tests/test_perturbation.cpp @@ -249,15 +249,4 @@ TEST_F(PerturbationTest, scale_test) { } } -int main(int argc, char** argv) { - testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} - -#else - -int main(int argc, char const* argv[]) { - return 0; -} - #endif diff --git a/paddle/math/tests/test_sparseMatrixCompare.cpp b/paddle/math/tests/test_sparseMatrixCompare.cpp index b3467e498..6048dd811 100644 --- a/paddle/math/tests/test_sparseMatrixCompare.cpp +++ b/paddle/math/tests/test_sparseMatrixCompare.cpp @@ -178,10 +178,4 @@ int main(int argc, char** argv) { return ret; } -#else - -int main(int argc, char const* argv[]) { - return 0; -} - #endif diff --git a/paddle/utils/tests/test_StringUtils.cpp b/paddle/utils/tests/test_StringUtils.cpp index 95290005a..b8636709e 100644 --- a/paddle/utils/tests/test_StringUtils.cpp +++ b/paddle/utils/tests/test_StringUtils.cpp @@ -22,8 +22,3 @@ TEST(StringUtil, to) { ASSERT_DEATH(paddle::str::to("12.45x23"), ".*"); ASSERT_DEATH(paddle::str::to(""), ".*"); } - -int main(int argc, char** argv) { - testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} -- GitLab