aboutsummaryrefslogtreecommitdiffstats
path: root/googletest/test
diff options
context:
space:
mode:
authorKrystian Kuzniarek <krystian.kuzniarek@gmail.com>2019-08-12 07:09:50 +0200
committerKrystian Kuzniarek <krystian.kuzniarek@gmail.com>2019-08-20 12:14:22 +0200
commit7bd4a7f3e9ae46bb7d99fc5fd5dd1a137496bb6a (patch)
tree417695a92848a803682b722f2a6d286e28eeb482 /googletest/test
parentc9ccac7cb7345901884aabf5d1a786cfa6e2f397 (diff)
downloadgoogletest-7bd4a7f3e9ae46bb7d99fc5fd5dd1a137496bb6a.tar.gz
googletest-7bd4a7f3e9ae46bb7d99fc5fd5dd1a137496bb6a.tar.bz2
googletest-7bd4a7f3e9ae46bb7d99fc5fd5dd1a137496bb6a.zip
restore mistakenly removed iffs in their explicit form
Due to confusion arisen from "iff" standing for "if and only if", this commit uses the latter.
Diffstat (limited to 'googletest/test')
-rw-r--r--googletest/test/googletest-death-test-test.cc8
-rwxr-xr-xgoogletest/test/googletest-throw-on-failure-test.py2
-rw-r--r--googletest/test/gtest_environment_test.cc2
-rw-r--r--googletest/test/gtest_pred_impl_unittest.cc20
-rw-r--r--googletest/test/gtest_premature_exit_test.cc4
-rwxr-xr-xgoogletest/test/gtest_test_utils.py6
-rw-r--r--googletest/test/gtest_unittest.cc10
7 files changed, 26 insertions, 26 deletions
diff --git a/googletest/test/googletest-death-test-test.cc b/googletest/test/googletest-death-test-test.cc
index 814d7713..cba906cc 100644
--- a/googletest/test/googletest-death-test-test.cc
+++ b/googletest/test/googletest-death-test-test.cc
@@ -141,7 +141,7 @@ class TestForDeathTest : public testing::Test {
DieInside("MemberFunction");
}
- // True if MemberFunction() should die.
+ // True if and only if MemberFunction() should die.
bool should_die_;
const FilePath original_dir_;
};
@@ -158,7 +158,7 @@ class MayDie {
}
private:
- // True if MemberFunction() should die.
+ // True if and only if MemberFunction() should die.
bool should_die_;
};
@@ -573,8 +573,8 @@ TEST_F(TestForDeathTest, ErrorMessageMismatch) {
}, "died but not with expected error");
}
-// On exit, *aborted will be true if the EXPECT_DEATH() statement
-// aborted the function.
+// On exit, *aborted will be true if and only if the EXPECT_DEATH()
+// statement aborted the function.
void ExpectDeathTestHelper(bool* aborted) {
*aborted = true;
EXPECT_DEATH(DieIf(false), "DieIf"); // This assertion should fail.
diff --git a/googletest/test/googletest-throw-on-failure-test.py b/googletest/test/googletest-throw-on-failure-test.py
index a38cd33f..ea627c47 100755
--- a/googletest/test/googletest-throw-on-failure-test.py
+++ b/googletest/test/googletest-throw-on-failure-test.py
@@ -86,7 +86,7 @@ class ThrowOnFailureTest(gtest_test_utils.TestCase):
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.
- should_fail: True if the program is expected to fail.
+ should_fail: True if and only if the program is expected to fail.
"""
SetEnvVar(THROW_ON_FAILURE, env_var_value)
diff --git a/googletest/test/gtest_environment_test.cc b/googletest/test/gtest_environment_test.cc
index 58908e63..064bfc50 100644
--- a/googletest/test/gtest_environment_test.cc
+++ b/googletest/test/gtest_environment_test.cc
@@ -116,7 +116,7 @@ void Check(bool condition, const char* msg) {
}
}
-// Runs the tests. Return true if successful.
+// Runs the tests. Return true if and only if successful.
//
// The 'failure' parameter specifies the type of failure that should
// be generated by the global set-up.
diff --git a/googletest/test/gtest_pred_impl_unittest.cc b/googletest/test/gtest_pred_impl_unittest.cc
index 4d77896f..1afe5e2d 100644
--- a/googletest/test/gtest_pred_impl_unittest.cc
+++ b/googletest/test/gtest_pred_impl_unittest.cc
@@ -144,10 +144,10 @@ class Predicate1Test : public testing::Test {
}
}
- // true if the test function is expected to run to finish.
+ // true if and only if the test function is expected to run to finish.
static bool expected_to_finish_;
- // true if the test function did run to finish.
+ // true if and only if the test function did run to finish.
static bool finished_;
static int n1_;
@@ -539,10 +539,10 @@ class Predicate2Test : public testing::Test {
}
}
- // true if the test function is expected to run to finish.
+ // true if and only if the test function is expected to run to finish.
static bool expected_to_finish_;
- // true if the test function did run to finish.
+ // true if and only if the test function did run to finish.
static bool finished_;
static int n1_;
@@ -976,10 +976,10 @@ class Predicate3Test : public testing::Test {
}
}
- // true if the test function is expected to run to finish.
+ // true if and only if the test function is expected to run to finish.
static bool expected_to_finish_;
- // true if the test function did run to finish.
+ // true if and only if the test function did run to finish.
static bool finished_;
static int n1_;
@@ -1455,10 +1455,10 @@ class Predicate4Test : public testing::Test {
}
}
- // true if the test function is expected to run to finish.
+ // true if and only if the test function is expected to run to finish.
static bool expected_to_finish_;
- // true if the test function did run to finish.
+ // true if and only if the test function did run to finish.
static bool finished_;
static int n1_;
@@ -1976,10 +1976,10 @@ class Predicate5Test : public testing::Test {
}
}
- // true if the test function is expected to run to finish.
+ // true if and only if the test function is expected to run to finish.
static bool expected_to_finish_;
- // true if the test function did run to finish.
+ // true if and only if the test function did run to finish.
static bool finished_;
static int n1_;
diff --git a/googletest/test/gtest_premature_exit_test.cc b/googletest/test/gtest_premature_exit_test.cc
index 777a8bf8..1d1187ef 100644
--- a/googletest/test/gtest_premature_exit_test.cc
+++ b/googletest/test/gtest_premature_exit_test.cc
@@ -45,7 +45,7 @@ namespace {
class PrematureExitTest : public Test {
public:
- // Returns true if the given file exists.
+ // Returns true if and only if the given file exists.
static bool FileExists(const char* filepath) {
StatStruct stat;
return Stat(filepath, &stat) == 0;
@@ -61,7 +61,7 @@ class PrematureExitTest : public Test {
}
}
- // Returns true if the premature-exit file exists.
+ // Returns true if and only if the premature-exit file exists.
bool PrematureExitFileExists() const {
return FileExists(premature_exit_file_path_);
}
diff --git a/googletest/test/gtest_test_utils.py b/googletest/test/gtest_test_utils.py
index abd56eca..3db665e8 100755
--- a/googletest/test/gtest_test_utils.py
+++ b/googletest/test/gtest_test_utils.py
@@ -215,10 +215,10 @@ class Subprocess:
Returns:
An object that represents outcome of the executed process. It has the
following attributes:
- terminated_by_signal True if the child process has been terminated
- by a signal.
+ terminated_by_signal True if and only if the child process has been
+ terminated by a signal.
signal Sygnal that terminated the child process.
- exited True if the child process exited normally.
+ exited True if and only if the child process exited normally.
exit_code The code with which the child process exited.
output Child process's stdout and stderr output
combined in a string.
diff --git a/googletest/test/gtest_unittest.cc b/googletest/test/gtest_unittest.cc
index 2b00b70a..220ceba3 100644
--- a/googletest/test/gtest_unittest.cc
+++ b/googletest/test/gtest_unittest.cc
@@ -2170,12 +2170,12 @@ static Environment* record_property_env GTEST_ATTRIBUTE_UNUSED_ =
// First, some predicates and predicate-formatters needed by the tests.
-// Returns true if the argument is an even number.
+// Returns true if and only if the argument is an even number.
bool IsEven(int n) {
return (n % 2) == 0;
}
-// A functor that returns true if the argument is an even number.
+// A functor that returns true if and only if the argument is an even number.
struct IsEvenFunctor {
bool operator()(int n) { return IsEven(n); }
};
@@ -2219,13 +2219,13 @@ struct AssertIsEvenFunctor {
}
};
-// Returns true if the sum of the arguments is an even number.
+// Returns true if and only if the sum of the arguments is an even number.
bool SumIsEven2(int n1, int n2) {
return IsEven(n1 + n2);
}
-// A functor that returns true if the sum of the arguments is an even
-// number.
+// A functor that returns true if and only if the sum of the arguments is an
+// even number.
struct SumIsEven3Functor {
bool operator()(int n1, int n2, int n3) {
return IsEven(n1 + n2 + n3);