Monero
Loading...
Searching...
No Matches
fuse_gmock_files Namespace Reference

Functions

 GetGTestRootDir (gmock_root)
 ValidateGMockRootDir (gmock_root)
 ValidateOutputDir (output_dir)
 FuseGMockH (gmock_root, output_dir)
 FuseGMockAllCcToFile (gmock_root, output_file)
 FuseGMockGTestAllCc (gmock_root, output_dir)
 FuseGMock (gmock_root, output_dir)
 main ()

Variables

str __author__ = 'wan@google.com (Zhanyong Wan)'
 DEFAULT_GMOCK_ROOT_DIR = os.path.join(os.path.dirname(__file__), '..')
 gtest = fuse_gtest_files
 INCLUDE_GMOCK_FILE_REGEX = re.compile(r'^\s*#\s*include\s*"(gmock/.+)"')
str GMOCK_H_SEED = 'include/gmock/gmock.h'
str GMOCK_ALL_CC_SEED = 'src/gmock-all.cc'
str GTEST_H_OUTPUT = 'gtest/gtest.h'
str GMOCK_H_OUTPUT = 'gmock/gmock.h'
str GMOCK_GTEST_ALL_CC_OUTPUT = 'gmock-gtest-all.cc'

Detailed Description

fuse_gmock_files.py v0.1.0
Fuses Google Mock and Google Test source code into two .h files and a .cc file.

SYNOPSIS
       fuse_gmock_files.py [GMOCK_ROOT_DIR] OUTPUT_DIR

       Scans GMOCK_ROOT_DIR for Google Mock and Google Test source
       code, assuming Google Test is in the GMOCK_ROOT_DIR/../googletest
       directory, and generates three files:
       OUTPUT_DIR/gtest/gtest.h, OUTPUT_DIR/gmock/gmock.h, and
       OUTPUT_DIR/gmock-gtest-all.cc.  Then you can build your tests
       by adding OUTPUT_DIR to the include search path and linking
       with OUTPUT_DIR/gmock-gtest-all.cc.  These three files contain
       everything you need to use Google Mock.  Hence you can
       "install" Google Mock by copying them to wherever you want.

       GMOCK_ROOT_DIR can be omitted and defaults to the parent
       directory of the directory holding this script.

EXAMPLES
       ./fuse_gmock_files.py fused_gmock
       ./fuse_gmock_files.py path/to/unpacked/gmock fused_gmock

This tool is experimental.  In particular, it assumes that there is no
conditional inclusion of Google Mock or Google Test headers.  Please
report any problems to googlemock@googlegroups.com.  You can read
http://code.google.com/p/googlemock/wiki/CookBook for more
information.

Function Documentation

◆ FuseGMock()

fuse_gmock_files.FuseGMock ( gmock_root,
output_dir )
Fuses gtest.h, gmock.h, and gmock-gtest-all.h.

◆ FuseGMockAllCcToFile()

fuse_gmock_files.FuseGMockAllCcToFile ( gmock_root,
output_file )
Scans folder gmock_root to fuse gmock-all.cc into output_file.

◆ FuseGMockGTestAllCc()

fuse_gmock_files.FuseGMockGTestAllCc ( gmock_root,
output_dir )
Scans folder gmock_root to generate gmock-gtest-all.cc in output_dir.

◆ FuseGMockH()

fuse_gmock_files.FuseGMockH ( gmock_root,
output_dir )
Scans folder gmock_root to generate gmock/gmock.h in output_dir.

◆ GetGTestRootDir()

fuse_gmock_files.GetGTestRootDir ( gmock_root)
Returns the root directory of Google Test.

◆ main()

fuse_gmock_files.main ( void )

◆ ValidateGMockRootDir()

fuse_gmock_files.ValidateGMockRootDir ( gmock_root)
Makes sure gmock_root points to a valid gmock root directory.

The function aborts the program on failure.

◆ ValidateOutputDir()

fuse_gmock_files.ValidateOutputDir ( output_dir)
Makes sure output_dir points to a valid output directory.

The function aborts the program on failure.

Variable Documentation

◆ __author__

str fuse_gmock_files.__author__ = 'wan@google.com (Zhanyong Wan)'
private

◆ DEFAULT_GMOCK_ROOT_DIR

fuse_gmock_files.DEFAULT_GMOCK_ROOT_DIR = os.path.join(os.path.dirname(__file__), '..')

◆ GMOCK_ALL_CC_SEED

str fuse_gmock_files.GMOCK_ALL_CC_SEED = 'src/gmock-all.cc'

◆ GMOCK_GTEST_ALL_CC_OUTPUT

str fuse_gmock_files.GMOCK_GTEST_ALL_CC_OUTPUT = 'gmock-gtest-all.cc'

◆ GMOCK_H_OUTPUT

str fuse_gmock_files.GMOCK_H_OUTPUT = 'gmock/gmock.h'

◆ GMOCK_H_SEED

str fuse_gmock_files.GMOCK_H_SEED = 'include/gmock/gmock.h'

◆ gtest

fuse_gmock_files.gtest = fuse_gtest_files

◆ GTEST_H_OUTPUT

str fuse_gmock_files.GTEST_H_OUTPUT = 'gtest/gtest.h'

◆ INCLUDE_GMOCK_FILE_REGEX

fuse_gmock_files.INCLUDE_GMOCK_FILE_REGEX = re.compile(r'^\s*#\s*include\s*"(gmock/.+)"')