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

Unified Diff: webrtc/p2p/base/stun_unittest.cc

Issue 1405023016: Convert usage of ARRAY_SIZE to arraysize. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: static_cast<int> Created 5 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 | « webrtc/p2p/base/pseudotcp.cc ('k') | webrtc/p2p/base/transportdescription.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/stun_unittest.cc
diff --git a/webrtc/p2p/base/stun_unittest.cc b/webrtc/p2p/base/stun_unittest.cc
index cd4f7e1cbbddea169bfb3505e80d127206c57f2b..12492570c48f18703c7e1814236687d8e722c600 100644
--- a/webrtc/p2p/base/stun_unittest.cc
+++ b/webrtc/p2p/base/stun_unittest.cc
@@ -11,6 +11,7 @@
#include <string>
#include "webrtc/p2p/base/stun.h"
+#include "webrtc/base/arraysize.h"
#include "webrtc/base/bytebuffer.h"
#include "webrtc/base/gunit.h"
#include "webrtc/base/logging.h"
@@ -515,11 +516,11 @@ TEST_F(StunTest, MessageTypes) {
STUN_BINDING_REQUEST, STUN_BINDING_INDICATION,
STUN_BINDING_RESPONSE, STUN_BINDING_ERROR_RESPONSE
};
- for (int i = 0; i < ARRAY_SIZE(types); ++i) {
- EXPECT_EQ(i == 0, IsStunRequestType(types[i]));
- EXPECT_EQ(i == 1, IsStunIndicationType(types[i]));
- EXPECT_EQ(i == 2, IsStunSuccessResponseType(types[i]));
- EXPECT_EQ(i == 3, IsStunErrorResponseType(types[i]));
+ for (size_t i = 0; i < arraysize(types); ++i) {
+ EXPECT_EQ(i == 0U, IsStunRequestType(types[i]));
+ EXPECT_EQ(i == 1U, IsStunIndicationType(types[i]));
+ EXPECT_EQ(i == 2U, IsStunSuccessResponseType(types[i]));
+ EXPECT_EQ(i == 3U, IsStunErrorResponseType(types[i]));
EXPECT_EQ(1, types[i] & 0xFEEF);
}
}
« no previous file with comments | « webrtc/p2p/base/pseudotcp.cc ('k') | webrtc/p2p/base/transportdescription.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698