tesseract v5.3.3.20231005
googletest-uninitialized-test Namespace Reference

Classes

class  GTestUninitializedTest
 

Functions

def Assert (condition)
 
def AssertEq (expected, actual)
 
def TestExitCodeAndOutput (command)
 

Variables

 COMMAND = gtest_test_utils.GetTestExecutablePath('googletest-uninitialized-test_')
 

Function Documentation

◆ Assert()

def googletest-uninitialized-test.Assert (   condition)

Definition at line 39 of file googletest-uninitialized-test.py.

39def Assert(condition):
40 if not condition:
41 raise AssertionError
42
43

◆ AssertEq()

def googletest-uninitialized-test.AssertEq (   expected,
  actual 
)

Definition at line 44 of file googletest-uninitialized-test.py.

44def AssertEq(expected, actual):
45 if expected != actual:
46 print('Expected: %s' % (expected,))
47 print(' Actual: %s' % (actual,))
48 raise AssertionError
49
50

◆ TestExitCodeAndOutput()

def googletest-uninitialized-test.TestExitCodeAndOutput (   command)
Runs the given command and verifies its exit code and output.

Definition at line 51 of file googletest-uninitialized-test.py.

51def TestExitCodeAndOutput(command):
52 """Runs the given command and verifies its exit code and output."""
53
54 # Verifies that 'command' exits with code 1.
56 if p.exited and p.exit_code == 0:
57 Assert('IMPORTANT NOTICE' in p.output);
58 Assert('InitGoogleTest' in p.output)
59
60

Variable Documentation

◆ COMMAND

googletest-uninitialized-test.COMMAND = gtest_test_utils.GetTestExecutablePath('googletest-uninitialized-test_')

Definition at line 36 of file googletest-uninitialized-test.py.