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

Unified Diff: gpu/config/gpu_control_list_machine_model_info_unittest.cc

Issue 241793002: Fix machine_model behaviors in gpu blacklist. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 8 months 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 | « gpu/config/gpu_control_list_format.txt ('k') | gpu/config/gpu_control_list_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/config/gpu_control_list_machine_model_info_unittest.cc
diff --git a/gpu/config/gpu_control_list_machine_model_info_unittest.cc b/gpu/config/gpu_control_list_machine_model_info_unittest.cc
deleted file mode 100644
index 9c681a9264f8609aeb614a323847e9e2595ad404..0000000000000000000000000000000000000000
--- a/gpu/config/gpu_control_list_machine_model_info_unittest.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright (c) 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "gpu/config/gpu_control_list.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace gpu {
-
-class MachineModelInfoTest : public testing::Test {
- public:
- MachineModelInfoTest() { }
- virtual ~MachineModelInfoTest() { }
-
- typedef GpuControlList::MachineModelInfo MachineModelInfo;
-};
-
-TEST_F(MachineModelInfoTest, ValidModelInfo) {
- const std::string name_op[] = {
- "contains",
- "beginwith",
- "endwith",
- "="
- };
- const std::string version_op[] = {
- "=",
- "<",
- "<=",
- ">",
- ">=",
- "any",
- "between"
- };
- for (size_t i = 0; i < arraysize(name_op); ++i) {
- for (size_t j = 0; j < arraysize(version_op); ++j) {
- std::string version1;
- std::string version2;
- if (version_op[j] != "any")
- version1 = "3.14";
- if (version_op[j] == "between")
- version2 = "5.4";
- MachineModelInfo info(name_op[i], "model",
- version_op[j], version1, version2);
- EXPECT_TRUE(info.IsValid());
- }
- }
-}
-
-TEST_F(MachineModelInfoTest, ModelComparison) {
- MachineModelInfo info("=", "model_a", ">", "3.4", std::string());
- EXPECT_TRUE(info.Contains("model_a", "4"));
- EXPECT_FALSE(info.Contains("model_b", "4"));
- EXPECT_FALSE(info.Contains("model_a", "3.2"));
-}
-
-} // namespace gpu
-
« no previous file with comments | « gpu/config/gpu_control_list_format.txt ('k') | gpu/config/gpu_control_list_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698