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

Side by Side Diff: chrome/installer/util/google_update_settings_unittest.cc

Issue 821673004: replace COMPILE_ASSERT with static_assert in chrome/installer/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « chrome/installer/util/delete_tree_work_item.cc ('k') | chrome/installer/util/install_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "chrome/installer/util/google_update_settings.h" 5 #include "chrome/installer/util/google_update_settings.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <shlwapi.h> // For SHDeleteKey. 8 #include <shlwapi.h> // For SHDeleteKey.
9 9
10 #include "base/base_paths.h" 10 #include "base/base_paths.h"
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 const wchar_t* const plain[] = { 404 const wchar_t* const plain[] = {
405 L"", 405 L"",
406 L"1.1", 406 L"1.1",
407 L"1.1-dev" 407 L"1.1-dev"
408 }; 408 };
409 const wchar_t* const full[] = { 409 const wchar_t* const full[] = {
410 L"-full", 410 L"-full",
411 L"1.1-full", 411 L"1.1-full",
412 L"1.1-dev-full" 412 L"1.1-dev-full"
413 }; 413 };
414 COMPILE_ASSERT(arraysize(full) == arraysize(plain), bad_full_array_size); 414 static_assert(arraysize(full) == arraysize(plain), "bad full array size");
415 const wchar_t* const multifail[] = { 415 const wchar_t* const multifail[] = {
416 L"-multifail", 416 L"-multifail",
417 L"1.1-multifail", 417 L"1.1-multifail",
418 L"1.1-dev-multifail" 418 L"1.1-dev-multifail"
419 }; 419 };
420 COMPILE_ASSERT(arraysize(multifail) == arraysize(plain), 420 static_assert(arraysize(multifail) == arraysize(plain),
421 bad_multifail_array_size); 421 "bad multifail array size");
422 const wchar_t* const multifail_full[] = { 422 const wchar_t* const multifail_full[] = {
423 L"-multifail-full", 423 L"-multifail-full",
424 L"1.1-multifail-full", 424 L"1.1-multifail-full",
425 L"1.1-dev-multifail-full" 425 L"1.1-dev-multifail-full"
426 }; 426 };
427 COMPILE_ASSERT(arraysize(multifail_full) == arraysize(plain), 427 static_assert(arraysize(multifail_full) == arraysize(plain),
428 bad_multifail_full_array_size); 428 "bad multifail full array size");
429 const wchar_t* const* input_arrays[] = { 429 const wchar_t* const* input_arrays[] = {
430 plain, 430 plain,
431 full, 431 full,
432 multifail, 432 multifail,
433 multifail_full 433 multifail_full
434 }; 434 };
435 ChannelInfo v; 435 ChannelInfo v;
436 for (int type_idx = 0; type_idx < arraysize(archive_types); ++type_idx) { 436 for (int type_idx = 0; type_idx < arraysize(archive_types); ++type_idx) {
437 const installer::ArchiveType archive_type = archive_types[type_idx]; 437 const installer::ArchiveType archive_type = archive_types[type_idx];
438 for (int result_idx = 0; result_idx < arraysize(results); ++result_idx) { 438 for (int result_idx = 0; result_idx < arraysize(results); ++result_idx) {
(...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after
1357 StatsState(StatsState::kSystemLevel, StatsState::MULTI_INSTALL, 1357 StatsState(StatsState::kSystemLevel, StatsState::MULTI_INSTALL,
1358 StatsState::FALSE_SETTING, StatsState::FALSE_SETTING), 1358 StatsState::FALSE_SETTING, StatsState::FALSE_SETTING),
1359 StatsState(StatsState::kSystemLevel, StatsState::MULTI_INSTALL, 1359 StatsState(StatsState::kSystemLevel, StatsState::MULTI_INSTALL,
1360 StatsState::FALSE_SETTING, StatsState::TRUE_SETTING), 1360 StatsState::FALSE_SETTING, StatsState::TRUE_SETTING),
1361 StatsState(StatsState::kSystemLevel, StatsState::MULTI_INSTALL, 1361 StatsState(StatsState::kSystemLevel, StatsState::MULTI_INSTALL,
1362 StatsState::TRUE_SETTING, StatsState::NO_SETTING), 1362 StatsState::TRUE_SETTING, StatsState::NO_SETTING),
1363 StatsState(StatsState::kSystemLevel, StatsState::MULTI_INSTALL, 1363 StatsState(StatsState::kSystemLevel, StatsState::MULTI_INSTALL,
1364 StatsState::TRUE_SETTING, StatsState::FALSE_SETTING), 1364 StatsState::TRUE_SETTING, StatsState::FALSE_SETTING),
1365 StatsState(StatsState::kSystemLevel, StatsState::MULTI_INSTALL, 1365 StatsState(StatsState::kSystemLevel, StatsState::MULTI_INSTALL,
1366 StatsState::TRUE_SETTING, StatsState::TRUE_SETTING))); 1366 StatsState::TRUE_SETTING, StatsState::TRUE_SETTING)));
OLDNEW
« no previous file with comments | « chrome/installer/util/delete_tree_work_item.cc ('k') | chrome/installer/util/install_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698