summaryrefslogtreecommitdiff
path: root/deps/v8/testing
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/testing')
-rw-r--r--deps/v8/testing/gtest-support.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/deps/v8/testing/gtest-support.h b/deps/v8/testing/gtest-support.h
index ba0e2f41f9..21c8ebf4d3 100644
--- a/deps/v8/testing/gtest-support.h
+++ b/deps/v8/testing/gtest-support.h
@@ -36,21 +36,20 @@ GET_TYPE_NAME(double)
// |var| while inside the loop body.
#define TRACED_FOREACH(_type, _var, _container) \
for (_type const _var : _container) \
- for (bool _done = false; !_done;) \
+ for (bool _var##_done = false; !_var##_done;) \
for (SCOPED_TRACE(::testing::Message() << #_var << " = " << _var); \
- !_done; _done = true)
-
+ !_var##_done; _var##_done = true)
// TRACED_FORRANGE(type, var, low, high) expands to a loop that assigns |var|
// every value in the range |low| to (including) |high| and adds a
// SCOPED_TRACE() message for the |var| while inside the loop body.
// TODO(bmeurer): Migrate to C++11 once we're ready.
#define TRACED_FORRANGE(_type, _var, _low, _high) \
- for (_type _i = _low; _i <= _high; ++_i) \
- for (bool _done = false; !_done;) \
- for (_type const _var = _i; !_done;) \
+ for (_type _var##_i = _low; _var##_i <= _high; ++_var##_i) \
+ for (bool _var##_done = false; !_var##_done;) \
+ for (_type const _var = _var##_i; !_var##_done;) \
for (SCOPED_TRACE(::testing::Message() << #_var << " = " << _var); \
- !_done; _done = true)
+ !_var##_done; _var##_done = true)
} // namespace internal
} // namespace testing