ObjFW  Diff

Differences From Artifact [c232948306]:

To Artifact [6df7253c4d]:


17
18
19
20
21
22
23


24
25
26
27
28
29
30



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50

51


52
53







54
55
56
57
58
59
60

#include "config.h"

#import "OFSystemInfo.h"
#import "OFAutoreleasePool.h"

#import "TestsAppDelegate.h"



static OFString *module = @"OFSystemInfo";

@implementation TestsAppDelegate (OFSystemInfoTests)
- (void)systemInfoTests
{
	OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];




	PRINT(GREEN, @"Page size: %zd", [OFSystemInfo pageSize]);

	PRINT(GREEN, @"Number of CPUs: %zd", [OFSystemInfo numberOfCPUs]);

	PRINT(GREEN, @"ObjFW version: %@", [OFSystemInfo ObjFWVersion]);

	PRINT(GREEN, @"ObjFW version major: %u",
	    [OFSystemInfo ObjFWVersionMajor]);

	PRINT(GREEN, @"ObjFW version minor: %u",
	    [OFSystemInfo ObjFWVersionMinor]);

	PRINT(GREEN, @"Operating system name: %@",
	    [OFSystemInfo operatingSystemName]);

	PRINT(GREEN, @"Operating system version: %@",
	    [OFSystemInfo operatingSystemVersion]);

#ifdef OF_HAVE_FILES

	PRINT(GREEN, @"User data path: %@", [OFSystemInfo userDataPath]);



	PRINT(GREEN, @"User config path: %@", [OFSystemInfo userConfigPath]);







#endif

	PRINT(GREEN, @"CPU vendor: %@", [OFSystemInfo CPUVendor]);

#if defined(OF_X86_64) || defined(OF_X86)
	PRINT(GREEN, @"Supports MMX: %d", [OFSystemInfo supportsMMX]);








>
>







>
>
>




















>
|
>
>
|
|
>
>
>
>
>
>
>







17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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

#include "config.h"

#import "OFSystemInfo.h"
#import "OFAutoreleasePool.h"

#import "TestsAppDelegate.h"

#import "OFNotImplementedException.h"

static OFString *module = @"OFSystemInfo";

@implementation TestsAppDelegate (OFSystemInfoTests)
- (void)systemInfoTests
{
	OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
#ifdef OF_HAVE_FILES
	OFString *userConfigPath, *userDataPath;
#endif

	PRINT(GREEN, @"Page size: %zd", [OFSystemInfo pageSize]);

	PRINT(GREEN, @"Number of CPUs: %zd", [OFSystemInfo numberOfCPUs]);

	PRINT(GREEN, @"ObjFW version: %@", [OFSystemInfo ObjFWVersion]);

	PRINT(GREEN, @"ObjFW version major: %u",
	    [OFSystemInfo ObjFWVersionMajor]);

	PRINT(GREEN, @"ObjFW version minor: %u",
	    [OFSystemInfo ObjFWVersionMinor]);

	PRINT(GREEN, @"Operating system name: %@",
	    [OFSystemInfo operatingSystemName]);

	PRINT(GREEN, @"Operating system version: %@",
	    [OFSystemInfo operatingSystemVersion]);

#ifdef OF_HAVE_FILES
	@try {
		userConfigPath = [OFSystemInfo userConfigPath];
	} @catch (OFNotImplementedException *e) {
		userConfigPath = @"Not implemented";
	}
	PRINT(GREEN, @"User config path: %@", userConfigPath);

	@try {
		userDataPath = [OFSystemInfo userDataPath];
	} @catch (OFNotImplementedException *e) {
		userDataPath = @"Not implemented";
	}
	PRINT(GREEN, @"User data path: %@", userDataPath);
#endif

	PRINT(GREEN, @"CPU vendor: %@", [OFSystemInfo CPUVendor]);

#if defined(OF_X86_64) || defined(OF_X86)
	PRINT(GREEN, @"Supports MMX: %d", [OFSystemInfo supportsMMX]);