Skip to content

Commit

Permalink
Merge pull request #2359 from kuzkry:superfluous-mutable
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 261947085
  • Loading branch information
CJ-Johnson committed Aug 6, 2019
2 parents b4961ab + 637b041 commit 07ec69a
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 487 deletions.
2 changes: 1 addition & 1 deletion googlemock/include/gmock/gmock-spec-builders.h
Original file line number Diff line number Diff line change
Expand Up @@ -1870,7 +1870,7 @@ class MockFunction<R(Args...)> {
}

private:
mutable internal::FunctionMocker<R(Args...)> mock_;
internal::FunctionMocker<R(Args...)> mock_;
};

// The style guide prohibits "using" statements in a namespace scope
Expand Down
2 changes: 1 addition & 1 deletion googlemock/scripts/fuse_gmock_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
This tool is experimental. In particular, it assumes that there is no
conditional inclusion of Google Mock or Google Test headers. Please
report any problems to googlemock@googlegroups.com. You can read
https://github.com/google/googletest/blob/master/googlemock/docs/CookBook.md for more
https://github.com/google/googletest/blob/master/googlemock/docs/cook_book.md for more
information.
"""

Expand Down
303 changes: 0 additions & 303 deletions googlemock/scripts/gmock-config.in

This file was deleted.

2 changes: 1 addition & 1 deletion googlemock/scripts/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ def GetBaseFile(self, filename):
new_content: For text files, this is empty. For binary files, this is
the contents of the new file, since the diff output won't contain
information to reconstruct the current file.
is_binary: True iff the file is binary.
is_binary: True if the file is binary.
status: The status of the file.
"""

Expand Down
24 changes: 10 additions & 14 deletions googletest/scripts/fuse_gtest_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ def ProcessFile(gtest_header_path):
output_file.write(line)

ProcessFile(GTEST_H_SEED)
ProcessFile(GTEST_SPI_H_SEED)
output_file.close()


Expand All @@ -193,20 +194,15 @@ def ProcessFile(gtest_source_file):
for line in open(os.path.join(gtest_root, gtest_source_file), 'r'):
m = INCLUDE_GTEST_FILE_REGEX.match(line)
if m:
if 'include/' + m.group(1) == GTEST_SPI_H_SEED:
# It's '#include "gtest/gtest-spi.h"'. This file is not
# #included by "gtest/gtest.h", so we need to process it.
ProcessFile(GTEST_SPI_H_SEED)
else:
# It's '#include "gtest/foo.h"' where foo is not gtest-spi.
# We treat it as '#include "gtest/gtest.h"', as all other
# gtest headers are being fused into gtest.h and cannot be
# #included directly.

# There is no need to #include "gtest/gtest.h" more than once.
if not GTEST_H_SEED in processed_files:
processed_files.add(GTEST_H_SEED)
output_file.write('#include "%s"\n' % (GTEST_H_OUTPUT,))
# It's '#include "gtest/foo.h"'.
# We treat it as '#include "gtest/gtest.h"', as all other
# gtest headers are being fused into gtest.h and cannot be
# #included directly.

# There is no need to #include "gtest/gtest.h" more than once.
if not GTEST_H_SEED in processed_files:
processed_files.add(GTEST_H_SEED)
output_file.write('#include "%s"\n' % (GTEST_H_OUTPUT,))
else:
m = INCLUDE_SRC_FILE_REGEX.match(line)
if m:
Expand Down
14 changes: 7 additions & 7 deletions googletest/scripts/gen_gtest_pred_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,10 +540,10 @@ class Predicate%(n)sTest : public testing::Test {
}
}
// true iff the test function is expected to run to finish.
// true if the test function is expected to run to finish.
static bool expected_to_finish_;
// true iff the test function did run to finish.
// true if the test function did run to finish.
static bool finished_;
""" % DEFS

Expand Down Expand Up @@ -572,12 +572,12 @@ def GenTest(use_format, use_assert, expect_failure,
"""Returns the test for a predicate assertion macro.
Args:
use_format: true iff the assertion is a *_PRED_FORMAT*.
use_assert: true iff the assertion is a ASSERT_*.
expect_failure: true iff the assertion is expected to fail.
use_functor: true iff the first argument of the assertion is
use_format: true if the assertion is a *_PRED_FORMAT*.
use_assert: true if the assertion is a ASSERT_*.
expect_failure: true if the assertion is expected to fail.
use_functor: true if the first argument of the assertion is
a functor (as opposed to a function)
use_user_type: true iff the predicate functor/function takes
use_user_type: true if the predicate functor/function takes
argument(s) of a user-defined type.
Example:
Expand Down
Loading

0 comments on commit 07ec69a

Please sign in to comment.