proxygen
gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest Class Reference
Inheritance diagram for gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest:

Public Member Functions

def RunAndVerify (self, env_var_value, flag_value, expect_seg_fault)
 
def testDefaultBehavior (self)
 
def testEnvVar (self)
 
def testFlag (self)
 
def testFlagOverridesEnvVar (self)
 
def testBreakOnFailureOverridesThrowOnFailure (self)
 
def testCatchExceptionsDoesNotInterfere (self)
 
def RunAndVerify (self, env_var_value, flag_value, expect_seg_fault)
 
def testDefaultBehavior (self)
 
def testEnvVar (self)
 
def testFlag (self)
 
def testFlagOverridesEnvVar (self)
 
def testBreakOnFailureOverridesThrowOnFailure (self)
 
def testCatchExceptionsDoesNotInterfere (self)
 
def RunAndVerify (self, env_var_value, flag_value, expect_seg_fault)
 
def testDefaultBehavior (self)
 
def testEnvVar (self)
 
def testFlag (self)
 
def testFlagOverridesEnvVar (self)
 
def testBreakOnFailureOverridesThrowOnFailure (self)
 
def testCatchExceptionsDoesNotInterfere (self)
 

Detailed Description

Tests using the GTEST_BREAK_ON_FAILURE environment variable or
the --gtest_break_on_failure flag to turn assertion failures into
segmentation faults.

Definition at line 93 of file gtest_break_on_failure_unittest.py.

Member Function Documentation

def gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.RunAndVerify (   self,
  env_var_value,
  flag_value,
  expect_seg_fault 
)
Runs gtest_break_on_failure_unittest_ and verifies that it does
(or does not) have a seg-fault.

Args:
  env_var_value:    value of the GTEST_BREAK_ON_FAILURE environment
                variable; None if the variable should be unset.
  flag_value:       value of the --gtest_break_on_failure flag;
                None if the flag should not be present.
  expect_seg_fault: 1 if the program is expected to generate a seg-fault;
                0 otherwise.

Definition at line 99 of file gtest_break_on_failure_unittest.py.

References join, gtest_break_on_failure_unittest.Run(), and gtest_break_on_failure_unittest.SetEnvVar.

Referenced by gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.RunAndVerify(), gtest_filter_unittest.GTestFilterUnitTest.testBadFilter(), gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.testBreakOnFailureOverridesThrowOnFailure(), gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.testCatchExceptionsDoesNotInterfere(), gtest_throw_on_failure_test.ThrowOnFailureTest.testDefaultBehavior(), gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.testDefaultBehavior(), gtest_list_tests_unittest.GTestListTestsUnitTest.testDefaultBehavior(), gtest_filter_unittest.GTestFilterUnitTest.testDefaultBehavior(), gtest_filter_unittest.GTestFilterUnitTest.testEmptyFilter(), gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.testEnvVar(), gtest_filter_unittest.GTestFilterUnitTest.testFilterByTest(), gtest_filter_unittest.GTestFilterUnitTest.testFilterByTestCase(), gtest_filter_unittest.GTestFilterUnitTest.testFilterDisabledTests(), gtest_filter_unittest.GTestFilterUnitTest.testFilterWithoutDot(), gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.testFlag(), gtest_list_tests_unittest.GTestListTestsUnitTest.testFlag(), gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.testFlagOverridesEnvVar(), gtest_filter_unittest.GTestFilterUnitTest.testFullName(), gtest_filter_unittest.GTestFilterUnitTest.testNegativeFilters(), gtest_list_tests_unittest.GTestListTestsUnitTest.testOverrideNonFilterFlags(), gtest_filter_unittest.GTestFilterUnitTest.testThreePatterns(), gtest_throw_on_failure_test.ThrowOnFailureTest.testThrowOnFailureEnvVar(), gtest_throw_on_failure_test.ThrowOnFailureTest.testThrowOnFailureFlag(), gtest_throw_on_failure_test.ThrowOnFailureTest.testThrowOnFailureFlagOverridesEnvVar(), gtest_filter_unittest.GTestFilterUnitTest.testTwoPatterns(), gtest_filter_unittest.GTestFilterUnitTest.testUniversalFilters(), gtest_filter_unittest.GTestFilterUnitTest.testWildcardInTestCaseName(), gtest_filter_unittest.GTestFilterUnitTest.testWildcardInTestName(), and gtest_list_tests_unittest.GTestListTestsUnitTest.testWithFilterFlags().

