summaryrefslogtreecommitdiff
path: root/graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/test/gmock_test_utils.py
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2024-11-13 03:03:42 +0000
committerNorbert Preining <norbert@preining.info>2024-11-13 03:03:42 +0000
commit5037cc8f66c1c2dfc56accf0f29866977fce1f11 (patch)
tree916c5b917a84c268d98a6176a93f0a4c3e63a102 /graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/test/gmock_test_utils.py
parentd63a87aba38d505e5b1322a0fd3b93549e7cb203 (diff)
CTAN sync 202411130303HEADmaster
Diffstat (limited to 'graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/test/gmock_test_utils.py')
-rwxr-xr-xgraphics/asymptote/LspCpp/third_party/uri/deps/googlemock/test/gmock_test_utils.py96
1 files changed, 0 insertions, 96 deletions
diff --git a/graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/test/gmock_test_utils.py b/graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/test/gmock_test_utils.py
deleted file mode 100755
index d7bc0974a7..0000000000
--- a/graphics/asymptote/LspCpp/third_party/uri/deps/googlemock/test/gmock_test_utils.py
+++ /dev/null
@@ -1,96 +0,0 @@
-# Copyright 2006, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-"""Unit test utilities for Google C++ Mocking Framework."""
-
-import os
-
-# pylint: disable=C6204
-from googletest.test import gtest_test_utils
-
-
-def GetSourceDir():
- """Returns the absolute path of the directory where the .py files are."""
-
- return gtest_test_utils.GetSourceDir()
-
-
-def 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.
- """
-
- return gtest_test_utils.GetTestExecutablePath(executable_name)
-
-
-def 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).
- """
-
- if os.name == 'nt':
- # On Windows, os.WEXITSTATUS() doesn't work and os.system() returns
- # the argument to exit() directly.
- return exit_code
- else:
- # On Unix, os.WEXITSTATUS() must be used to extract the exit status
- # from the result of os.system().
- if os.WIFEXITED(exit_code):
- return os.WEXITSTATUS(exit_code)
- else:
- return -1
-
-
-# Suppresses the "Invalid const name" lint complaint
-# pylint: disable-msg=C6409
-
-# Exposes utilities from gtest_test_utils.
-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
-
-# pylint: enable-msg=C6409
-
-
-def Main():
- """Runs the unit test."""
-
- gtest_test_utils.Main()