123456789101112131415161718192021222324252627282930313233343536373839404142 |
- #include "update_engine/omaha_utils.h"
- #include <gtest/gtest.h>
- #include <vector>
- namespace chromeos_update_engine {
- class OmahaUtilsTest : public ::testing::Test {};
- TEST(OmahaUtilsTest, EolStatusTest) {
- EXPECT_EQ(EolStatus::kEol, StringToEolStatus("eol"));
-
- const std::vector<EolStatus> tests = {
- EolStatus::kSupported, EolStatus::kSecurityOnly, EolStatus::kEol};
- for (EolStatus eol_status : tests) {
- EXPECT_EQ(eol_status, StringToEolStatus(EolStatusToString(eol_status)))
- << "The StringToEolStatus() was " << EolStatusToString(eol_status);
- }
-
- EXPECT_EQ(EolStatus::kSupported, StringToEolStatus(""));
- EXPECT_EQ(EolStatus::kSupported, StringToEolStatus("hello, world!"));
- }
- }
|