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

Functions

 GetSourceDir ()
 GetTestExecutablePath (executable_name)
 GetExitStatus (exit_code)
 Main ()

Variables

str __author__ = 'wan@google.com (Zhanyong Wan)'
str SCRIPT_DIR = os.path.dirname(__file__) or '.'
 gtest_tests_util_dir = os.path.join(SCRIPT_DIR, '../gtest/test')
 GTEST_TESTS_UTIL_DIR = gtest_tests_util_dir
 Subprocess = gtest_test_utils.Subprocess
 TestCase = gtest_test_utils.TestCase
 environ = gtest_test_utils.environ
 SetEnvVar = gtest_test_utils.SetEnvVar
 PREMATURE_EXIT_FILE_ENV_VAR = gtest_test_utils.PREMATURE_EXIT_FILE_ENV_VAR

Detailed Description

Unit test utilities for Google C++ Mocking Framework.

Function Documentation

◆ GetExitStatus()

gmock_test_utils.GetExitStatus ( exit_code)
Returns the argument to exit(), or -1 if exit() wasn't called.

Args:
  exit_code: the result value of os.system(command).

◆ GetSourceDir()

gmock_test_utils.GetSourceDir ( )
Returns the absolute path of the directory where the .py files are.

◆ GetTestExecutablePath()

gmock_test_utils.GetTestExecutablePath ( executable_name)
Returns the absolute path of the test binary given its name.

The function will print a message and abort the program if the resulting file
doesn't exist.

Args:
  executable_name: name of the test binary that the test script runs.

Returns:
  The absolute path of the test binary.

◆ Main()

gmock_test_utils.Main ( )
Runs the unit test.

Variable Documentation

◆ __author__

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

◆ environ

gmock_test_utils.environ = gtest_test_utils.environ

◆ GTEST_TESTS_UTIL_DIR

gmock_test_utils.GTEST_TESTS_UTIL_DIR = gtest_tests_util_dir

◆ gtest_tests_util_dir

gmock_test_utils.gtest_tests_util_dir = os.path.join(SCRIPT_DIR, '../gtest/test')

◆ PREMATURE_EXIT_FILE_ENV_VAR

gmock_test_utils.PREMATURE_EXIT_FILE_ENV_VAR = gtest_test_utils.PREMATURE_EXIT_FILE_ENV_VAR

◆ SCRIPT_DIR

str gmock_test_utils.SCRIPT_DIR = os.path.dirname(__file__) or '.'

◆ SetEnvVar

gmock_test_utils.SetEnvVar = gtest_test_utils.SetEnvVar

◆ Subprocess

gmock_test_utils.Subprocess = gtest_test_utils.Subprocess

◆ TestCase

gmock_test_utils.TestCase = gtest_test_utils.TestCase