Skip to content

Commit 3c7559b

Browse files
committed
add test case
1 parent c3cb57e commit 3c7559b

6 files changed

Lines changed: 16 additions & 80 deletions

File tree

DeviceInfo.xcodeproj/project.pbxproj

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
9625108F1F286C9A0031FEE4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9625108E1F286C9A0031FEE4 /* Assets.xcassets */; };
1414
962510921F286C9A0031FEE4 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 962510901F286C9A0031FEE4 /* LaunchScreen.storyboard */; };
1515
9625109D1F286C9A0031FEE4 /* DeviceInfoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9625109C1F286C9A0031FEE4 /* DeviceInfoTests.m */; };
16-
962510A81F286C9A0031FEE4 /* DeviceInfoUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 962510A71F286C9A0031FEE4 /* DeviceInfoUITests.m */; };
1716
962510FD1F2893DA0031FEE4 /* DeviceInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 962510FC1F2893DA0031FEE4 /* DeviceInfo.m */; };
1817
/* End PBXBuildFile section */
1918

@@ -48,8 +47,6 @@
4847
9625109C1F286C9A0031FEE4 /* DeviceInfoTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DeviceInfoTests.m; sourceTree = "<group>"; };
4948
9625109E1F286C9A0031FEE4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
5049
962510A31F286C9A0031FEE4 /* DeviceInfoUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DeviceInfoUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
51-
962510A71F286C9A0031FEE4 /* DeviceInfoUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DeviceInfoUITests.m; sourceTree = "<group>"; };
52-
962510A91F286C9A0031FEE4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
5350
962510FB1F2893DA0031FEE4 /* DeviceInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeviceInfo.h; sourceTree = "<group>"; };
5451
962510FC1F2893DA0031FEE4 /* DeviceInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DeviceInfo.m; sourceTree = "<group>"; };
5552
/* End PBXFileReference section */
@@ -84,7 +81,6 @@
8481
children = (
8582
962510811F286C9A0031FEE4 /* DeviceInfo */,
8683
9625109B1F286C9A0031FEE4 /* DeviceInfoTests */,
87-
962510A61F286C9A0031FEE4 /* DeviceInfoUITests */,
8884
962510801F286C9A0031FEE4 /* Products */,
8985
);
9086
sourceTree = "<group>";
@@ -132,15 +128,6 @@
132128
path = DeviceInfoTests;
133129
sourceTree = "<group>";
134130
};
135-
962510A61F286C9A0031FEE4 /* DeviceInfoUITests */ = {
136-
isa = PBXGroup;
137-
children = (
138-
962510A71F286C9A0031FEE4 /* DeviceInfoUITests.m */,
139-
962510A91F286C9A0031FEE4 /* Info.plist */,
140-
);
141-
path = DeviceInfoUITests;
142-
sourceTree = "<group>";
143-
};
144131
962510FA1F2893DA0031FEE4 /* class */ = {
145132
isa = PBXGroup;
146133
children = (
@@ -304,7 +291,6 @@
304291
isa = PBXSourcesBuildPhase;
305292
buildActionMask = 2147483647;
306293
files = (
307-
962510A81F286C9A0031FEE4 /* DeviceInfoUITests.m in Sources */,
308294
);
309295
runOnlyForDeploymentPostprocessing = 0;
310296
};

DeviceInfo/class/DeviceInfo.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
@return Mac地址
3939
*/
4040
+ (NSString *)getMacAddress;
41-
//- (NSString*)getMainBundleMD5WithFlag:(NSInteger)flag;
4241

4342

4443
/**

DeviceInfoTests/DeviceInfoTests.m

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//
88

99
#import <XCTest/XCTest.h>
10+
#import "DeviceInfo.h"
1011

1112
@interface DeviceInfoTests : XCTestCase
1213

@@ -24,16 +25,28 @@ - (void)tearDown {
2425
[super tearDown];
2526
}
2627

28+
#pragma mark - test
2729
- (void)testExample {
2830
// This is an example of a functional test case.
2931
// Use XCTAssert and related functions to verify your tests produce the correct results.
32+
[self measureBlock:^{
33+
NSDictionary *dict = [DeviceInfo deviceInfo];
34+
NSLog(@"%@",dict);
35+
}];
3036
}
3137

32-
- (void)testPerformanceExample {
33-
// This is an example of a performance test case.
38+
-(void)testExecutablePathAndMD5Value{
3439
[self measureBlock:^{
35-
// Put the code you want to measure the time of here.
40+
NSArray *arr = [DeviceInfo executablePathAndMD5Value];
41+
NSLog(@"%@",[arr copy]);
3642
}];
3743
}
3844

45+
46+
47+
48+
#pragma mark - test case
49+
50+
51+
3952
@end

DeviceInfoUITests/DeviceInfoUITests.m

Lines changed: 0 additions & 40 deletions
This file was deleted.

DeviceInfoUITests/Info.plist

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)