Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Side by Side Diff: util/mac/launchd_test.mm

Issue 635883002: Don’t use using directives (“using namespace”) in tests (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « util/mac/checked_mach_address_range_test.cc ('k') | util/mac/mac_util_test.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Crashpad Authors. All rights reserved. 1 // Copyright 2014 The Crashpad Authors. All rights reserved.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with 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 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and 12 // See the License for the specific language governing permissions and
13 // limitations under the License. 13 // limitations under the License.
14 14
15 #include "util/mac/launchd.h" 15 #include "util/mac/launchd.h"
16 16
17 #import <Foundation/Foundation.h> 17 #import <Foundation/Foundation.h>
18 #include <launch.h> 18 #include <launch.h>
19 #include <string.h> 19 #include <string.h>
20 20
21 #include <cmath> 21 #include <cmath>
22 #include <limits> 22 #include <limits>
23 23
24 #include "base/basictypes.h" 24 #include "base/basictypes.h"
25 #include "base/mac/scoped_launch_data.h" 25 #include "base/mac/scoped_launch_data.h"
26 #include "gtest/gtest.h" 26 #include "gtest/gtest.h"
27 #include "util/stdlib/objc.h" 27 #include "util/stdlib/objc.h"
28 28
29 namespace crashpad {
30 namespace test {
29 namespace { 31 namespace {
30 32
31 using namespace crashpad;
32
33 TEST(Launchd, CFPropertyToLaunchData_Integer) { 33 TEST(Launchd, CFPropertyToLaunchData_Integer) {
34 @autoreleasepool { 34 @autoreleasepool {
35 base::mac::ScopedLaunchData launch_data; 35 base::mac::ScopedLaunchData launch_data;
36 36
37 NSNumber* integer_nses[] = { 37 NSNumber* integer_nses[] = {
38 @0, 38 @0,
39 @1, 39 @1,
40 @-1, 40 @-1,
41 @0x7f, 41 @0x7f,
42 @0x80, 42 @0x80,
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 294
295 launch_sublookup_data = launch_data_dict_lookup( 295 launch_sublookup_data = launch_data_dict_lookup(
296 launch_lookup_data, "com.example.service.rebooter"); 296 launch_lookup_data, "com.example.service.rebooter");
297 ASSERT_TRUE(launch_sublookup_data); 297 ASSERT_TRUE(launch_sublookup_data);
298 ASSERT_EQ(LAUNCH_DATA_BOOL, launch_data_get_type(launch_sublookup_data)); 298 ASSERT_EQ(LAUNCH_DATA_BOOL, launch_data_get_type(launch_sublookup_data));
299 EXPECT_TRUE(launch_data_get_bool(launch_sublookup_data)); 299 EXPECT_TRUE(launch_data_get_bool(launch_sublookup_data));
300 } 300 }
301 } 301 }
302 302
303 } // namespace 303 } // namespace
304 } // namespace test
305 } // namespace crashpad
OLDNEW
« no previous file with comments | « util/mac/checked_mach_address_range_test.cc ('k') | util/mac/mac_util_test.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698