99  def RunAndVerify(self, env_var_value, flag_value, expect_seg_fault):
100  """Runs gtest_break_on_failure_unittest_ and verifies that it does
101  (or does not) have a seg-fault.
102 
103  Args:
104  env_var_value: value of the GTEST_BREAK_ON_FAILURE environment
105  variable; None if the variable should be unset.
106  flag_value: value of the --gtest_break_on_failure flag;
107  None if the flag should not be present.
108  expect_seg_fault: 1 if the program is expected to generate a seg-fault;
109  0 otherwise.
110  """
111 
112  SetEnvVar(BREAK_ON_FAILURE_ENV_VAR, env_var_value)
113 
114  if env_var_value is None:
115  env_var_value_msg = ' is not set'
116  else:
117  env_var_value_msg = '=' + env_var_value
118 
119  if flag_value is None:
120  flag = ''
121  elif flag_value == '0':
122  flag = '--%s=0' % BREAK_ON_FAILURE_FLAG
123  else:
124  flag = '--%s' % BREAK_ON_FAILURE_FLAG
125 
126  command = [EXE_PATH]
127  if flag:
128  command.append(flag)
129 
130  if expect_seg_fault:
131  should_or_not = 'should'
132  else:
133  should_or_not = 'should not'
134 
135  has_seg_fault = Run(command)
136 
137  SetEnvVar(BREAK_ON_FAILURE_ENV_VAR, None)
138 
139  msg = ('when %s%s, an assertion failure in "%s" %s cause a seg-fault.' %
140  (BREAK_ON_FAILURE_ENV_VAR, env_var_value_msg, ' '.join(command),
141  should_or_not))
142  self.assert_(has_seg_fault == expect_seg_fault, msg)
143 
def RunAndVerify(self, env_var_value, flag_value, expect_seg_fault)
#define join
def gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.RunAndVerify (   self,
  env_var_value,
  flag_value,
  expect_seg_fault 
)
Runs gtest_break_on_failure_unittest_ and verifies that it does
(or does not) have a seg-fault.

Args:
  env_var_value:    value of the GTEST_BREAK_ON_FAILURE environment
                variable; None if the variable should be unset.
  flag_value:       value of the --gtest_break_on_failure flag;
                None if the flag should not be present.
  expect_seg_fault: 1 if the program is expected to generate a seg-fault;
                0 otherwise.

Definition at line 99 of file gtest_break_on_failure_unittest.py.

References join, gtest_break_on_failure_unittest.Run(), gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.RunAndVerify(), and gtest_break_on_failure_unittest.SetEnvVar.

99  def RunAndVerify(self, env_var_value, flag_value, expect_seg_fault):
100  """Runs gtest_break_on_failure_unittest_ and verifies that it does
101  (or does not) have a seg-fault.
102 
103  Args:
104  env_var_value: value of the GTEST_BREAK_ON_FAILURE environment
105  variable; None if the variable should be unset.
106  flag_value: value of the --gtest_break_on_failure flag;
107  None if the flag should not be present.
108  expect_seg_fault: 1 if the program is expected to generate a seg-fault;
109  0 otherwise.
110  """
111 
112  SetEnvVar(BREAK_ON_FAILURE_ENV_VAR, env_var_value)
113 
114  if env_var_value is None:
115  env_var_value_msg = ' is not set'
116  else:
117  env_var_value_msg = '=' + env_var_value
118 
119  if flag_value is None:
120  flag = ''
121  elif flag_value == '0':
122  flag = '--%s=0' % BREAK_ON_FAILURE_FLAG
123  else:
124  flag = '--%s' % BREAK_ON_FAILURE_FLAG
125 
126  command = [EXE_PATH]
127  if flag:
128  command.append(flag)
129 
130  if expect_seg_fault:
131  should_or_not = 'should'
132  else:
133  should_or_not = 'should not'
134 
135  has_seg_fault = Run(command)
136 
137  SetEnvVar(BREAK_ON_FAILURE_ENV_VAR, None)
138 
139  msg = ('when %s%s, an assertion failure in "%s" %s cause a seg-fault.' %
140  (BREAK_ON_FAILURE_ENV_VAR, env_var_value_msg, ' '.join(command),
141  should_or_not))
142  self.assert_(has_seg_fault == expect_seg_fault, msg)
143 
def RunAndVerify(self, env_var_value, flag_value, expect_seg_fault)
#define join
def gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.RunAndVerify (   self,
  env_var_value,
  flag_value,
  expect_seg_fault 
)
Runs gtest_break_on_failure_unittest_ and verifies that it does
(or does not) have a seg-fault.

