• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Protocol Buffers - Google's data interchange format
2 // Copyright 2008 Google Inc.  All rights reserved.
3 //
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file or at
6 // https://developers.google.com/open-source/licenses/bsd
7 
8 // Author: kenton@google.com (Kenton Varda)
9 // emulates google3/testing/base/public/googletest.h
10 
11 #ifndef GOOGLE_PROTOBUF_GOOGLETEST_H__
12 #define GOOGLE_PROTOBUF_GOOGLETEST_H__
13 
14 #include <gmock/gmock.h>
15 
16 #include <string>
17 #include <vector>
18 
19 namespace google {
20 namespace protobuf {
21 
22 // When running unittests, get the directory containing the source code.
23 std::string TestSourceDir();
24 
25 // When running unittests, get a directory where temporary files may be
26 // placed.
27 std::string TestTempDir();
28 
29 // Capture all text written to stdout or stderr.
30 void CaptureTestStdout();
31 void CaptureTestStderr();
32 
33 // Stop capturing stdout or stderr and return the text captured.
34 std::string GetCapturedTestStdout();
35 std::string GetCapturedTestStderr();
36 
37 }  // namespace protobuf
38 }  // namespace google
39 
40 #endif  // GOOGLE_PROTOBUF_GOOGLETEST_H__
41