| 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 "base/test/expectations/expectation.h" | 5 #include "base/test/expectations/expectation.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 | 9 |
| 10 TEST(TestExpectationsFunctionsTest, ResultFromString) { | 10 TEST(TestExpectationsFunctionsTest, ResultFromString) { |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 "Win", | 75 "Win", |
| 76 "Win-XP", | 76 "Win-XP", |
| 77 "Win-Vista", | 77 "Win-Vista", |
| 78 "Win-7", | 78 "Win-7", |
| 79 "Win-8", | 79 "Win-8", |
| 80 "Mac", | 80 "Mac", |
| 81 "Mac-10.6", | 81 "Mac-10.6", |
| 82 "Mac-10.7", | 82 "Mac-10.7", |
| 83 "Mac-10.8", | 83 "Mac-10.8", |
| 84 "Linux", | 84 "Linux", |
| 85 "Linux-x32", | 85 "Linux-32", |
| 86 "Linux-x64", | 86 "Linux-64", |
| 87 "ChromeOS", | 87 "ChromeOS", |
| 88 "iOS", | 88 "iOS", |
| 89 "Android", | 89 "Android", |
| 90 }; | 90 }; |
| 91 | 91 |
| 92 const char* kInvalidPlatforms[] = { | 92 const char* kInvalidPlatforms[] = { |
| 93 "Solaris", | 93 "Solaris", |
| 94 "Plan9", | 94 "Plan9", |
| 95 }; | 95 }; |
| 96 | 96 |
| 97 for (size_t i = 0; i < arraysize(kValidPlatforms); ++i) { | 97 for (size_t i = 0; i < arraysize(kValidPlatforms); ++i) { |
| 98 test_expectations::Platform platform; | 98 test_expectations::Platform platform; |
| 99 EXPECT_TRUE(test_expectations::PlatformFromString( | 99 EXPECT_TRUE(test_expectations::PlatformFromString( |
| 100 kValidPlatforms[i], &platform)) << kValidPlatforms[i]; | 100 kValidPlatforms[i], &platform)) << kValidPlatforms[i]; |
| 101 } | 101 } |
| 102 | 102 |
| 103 for (size_t i = 0; i < arraysize(kInvalidPlatforms); ++i) { | 103 for (size_t i = 0; i < arraysize(kInvalidPlatforms); ++i) { |
| 104 test_expectations::Platform platform; | 104 test_expectations::Platform platform; |
| 105 EXPECT_FALSE(test_expectations::PlatformFromString( | 105 EXPECT_FALSE(test_expectations::PlatformFromString( |
| 106 kInvalidPlatforms[i], &platform)) << kInvalidPlatforms[i]; | 106 kInvalidPlatforms[i], &platform)) << kInvalidPlatforms[i]; |
| 107 } | 107 } |
| 108 } | 108 } |
| 109 |
| 110 TEST(TestExpectationsFunctionsTest, CurrentPlatform) { |
| 111 test_expectations::Platform current = |
| 112 test_expectations::GetCurrentPlatform(); |
| 113 EXPECT_FALSE(current.name.empty()); |
| 114 } |
| 115 |
| 116 TEST(TestExpectationsFunctionsTest, CurrentConfiguration) { |
| 117 test_expectations::Configuration current = |
| 118 test_expectations::GetCurrentConfiguration(); |
| 119 EXPECT_NE(test_expectations::CONFIGURATION_UNSPECIFIED, current); |
| 120 } |
| OLD | NEW |