ObjFW  Diff

Differences From Artifact [9c2137f367]:

To Artifact [79401c47ef]:


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 URL: %@\n",
	@try {
		userConfigPath = [OFSystemInfo userConfigPath];
	    [OFSystemInfo userConfigURL].string];
	} @catch (OFNotImplementedException *e) {
		userConfigPath = @"Not implemented";
	}
	[OFStdOut writeFormat: @"[OFSystemInfo] User config path: %@\n",

	[OFStdOut writeFormat: @"[OFSystemInfo] User data URL: %@\n",
	    userConfigPath];

	@try {
		userDataPath = [OFSystemInfo userDataPath];
	    [OFSystemInfo userDataURL].string];
	} @catch (OFNotImplementedException *e) {
		userDataPath = @"Not implemented";
	}
	[OFStdOut writeFormat: @"[OFSystemInfo] User data path: %@\n",

	[OFStdOut writeFormat: @"[OFSystemInfo] Temporary directory URL: %@\n",
	    userDataPath];
#endif
	    [OFSystemInfo temporaryDirectoryURL].string];

	[OFStdOut writeFormat: @"[OFSystemInfo] CPU vendor: %@\n",
	    [OFSystemInfo CPUVendor]];

	[OFStdOut writeFormat: @"[OFSystemInfo] CPU model: %@\n",
	    [OFSystemInfo CPUModel]];