Args:
  env_var_value:    value of the GTEST_BREAK_ON_FAILURE environment
                variable; None if the variable should be unset.
  flag_value:       value of the --gtest_break_on_failure flag;
                None if the flag should not be present.
  expect_seg_fault: 1 if the program is expected to generate a seg-fault;
                0 otherwise.

Definition at line 99 of file gtest_break_on_failure_unittest.py.

References join, gtest_break_on_failure_unittest.Run(), gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.RunAndVerify(), and gtest_break_on_failure_unittest.SetEnvVar.

99  def RunAndVerify(self, env_var_value, flag_value, expect_seg_fault):
100  """Runs gtest_break_on_failure_unittest_ and verifies that it does
101  (or does not) have a seg-fault.
102 
103  Args:
104  env_var_value: value of the GTEST_BREAK_ON_FAILURE environment
105  variable; None if the variable should be unset.
106  flag_value: value of the --gtest_break_on_failure flag;
107  None if the flag should not be present.
108  expect_seg_fault: 1 if the program is expected to generate a seg-fault;
109  0 otherwise.
110  """
111 
112  SetEnvVar(BREAK_ON_FAILURE_ENV_VAR, env_var_value)
113 
114  if env_var_value is None:
115  env_var_value_msg = ' is not set'
116  else:
117  env_var_value_msg = '=' + env_var_value
118 
119  if flag_value is None:
120  flag = ''
121  elif flag_value == '0':
122  flag = '--%s=0' % BREAK_ON_FAILURE_FLAG
123  else:
124  flag = '--%s' % BREAK_ON_FAILURE_FLAG
125 
126  command = [EXE_PATH]
127  if flag:
128  command.append(flag)
129 
130  if expect_seg_fault:
131  should_or_not = 'should'
132  else:
133  should_or_not = 'should not'
134 
135  has_seg_fault = Run(command)
136 
137  SetEnvVar(BREAK_ON_FAILURE_ENV_VAR, None)
138 
139  msg = ('when %s%s, an assertion failure in "%s" %s cause a seg-fault.' %
140  (BREAK_ON_FAILURE_ENV_VAR, env_var_value_msg, ' '.join(command),
141  should_or_not))
142  self.assert_(has_seg_fault == expect_seg_fault, msg)
143 
def RunAndVerify(self, env_var_value, flag_value, expect_seg_fault)
#define join
def gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.testBreakOnFailureOverridesThrowOnFailure (   self)
Tests that gtest_break_on_failure overrides gtest_throw_on_failure.

Definition at line 187 of file gtest_break_on_failure_unittest.py.

References gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.RunAndVerify(), gtest_break_on_failure_unittest.SetEnvVar, and gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.testBreakOnFailureOverridesThrowOnFailure().

188  """Tests that gtest_break_on_failure overrides gtest_throw_on_failure."""
189 
190  SetEnvVar(THROW_ON_FAILURE_ENV_VAR, '1')
191  try:
192  self.RunAndVerify(env_var_value=None,
193  flag_value='1',
194  expect_seg_fault=1)
195  finally:
196  SetEnvVar(THROW_ON_FAILURE_ENV_VAR, None)
197 
def RunAndVerify(self, env_var_value, flag_value, expect_seg_fault)
def gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.testBreakOnFailureOverridesThrowOnFailure (   self)
Tests that gtest_break_on_failure overrides gtest_throw_on_failure.

