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