Skip to content

Commit 54c37ab

Browse files
authored
Merge pull request #3 from reyoung/mac_port
Remove main function in some unittest.
2 parents 876ab96 + cbb9043 commit 54c37ab

File tree

5 files changed

+0
-33
lines changed

5 files changed

+0
-33
lines changed

paddle/math/tests/test_CpuGpuVector.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,4 @@ int main(int argc, char** argv) {
8484
return ret;
8585
}
8686

87-
#else
88-
89-
int main(int argc, char const* argv[]) {
90-
return 0;
91-
}
92-
9387
#endif

paddle/math/tests/test_matrixCompare.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1851,10 +1851,5 @@ int main(int argc, char** argv) {
18511851
initMain(argc, argv);
18521852
return RUN_ALL_TESTS();
18531853
}
1854-
#else
1855-
1856-
int main(int argc, char const* argv[]) {
1857-
return 0;
1858-
}
18591854

18601855
#endif

paddle/math/tests/test_perturbation.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -249,15 +249,4 @@ TEST_F(PerturbationTest, scale_test) {
249249
}
250250
}
251251

252-
int main(int argc, char** argv) {
253-
testing::InitGoogleTest(&argc, argv);
254-
return RUN_ALL_TESTS();
255-
}
256-
257-
#else
258-
259-
int main(int argc, char const* argv[]) {
260-
return 0;
261-
}
262-
263252
#endif

paddle/math/tests/test_sparseMatrixCompare.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,4 @@ int main(int argc, char** argv) {
178178
return ret;
179179
}
180180

181-
#else
182-
183-
int main(int argc, char const* argv[]) {
184-
return 0;
185-
}
186-
187181
#endif

paddle/utils/tests/test_StringUtils.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,3 @@ TEST(StringUtil, to) {
2222
ASSERT_DEATH(paddle::str::to<double>("12.45x23"), ".*");
2323
ASSERT_DEATH(paddle::str::to<int>(""), ".*");
2424
}
25-
26-
int main(int argc, char** argv) {
27-
testing::InitGoogleTest(&argc, argv);
28-
return RUN_ALL_TESTS();
29-
}

0 commit comments

Comments
 (0)