OLD | NEW |
| (Empty) |
1 // Copyright 2010 Google Inc. | |
2 // | |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | |
4 // you may not use this file except in compliance with the License. | |
5 // You may obtain a copy of the License at | |
6 // | |
7 // http://www.apache.org/licenses/LICENSE-2.0 | |
8 // | |
9 // Unless required by applicable law or agreed to in writing, software | |
10 // distributed under the License is distributed on an "AS IS" BASIS, | |
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
12 // See the License for the specific language governing permissions and | |
13 // limitations under the License. | |
14 // ======================================================================== | |
15 | |
16 #include "omaha/base/constants.h" | |
17 #include "omaha/client/client_utils.h" | |
18 #include "omaha/testing/unit_test.h" | |
19 | |
20 namespace omaha { | |
21 | |
22 namespace client_utils { | |
23 | |
24 // TODO(omaha): These tests are of questionable value - they just check | |
25 // that the string resources for the language of your dev/build box | |
26 // matches a concatenation of the strings in main.scons. This means | |
27 // that they're only useful for certain languages, and they add extra | |
28 // hurdles when you're attempting to customize Omaha in its open source | |
29 // form. We should decide later whether to keep these tests at all - | |
30 // for now, we just enable them on official builds. | |
31 | |
32 #ifdef GOOGLE_UPDATE_BUILD | |
33 TEST(ClientUtilsTest, GetDefaultApplicationName) { | |
34 EXPECT_STREQ(SHORT_COMPANY_NAME _T(" Application"), | |
35 GetDefaultApplicationName()); | |
36 } | |
37 | |
38 TEST(ClientUtilsTest, GetDefaultBundleName) { | |
39 EXPECT_STREQ(SHORT_COMPANY_NAME _T(" Application"), GetDefaultBundleName()); | |
40 } | |
41 | |
42 TEST(ClientUtilsTest, GetUpdateAllAppsBundleName) { | |
43 EXPECT_STREQ(SHORT_COMPANY_NAME _T(" Application"), | |
44 GetUpdateAllAppsBundleName()); | |
45 } | |
46 | |
47 TEST(ClientUtilsTest, GetInstallerDisplayName_EmptyBundleName) { | |
48 EXPECT_STREQ(SHORT_COMPANY_NAME _T(" Installer"), | |
49 GetInstallerDisplayName(CString())); | |
50 } | |
51 #endif // GOOGLE_UPDATE_BUILD | |
52 | |
53 TEST(ClientUtilsTest, GetInstallerDisplayName_WithBundleName) { | |
54 EXPECT_STREQ(_T("My App Installer"), GetInstallerDisplayName(_T("My App"))); | |
55 } | |
56 | |
57 } // namespace client_utils | |
58 | |
59 } // namespace omaha | |
OLD | NEW |