diff options
author | Alex Deymo <deymo@chromium.org> | 2015-04-08 14:10:30 -0700 |
---|---|---|
committer | Alex Deymo <deymo@google.com> | 2015-09-23 10:06:36 -0700 |
commit | a5cff2283b9bc60da9f4e74ba07a2119f5616653 (patch) | |
tree | ad884837d726ea223b081ac7270b304f9f09646a /testrunner.cc | |
parent | 68b49a819183f290b56fb9bb6c79c4ec86d7ad09 (diff) | |
download | bsdiff-a5cff2283b9bc60da9f4e74ba07a2119f5616653.tar.gz |
Add gtest unittest framework.
bsdiff and bspatch are in C and had no unittest. This patch keeps
those programs as C code, but adds the C++ gtest unittest framework
to allow testing them. Two simple unittests added to validate that the
unittests work.
BUG=None
TEST=make test; ./unittests
Change-Id: I8bca6b0c6bc5d5880464183d50a602c9886d20d0
Diffstat (limited to 'testrunner.cc')
-rw-r--r-- | testrunner.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/testrunner.cc b/testrunner.cc new file mode 100644 index 0000000..40710fd --- /dev/null +++ b/testrunner.cc @@ -0,0 +1,10 @@ +// Copyright 2015 The Chromium OS Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include <gtest/gtest.h> + +int main(int argc, char **argv) { + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} |