]> git.saurik.com Git - apt.git/blame - test/libapt/gtest_runner.cc
use filesize of compressed pdiffs for the limit if possible
[apt.git] / test / libapt / gtest_runner.cc
CommitLineData
f00832cc 1#include <gtest/gtest.h>
011188e3 2
f00832cc 3#include <apt-pkg/error.h>
011188e3 4
f00832cc
DK
5int main(int argc, char **argv) {
6 ::testing::InitGoogleTest(&argc, argv);
7 int result = RUN_ALL_TESTS();
8 if (_error->empty() == false)
9 {
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
14 if (result == 0)
15 {
16 std::cerr << "All tests successful, but messages were generated, so still a failure!" << std::endl;
17 return 29;
18 }
19 }
20 return result;
21}