Definition at line 187 of file gtest_break_on_failure_unittest.py.

References gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.RunAndVerify(), gtest_break_on_failure_unittest.SetEnvVar, and gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.testBreakOnFailureOverridesThrowOnFailure().

188  """Tests that gtest_break_on_failure overrides gtest_throw_on_failure."""
189 
190  SetEnvVar(THROW_ON_FAILURE_ENV_VAR, '1')
191  try:
192  self.RunAndVerify(env_var_value=None,
193  flag_value='1',
194  expect_seg_fault=1)
195  finally:
196  SetEnvVar(THROW_ON_FAILURE_ENV_VAR, None)
197 
def RunAndVerify(self, env_var_value, flag_value, expect_seg_fault)
def gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.testBreakOnFailureOverridesThrowOnFailure (   self)
Tests that gtest_break_on_failure overrides gtest_throw_on_failure.

Definition at line 187 of file gtest_break_on_failure_unittest.py.

References gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.RunAndVerify(), and gtest_break_on_failure_unittest.SetEnvVar.

Referenced by gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.testBreakOnFailureOverridesThrowOnFailure().

188  """Tests that gtest_break_on_failure overrides gtest_throw_on_failure."""
189 
190  SetEnvVar(THROW_ON_FAILURE_ENV_VAR, '1')
191  try:
192  self.RunAndVerify(env_var_value=None,
193  flag_value='1',
194  expect_seg_fault=1)
195  finally:
196  SetEnvVar(THROW_ON_FAILURE_ENV_VAR, None)
197 
def RunAndVerify(self, env_var_value, flag_value, expect_seg_fault)
def gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.testCatchExceptionsDoesNotInterfere (   self)
Tests that gtest_catch_exceptions doesn't interfere.

Definition at line 199 of file gtest_break_on_failure_unittest.py.

References gtest_test_utils.Main(), gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.RunAndVerify(), gtest_break_on_failure_unittest.SetEnvVar, and gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.testCatchExceptionsDoesNotInterfere().

200  """Tests that gtest_catch_exceptions doesn't interfere."""
201 
202  SetEnvVar(CATCH_EXCEPTIONS_ENV_VAR, '1')
203  try:
204  self.RunAndVerify(env_var_value='1',
205  flag_value='1',
206  expect_seg_fault=1)
207  finally:
208  SetEnvVar(CATCH_EXCEPTIONS_ENV_VAR, None)
209 
210 
def RunAndVerify(self, env_var_value, flag_value, expect_seg_fault)
def gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.testCatchExceptionsDoesNotInterfere (   self)
Tests that gtest_catch_exceptions doesn't interfere.

Definition at line 199 of file gtest_break_on_failure_unittest.py.

References gtest_test_utils.Main(), gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.RunAndVerify(), gtest_break_on_failure_unittest.SetEnvVar, and gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.testCatchExceptionsDoesNotInterfere().

200  """Tests that gtest_catch_exceptions doesn't interfere."""
201 
202  SetEnvVar(CATCH_EXCEPTIONS_ENV_VAR, '1')
203  try:
204  self.RunAndVerify(env_var_value='1',
205  flag_value='1',
206  expect_seg_fault=1)
207  finally:
208  SetEnvVar(CATCH_EXCEPTIONS_ENV_VAR, None)
209 
210 
def RunAndVerify(self, env_var_value, flag_value, expect_seg_fault)
def gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.testCatchExceptionsDoesNotInterfere (   self)
Tests that gtest_catch_exceptions doesn't interfere.

Definition at line 199 of file gtest_break_on_failure_unittest.py.

References gtest_test_utils.Main(), gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.RunAndVerify(), and gtest_break_on_failure_unittest.SetEnvVar.

Referenced by gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.testCatchExceptionsDoesNotInterfere().

