From c8a686671613439d709524ce309e53071256b79f Mon Sep 17 00:00:00 2001 From: Mike Fleetwood Date: Sun, 20 Jan 2019 10:24:44 +0000 Subject: [PATCH] Remove custom main() from test_PipeCapture (!22) After removing Glib::thread_init() from test_PipeCapture's main() all it does is exactly what the built in Google Test main() does [1][2]. So use that instead like the other unit test programs do. [1] Google Test, Primer, Writing the main() Function https://github.com/google/googletest/blob/master/googletest/docs/primer.md#writing-the-main-function [2] Google Test 1.8.0, gtest_main.cc::main() file: lib/gtest/src/gtest_main.cc https://github.com/google/googletest/blob/release-1.8.0/googletest/src/gtest_main.cc#L34 Closes !22 - Increase minimums to libparted 2.2 and glibmm 2.32 --- tests/Makefile.am | 3 +-- tests/test_PipeCapture.cc | 12 ------------ 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/tests/Makefile.am b/tests/Makefile.am index 0c1cfb61..3b49a5a9 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -34,5 +34,4 @@ test_PasswordRAMStore_LDADD = \ test_PipeCapture_SOURCES = test_PipeCapture.cc test_PipeCapture_LDADD = \ $(top_builddir)/src/PipeCapture.$(OBJEXT) \ - $(GTEST_LIBS) \ - $(top_builddir)/lib/gtest/lib/libgtest.la + $(LDADD) diff --git a/tests/test_PipeCapture.cc b/tests/test_PipeCapture.cc index 886ea7fc..69273f1f 100644 --- a/tests/test_PipeCapture.cc +++ b/tests/test_PipeCapture.cc @@ -411,15 +411,3 @@ TEST_F( PipeCaptureTest, LineDisciplineSkipCtrlAB ) } } // namespace GParted - -// Custom Google Test main(). -// Reference: -// * Google Test, Primer, Writing the main() Function -// https://github.com/google/googletest/blob/master/googletest/docs/primer.md#writing-the-main-function -int main( int argc, char **argv ) -{ - printf("Running main() from %s\n", __FILE__ ); - testing::InitGoogleTest( &argc, argv ); - - return RUN_ALL_TESTS(); -}