0

Adding "static_assert" in lieu of "COMPILE_ASSERT" in google_apis module

All our toolchains support c++'s static_assert now- COMPILE_ASSERT can be removed now.

BUG=442514

Review URL: https://codereview.chromium.org/860983003

Cr-Commit-Position: refs/heads/master@{#312436}
This commit is contained in:
anujk.sharma
2015-01-21 12:39:00 -08:00
committed by Commit bot
parent afbf7f097f
commit ceeb4976a5
2 changed files with 4 additions and 4 deletions

@ -36,8 +36,8 @@ const char* kProtoNames[] = {
"mcs_proto.BindAccountResponse",
"mcs_proto.TalkMetadata"
};
COMPILE_ASSERT(arraysize(kProtoNames) == kNumProtoTypes,
ProtoNamesMustIncludeAllTags);
static_assert(arraysize(kProtoNames) == kNumProtoTypes,
"Proto Names Must Include All Tags");
const char kLoginId[] = "chrome-";
const char kLoginDomain[] = "mcs.android.com";

@ -42,7 +42,7 @@ TEST(MCSUtilTest, ProtobufToTag) {
// Test getting and setting persistent ids.
TEST(MCSUtilTest, PersistentIds) {
COMPILE_ASSERT(kNumProtoTypes == 16U, UpdatePersistentIds);
static_assert(kNumProtoTypes == 16U, "Update Persistent Ids");
const int kTagsWithPersistentIds[] = {
kIqStanzaTag,
kDataMessageStanzaTag
@ -61,7 +61,7 @@ TEST(MCSUtilTest, PersistentIds) {
// Test getting and setting stream ids.
TEST(MCSUtilTest, StreamIds) {
COMPILE_ASSERT(kNumProtoTypes == 16U, UpdateStreamIds);
static_assert(kNumProtoTypes == 16U, "Update Stream Ids");
const int kTagsWithStreamIds[] = {
kIqStanzaTag,
kDataMessageStanzaTag,