| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "gpu/config/gpu_control_list.h" | 5 #include "gpu/config/gpu_control_list.h" |
| 6 #include "testing/gtest/include/gtest/gtest.h" | 6 #include "testing/gtest/include/gtest/gtest.h" |
| 7 | 7 |
| 8 namespace gpu { | 8 namespace gpu { |
| 9 | 9 |
| 10 class MachineModelInfoTest : public testing::Test { | 10 class MachineModelInfoTest : public testing::Test { |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 version2 = "5.4"; | 41 version2 = "5.4"; |
| 42 MachineModelInfo info(name_op[i], "model", | 42 MachineModelInfo info(name_op[i], "model", |
| 43 version_op[j], version1, version2); | 43 version_op[j], version1, version2); |
| 44 EXPECT_TRUE(info.IsValid()); | 44 EXPECT_TRUE(info.IsValid()); |
| 45 } | 45 } |
| 46 } | 46 } |
| 47 } | 47 } |
| 48 | 48 |
| 49 TEST_F(MachineModelInfoTest, ModelComparison) { | 49 TEST_F(MachineModelInfoTest, ModelComparison) { |
| 50 MachineModelInfo info("=", "model_a", ">", "3.4", std::string()); | 50 MachineModelInfo info("=", "model_a", ">", "3.4", std::string()); |
| 51 EXPECT_TRUE(info.IsValid()); |
| 51 EXPECT_TRUE(info.Contains("model_a", "4")); | 52 EXPECT_TRUE(info.Contains("model_a", "4")); |
| 52 EXPECT_FALSE(info.Contains("model_b", "4")); | 53 EXPECT_FALSE(info.Contains("model_b", "4")); |
| 53 EXPECT_FALSE(info.Contains("model_a", "3.2")); | 54 EXPECT_FALSE(info.Contains("model_a", "3.2")); |
| 54 } | 55 } |
| 55 | 56 |
| 57 TEST_F(MachineModelInfoTest, ModelNameNoVersion) { |
| 58 MachineModelInfo info("=", "model_a", "any", std::string(), std::string()); |
| 59 EXPECT_TRUE(info.IsValid()); |
| 60 EXPECT_TRUE(info.Contains("model_a", std::string())); |
| 61 } |
| 62 |
| 56 } // namespace gpu | 63 } // namespace gpu |
| 57 | 64 |
| OLD | NEW |