| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Keep this file in sync with entry_kernel.h. | 5 // Keep this file in sync with entry_kernel.h. |
| 6 | 6 |
| 7 #include "sync/syncable/syncable_enum_conversions.h" | 7 #include "sync/syncable/syncable_enum_conversions.h" |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 | 11 |
| 12 namespace syncer { |
| 12 namespace syncable { | 13 namespace syncable { |
| 13 | 14 |
| 14 // We can't tokenize expected_min/expected_max since it can be a | 15 // We can't tokenize expected_min/expected_max since it can be a |
| 15 // general expression. | 16 // general expression. |
| 16 #define ASSERT_ENUM_BOUNDS(enum_min, enum_max, expected_min, expected_max) \ | 17 #define ASSERT_ENUM_BOUNDS(enum_min, enum_max, expected_min, expected_max) \ |
| 17 COMPILE_ASSERT(static_cast<int>(enum_min) == \ | 18 COMPILE_ASSERT(static_cast<int>(enum_min) == \ |
| 18 static_cast<int>(expected_min), \ | 19 static_cast<int>(expected_min), \ |
| 19 enum_min##_not_expected_min); \ | 20 enum_min##_not_expected_min); \ |
| 20 COMPILE_ASSERT(static_cast<int>(enum_max) == \ | 21 COMPILE_ASSERT(static_cast<int>(enum_max) == \ |
| 21 static_cast<int>(expected_max), \ | 22 static_cast<int>(expected_max), \ |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 case BIT_TEMPS_END: break; | 156 case BIT_TEMPS_END: break; |
| 156 } | 157 } |
| 157 NOTREACHED(); | 158 NOTREACHED(); |
| 158 return ""; | 159 return ""; |
| 159 } | 160 } |
| 160 | 161 |
| 161 #undef ENUM_CASE | 162 #undef ENUM_CASE |
| 162 #undef ASSERT_ENUM_BOUNDS | 163 #undef ASSERT_ENUM_BOUNDS |
| 163 | 164 |
| 164 } // namespace syncable | 165 } // namespace syncable |
| 166 } // namespace syncer |
| OLD | NEW |