ObjFW  Check-in [e814441c17]

Overview
Comment:tests: Ignore unimplemented user{Config,Data}Path
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: e814441c17e92828c71e5782655425e1a1346401e8b9f5d9bc30f4688982bcc7
User & Date: js on 2018-08-19 02:40:44
Other Links: manifest | tags
Context
2018-08-19
23:32
Add OFDNSResolverTests check-in: 35347686ad user: js tags: trunk
02:40
tests: Ignore unimplemented user{Config,Data}Path check-in: e814441c17 user: js tags: trunk
02:12
Several path handling improvements and more tests check-in: 9e8164519c user: js tags: trunk
Changes

Modified tests/OFSystemInfoTests.m from [c232948306] to [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]);