OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2014 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. | |
4 | |
5 #include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h" | |
6 | |
7 #include "testing/gtest/include/gtest/gtest.h" | |
8 | |
9 const char kVersion[] = "1.2.3.4"; | |
10 const char kExpectedBuildAndPatch[] = "3.4"; | |
11 | |
12 class DataReductionProxyChromeSettingsTest : public testing::Test { | |
13 public: | |
14 DataReductionProxyChromeSettingsTest() {} | |
15 }; | |
16 | |
17 TEST_F(DataReductionProxyChromeSettingsTest, TestGetBuildAndPatchNumber) { | |
18 std::string build_and_patch = | |
19 DataReductionProxyChromeSettings::GetBuildAndPatchNumberFromString( | |
20 kVersion); | |
21 EXPECT_EQ(kExpectedBuildAndPatch, build_and_patch); | |
22 | |
23 build_and_patch = | |
24 DataReductionProxyChromeSettings::GetBuildAndPatchNumberFromString( | |
25 "0.0"); | |
bengr
2014/09/02 23:16:14
nit: define kBogusVersion[] = "0.0"
| |
26 EXPECT_EQ(std::string(), build_and_patch); | |
27 } | |
OLD | NEW |