OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/mac/foundation_util.h" | 5 #include "base/mac/foundation_util.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
10 #include "base/format_macros.h" | 10 #include "base/format_macros.h" |
11 #include "base/mac/scoped_cftyperef.h" | 11 #include "base/mac/scoped_cftyperef.h" |
12 #include "base/mac/scoped_nsautorelease_pool.h" | 12 #include "base/mac/scoped_nsautorelease_pool.h" |
13 #include "base/strings/stringprintf.h" | 13 #include "base/strings/stringprintf.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/googletest/include/gtest/gtest.h" |
15 #import "testing/gtest_mac.h" | 15 #import "testing/gtest_mac.h" |
16 | 16 |
17 namespace base { | 17 namespace base { |
18 namespace mac { | 18 namespace mac { |
19 | 19 |
20 TEST(FoundationUtilTest, CFCast) { | 20 TEST(FoundationUtilTest, CFCast) { |
21 // Build out the CF types to be tested as empty containers. | 21 // Build out the CF types to be tested as empty containers. |
22 ScopedCFTypeRef<CFTypeRef> test_array( | 22 ScopedCFTypeRef<CFTypeRef> test_array( |
23 CFArrayCreate(NULL, NULL, 0, &kCFTypeArrayCallBacks)); | 23 CFArrayCreate(NULL, NULL, 0, &kCFTypeArrayCallBacks)); |
24 ScopedCFTypeRef<CFTypeRef> test_array_mutable( | 24 ScopedCFTypeRef<CFTypeRef> test_array_mutable( |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 for (size_t i = 0; i < arraysize(nsuinteger_cases); ++i) { | 394 for (size_t i = 0; i < arraysize(nsuinteger_cases); ++i) { |
395 EXPECT_EQ(nsuinteger_cases[i].expected, | 395 EXPECT_EQ(nsuinteger_cases[i].expected, |
396 StringPrintf("%" PRIuNS, nsuinteger_cases[i].value)); | 396 StringPrintf("%" PRIuNS, nsuinteger_cases[i].value)); |
397 EXPECT_EQ(nsuinteger_cases[i].expected_hex, | 397 EXPECT_EQ(nsuinteger_cases[i].expected_hex, |
398 StringPrintf("%" PRIxNS, nsuinteger_cases[i].value)); | 398 StringPrintf("%" PRIxNS, nsuinteger_cases[i].value)); |
399 } | 399 } |
400 } | 400 } |
401 | 401 |
402 } // namespace mac | 402 } // namespace mac |
403 } // namespace base | 403 } // namespace base |
OLD | NEW |