Update V8 to version 4.6.55.
[chromium-blink-merge.git] / chromeos / system / version_loader_unittest.cc
blobab969355f61f8369424eee9caa2ff9f54a41dead
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chromeos/system/version_loader.h"
7 #include <string>
9 #include "testing/gtest/include/gtest/gtest.h"
11 namespace chromeos {
13 typedef testing::Test VersionLoaderTest;
15 static const char kTest10[] = "vendor | FOO";
16 static const char kTest11[] = "firmware | FOO";
17 static const char kTest12[] = "firmware | FOO";
18 static const char kTest13[] = "version | 0.2.3.3";
19 static const char kTest14[] = "version | 0.2.3.3";
20 static const char kTest15[] = "version 0.2.3.3";
22 TEST_F(VersionLoaderTest, ParseFirmware) {
23 EXPECT_EQ("", version_loader::ParseFirmware(kTest10));
24 EXPECT_EQ("", version_loader::ParseFirmware(kTest11));
25 EXPECT_EQ("", version_loader::ParseFirmware(kTest12));
26 EXPECT_EQ("0.2.3.3", version_loader::ParseFirmware(kTest13));
27 EXPECT_EQ("0.2.3.3", version_loader::ParseFirmware(kTest14));
28 EXPECT_EQ("0.2.3.3", version_loader::ParseFirmware(kTest15));
31 } // namespace chromeos