200  """Tests that gtest_catch_exceptions doesn't interfere."""
201 
202  SetEnvVar(CATCH_EXCEPTIONS_ENV_VAR, '1')
203  try:
204  self.RunAndVerify(env_var_value='1',
205  flag_value='1',
206  expect_seg_fault=1)
207  finally:
208  SetEnvVar(CATCH_EXCEPTIONS_ENV_VAR, None)
209 
210 
def RunAndVerify(self, env_var_value, flag_value, expect_seg_fault)
def gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.testDefaultBehavior (   self)
Tests the behavior of the default mode.

Definition at line 144 of file gtest_break_on_failure_unittest.py.

References gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.RunAndVerify().

Referenced by gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.testDefaultBehavior().

145  """Tests the behavior of the default mode."""
146 
147  self.RunAndVerify(env_var_value=None,
148  flag_value=None,
149  expect_seg_fault=0)
150 
def RunAndVerify(self, env_var_value, flag_value, expect_seg_fault)
def gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.testDefaultBehavior (   self)
Tests the behavior of the default mode.

Definition at line 144 of file gtest_break_on_failure_unittest.py.

References gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.RunAndVerify(), and gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.testDefaultBehavior().

145  """Tests the behavior of the default mode."""
146 
147  self.RunAndVerify(env_var_value=None,
148  flag_value=None,
149  expect_seg_fault=0)
150 
def RunAndVerify(self, env_var_value, flag_value, expect_seg_fault)
def gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.testDefaultBehavior (   self)
Tests the behavior of the default mode.

Definition at line 144 of file gtest_break_on_failure_unittest.py.

References gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.RunAndVerify(), and gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.testDefaultBehavior().

145  """Tests the behavior of the default mode."""
146 
147  self.RunAndVerify(env_var_value=None,
148  flag_value=None,
149  expect_seg_fault=0)
150 
def RunAndVerify(self, env_var_value, flag_value, expect_seg_fault)
def gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.testEnvVar (   self)
Tests using the GTEST_BREAK_ON_FAILURE environment variable.

Definition at line 151 of file gtest_break_on_failure_unittest.py.

References gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.RunAndVerify(), and gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.testEnvVar().

151  def testEnvVar(self):
152  """Tests using the GTEST_BREAK_ON_FAILURE environment variable."""
153 
154  self.RunAndVerify(env_var_value='0',
155  flag_value=None,
156  expect_seg_fault=0)
157  self.RunAndVerify(env_var_value='1',
158  flag_value=None,
159  expect_seg_fault=1)
160 
def RunAndVerify(self, env_var_value, flag_value, expect_seg_fault)
def gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.testEnvVar (   self)
Tests using the GTEST_BREAK_ON_FAILURE environment variable.

Definition at line 151 of file gtest_break_on_failure_unittest.py.

References gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.RunAndVerify().

Referenced by gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.testEnvVar().

151  def testEnvVar(self):
152  """Tests using the GTEST_BREAK_ON_FAILURE environment variable."""
153 
154  self.RunAndVerify(env_var_value='0',
155  flag_value=None,
156  expect_seg_fault=0)
157  self.RunAndVerify(env_var_value='1',
158  flag_value=None,
159  expect_seg_fault=1)
160 
def RunAndVerify(self, env_var_value, flag_value, expect_seg_fault)
def gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.testEnvVar (   self)
Tests using the GTEST_BREAK_ON_FAILURE environment variable.

Definition at line 151 of file gtest_break_on_failure_unittest.py.

References gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.RunAndVerify(), and gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.testEnvVar().

151  def testEnvVar(self):
152  """Tests using the GTEST_BREAK_ON_FAILURE environment variable."""
153 
154  self.RunAndVerify(env_var_value='0',
155  flag_value=None,
156  expect_seg_fault=0)
157  self.RunAndVerify(env_var_value='1',
158  flag_value=None,
159  expect_seg_fault=1)
160 
def RunAndVerify(self, env_var_value, flag_value, expect_seg_fault)
def gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.testFlag (   self)
Tests using the --gtest_break_on_failure flag.

Definition at line 161 of file gtest_break_on_failure_unittest.py.

References gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.RunAndVerify().

Referenced by gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.testFlag().

