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

Unified Diff: chrome/browser/download/download_item_model_unittest.cc

Issue 815363002: replace COMPILE_ASSERT with static_assert in chrome/browser/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 6 years 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
Index: chrome/browser/download/download_item_model_unittest.cc
diff --git a/chrome/browser/download/download_item_model_unittest.cc b/chrome/browser/download/download_item_model_unittest.cc
index 25bdfe491e1f1a9761227a42e674e8a7f3cf074c..b7cd6adc24fa054ad86e606c3b0b9bde38f6c126 100644
--- a/chrome/browser/download/download_item_model_unittest.cc
+++ b/chrome/browser/download/download_item_model_unittest.cc
@@ -31,7 +31,7 @@ using ::testing::_;
namespace {
// Create a char array that has as many elements as there are download
-// interrupt reasons. We can then use that in a COMPILE_ASSERT to make sure
+// interrupt reasons. We can then use that in a static_assert to make sure
// that all the interrupt reason codes are accounted for. The reason codes are
// unfortunately sparse, making this necessary.
char kInterruptReasonCounter[] = {
@@ -170,8 +170,8 @@ TEST_F(DownloadItemModelTest, InterruptedStatus) {
{ content::DOWNLOAD_INTERRUPT_REASON_CRASH,
"Failed - Crash" },
};
- COMPILE_ASSERT(kInterruptReasonCount == arraysize(kTestCases),
- interrupt_reason_mismatch);
+ static_assert(kInterruptReasonCount == arraysize(kTestCases),
+ "interrupt reason mismatch");
SetupDownloadItemDefaults();
for (unsigned i = 0; i < arraysize(kTestCases); ++i) {
@@ -246,8 +246,8 @@ TEST_F(DownloadItemModelTest, InterruptTooltip) {
{ content::DOWNLOAD_INTERRUPT_REASON_CRASH,
"foo.bar\nCrash" },
};
- COMPILE_ASSERT(kInterruptReasonCount == arraysize(kTestCases),
- interrupt_reason_mismatch);
+ static_assert(kInterruptReasonCount == arraysize(kTestCases),
+ "interrupt reason mismatch");
// Large tooltip width. Should be large enough to accommodate the entire
// tooltip without truncation.
« no previous file with comments | « chrome/browser/diagnostics/diagnostics_metrics.cc ('k') | chrome/browser/extensions/api/alarms/alarms_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698