17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
-
-
-
|
#import "TestsAppDelegate.h"
@implementation TestsAppDelegate (OFSystemInfoTests)
- (void)systemInfoTests
{
void *pool = objc_autoreleasePoolPush();
#ifdef OF_HAVE_FILES
OFString *userConfigPath, *userDataPath;
#endif
[OFStdOut setForegroundColor: [OFColor lime]];
[OFStdOut writeFormat: @"[OFSystemInfo] Page size: %zd\n",
[OFSystemInfo pageSize]];
[OFStdOut writeFormat: @"[OFSystemInfo] Number of CPUs: %zd\n",
|
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
-
+
-
-
+
-
-
-
-
+
+
-
-
-
-
+
-
-
-
-
+
+
-
-
+
|
[OFStdOut writeFormat: @"[OFSystemInfo] Operating system name: %@\n",
[OFSystemInfo operatingSystemName]];
[OFStdOut writeFormat:
@"[OFSystemInfo] Operating system version: %@\n",
[OFSystemInfo operatingSystemVersion]];
#ifdef OF_HAVE_FILES
[OFStdOut writeFormat: @"[OFSystemInfo] User config URI: %@\n",
@try {
userConfigPath = [OFSystemInfo userConfigPath];
[OFSystemInfo userConfigURI].string];
} @catch (OFNotImplementedException *e) {
userConfigPath = @"Not implemented";
}
[OFStdOut writeFormat: @"[OFSystemInfo] User config path: %@\n",
[OFStdOut writeFormat: @"[OFSystemInfo] User data URI: %@\n",
userConfigPath];
@try {
userDataPath = [OFSystemInfo userDataPath];
[OFSystemInfo userDataURI].string];
} @catch (OFNotImplementedException *e) {
userDataPath = @"Not implemented";
}
[OFStdOut writeFormat: @"[OFSystemInfo] User data path: %@\n",
[OFStdOut writeFormat: @"[OFSystemInfo] Temporary directory URI: %@\n",
userDataPath];
#endif
[OFSystemInfo temporaryDirectoryURI].string];
[OFStdOut writeFormat: @"[OFSystemInfo] CPU vendor: %@\n",
[OFSystemInfo CPUVendor]];
[OFStdOut writeFormat: @"[OFSystemInfo] CPU model: %@\n",
[OFSystemInfo CPUModel]];
|