Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Unified Diff: mojo/public/tests/bindings_connector_unittest.cc

Issue 70273009: Mojo: Add a MOJO_ARRAYSIZE, corresponding to Chromium's arraysize. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/public/system/macros.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/tests/bindings_connector_unittest.cc
diff --git a/mojo/public/tests/bindings_connector_unittest.cc b/mojo/public/tests/bindings_connector_unittest.cc
index 5dc2236709b2bc42ce72eee4da8ae339e19cb5de..71c1a564e26641a279ebbd7ef1c0b5448abea53b 100644
--- a/mojo/public/tests/bindings_connector_unittest.cc
+++ b/mojo/public/tests/bindings_connector_unittest.cc
@@ -132,7 +132,7 @@ TEST_F(BindingsConnectorTest, Basic_TwoMessages) {
const char* kText[] = { "hello", "world" };
- for (size_t i = 0; i < sizeof(kText) / sizeof(kText[0]); ++i) {
+ for (size_t i = 0; i < MOJO_ARRAYSIZE(kText); ++i) {
Message message;
AllocMessage(kText[i], &message);
@@ -144,7 +144,7 @@ TEST_F(BindingsConnectorTest, Basic_TwoMessages) {
PumpMessages();
- for (size_t i = 0; i < sizeof(kText) / sizeof(kText[0]); ++i) {
+ for (size_t i = 0; i < MOJO_ARRAYSIZE(kText); ++i) {
ASSERT_FALSE(accumulator.IsEmpty());
Message message_received;
« no previous file with comments | « mojo/public/system/macros.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698