]>
git.saurik.com Git - apt.git/blob - test/libapt/gtest_runner.cc
1 #include <gtest/gtest.h>
2 #include <apt-pkg/error.h>
3 int main(int argc
, char **argv
) {
4 ::testing::InitGoogleTest(&argc
, argv
);
5 int result
= RUN_ALL_TESTS();
6 if (_error
->empty() == false)
8 std::cerr
<< "The test generated the following global messages:" << std::endl
;
9 _error
->DumpErrors(std::cerr
);
10 // messages on the stack can't be right, error out
11 // even if we have no idea where this message came from
14 std::cerr
<< "All tests successful, but messages were generated, so still a failure!" << std::endl
;