161  def testFlag(self):
162  """Tests using the --gtest_break_on_failure flag."""
163 
164  self.RunAndVerify(env_var_value=None,
165  flag_value='0',
166  expect_seg_fault=0)
167  self.RunAndVerify(env_var_value=None,
168  flag_value='1',
169  expect_seg_fault=1)
170 
def RunAndVerify(self, env_var_value, flag_value, expect_seg_fault)
def gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.testFlag (   self)
Tests using the --gtest_break_on_failure flag.

Definition at line 161 of file gtest_break_on_failure_unittest.py.

References gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.RunAndVerify(), and gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.testFlag().

161  def testFlag(self):
162  """Tests using the --gtest_break_on_failure flag."""
163 
164  self.RunAndVerify(env_var_value=None,
165  flag_value='0',
166  expect_seg_fault=0)
167  self.RunAndVerify(env_var_value=None,
168  flag_value='1',
169  expect_seg_fault=1)
170 
def RunAndVerify(self, env_var_value, flag_value, expect_seg_fault)
def gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.testFlag (   self)
Tests using the --gtest_break_on_failure flag.

Definition at line 161 of file gtest_break_on_failure_unittest.py.

References gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.RunAndVerify(), and gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.testFlag().

161  def testFlag(self):
162  """Tests using the --gtest_break_on_failure flag."""
163 
164  self.RunAndVerify(env_var_value=None,
165  flag_value='0',
166  expect_seg_fault=0)
167  self.RunAndVerify(env_var_value=None,
168  flag_value='1',
169  expect_seg_fault=1)
170 
def RunAndVerify(self, env_var_value, flag_value, expect_seg_fault)
def gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.testFlagOverridesEnvVar (   self)
Tests that the flag overrides the environment variable.

Definition at line 171 of file gtest_break_on_failure_unittest.py.

References gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.RunAndVerify(), and gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.testFlagOverridesEnvVar().

172  """Tests that the flag overrides the environment variable."""
173 
174  self.RunAndVerify(env_var_value='0',
175  flag_value='0',
176  expect_seg_fault=0)
177  self.RunAndVerify(env_var_value='0',
178  flag_value='1',
179  expect_seg_fault=1)
180  self.RunAndVerify(env_var_value='1',
181  flag_value='0',
182  expect_seg_fault=0)
183  self.RunAndVerify(env_var_value='1',
184  flag_value='1',
185  expect_seg_fault=1)
186 
def RunAndVerify(self, env_var_value, flag_value, expect_seg_fault)
def gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.testFlagOverridesEnvVar (   self)
Tests that the flag overrides the environment variable.

Definition at line 171 of file gtest_break_on_failure_unittest.py.

References gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.RunAndVerify().

Referenced by gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.testFlagOverridesEnvVar().

172  """Tests that the flag overrides the environment variable."""
173 
174  self.RunAndVerify(env_var_value='0',
175  flag_value='0',
176  expect_seg_fault=0)
177  self.RunAndVerify(env_var_value='0',
178  flag_value='1',
179  expect_seg_fault=1)
180  self.RunAndVerify(env_var_value='1',
181  flag_value='0',
182  expect_seg_fault=0)
183  self.RunAndVerify(env_var_value='1',
184  flag_value='1',
185  expect_seg_fault=1)
186 
def RunAndVerify(self, env_var_value, flag_value, expect_seg_fault)
def gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.testFlagOverridesEnvVar (   self)
Tests that the flag overrides the environment variable.

Definition at line 171 of file gtest_break_on_failure_unittest.py.

References gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.RunAndVerify(), and gtest_break_on_failure_unittest.GTestBreakOnFailureUnitTest.testFlagOverridesEnvVar().

172  """Tests that the flag overrides the environment variable."""
173 
174  self.RunAndVerify(env_var_value='0',
175  flag_value='0',
176  expect_seg_fault=0)
177  self.RunAndVerify(env_var_value='0',
178  flag_value='1',
179  expect_seg_fault=1)
180  self.RunAndVerify(env_var_value='1',
181  flag_value='0',
182  expect_seg_fault=0)
183  self.RunAndVerify(env_var_value='1',
184  flag_value='1',
185  expect_seg_fault=1)
186 
def RunAndVerify(self, env_var_value, flag_value, expect_seg_fault)

The documentation for this class was generated from the following file: