Index: new_tests/Makefile ================================================================== --- new_tests/Makefile +++ new_tests/Makefile @@ -33,10 +33,11 @@ OFNumberTests.m \ OFPBKDF2Tests.m \ OFPropertyListTests.m \ OFScryptTests.m \ OFSetTests.m \ + OFSystemInfoTests.m \ ${USE_SRCS_PLUGINS} \ ${USE_SRCS_SOCKETS} \ ${USE_SRCS_SUBPROCESSES} \ ${USE_SRCS_THREADS} \ testfile_bin.m \ Index: new_tests/OFConcreteMutableSetTests.m ================================================================== --- new_tests/OFConcreteMutableSetTests.m +++ new_tests/OFConcreteMutableSetTests.m @@ -39,16 +39,18 @@ } - (void)testDetectMutationDuringFastEnumeration { bool detected = false; + @try { for (OFString *object in _mutableSet) [_mutableSet removeObject: object]; } @catch (OFEnumerationMutationException *e) { detected = true; } + OTAssertTrue(detected); } #ifdef OF_HAVE_BLOCKS - (void)testDetectMutationDuringEnumerateObjectsUsingBlock ADDED new_tests/OFSystemInfoTests.m Index: new_tests/OFSystemInfoTests.m ================================================================== --- new_tests/OFSystemInfoTests.m +++ new_tests/OFSystemInfoTests.m @@ -0,0 +1,202 @@ +/* + * Copyright (c) 2008-2024 Jonathan Schleifer + * + * All rights reserved. + * + * This file is part of ObjFW. It may be distributed under the terms of the + * Q Public License 1.0, which can be found in the file LICENSE.QPL included in + * the packaging of this file. + * + * Alternatively, it may be distributed under the terms of the GNU General + * Public License, either version 2 or 3, which can be found in the file + * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this + * file. + */ + +#include "config.h" + +#import "ObjFW.h" +#import "ObjFWTest.h" + +@interface OFSystemInfoTests: OTTestCase +@end + +#ifdef OF_HAVE_SOCKETS +static void +appendAddresses(OFMutableString *string, OFData *addresses, bool *firstAddress) +{ + size_t count = addresses.count; + + for (size_t i = 0; i < count; i++) { + const OFSocketAddress *address = [addresses itemAtIndex: i]; + + if (!*firstAddress) + [string appendString: @", "]; + + *firstAddress = false; + + [string appendString: OFSocketAddressString(address)]; + } +} +#endif + +@implementation OFSystemInfoTests ++ (OFArray OF_GENERIC(OFPair OF_GENERIC(OFString *, id) *) *)summary +{ + OFMutableArray *summary = [OFMutableArray array]; +#ifdef OF_HAVE_SOCKETS + OFDictionary *networkInterfaces; + OFMutableString *networkInterfacesString; + bool firstInterface = true; +#endif + +#define ADD(name, value) \ + [summary addObject: [OFPair pairWithFirstObject: name \ + secondObject: value]]; +#define ADD_UINT(name, value) \ + ADD(name, [OFNumber numberWithUnsignedInt: value]); +#define ADD_ULONGLONG(name, value) \ + ADD(name, [OFNumber numberWithUnsignedLongLong: value]); +#define ADD_BOOL(name, value) \ + ADD(name, [OFNumber numberWithBool: value]); + + ADD(@"ObjFW version", [OFSystemInfo ObjFWVersion]) + ADD_UINT(@"ObjFW version major", [OFSystemInfo ObjFWVersionMajor]) + ADD_UINT(@"ObjFW version minor", [OFSystemInfo ObjFWVersionMinor]) + ADD(@"Operating system name", [OFSystemInfo operatingSystemName]); + ADD(@"Operating system version", [OFSystemInfo operatingSystemVersion]); + ADD_ULONGLONG(@"Page size", [OFSystemInfo pageSize]); + ADD_ULONGLONG(@"Number of CPUs", [OFSystemInfo numberOfCPUs]); + ADD(@"User config IRI", [OFSystemInfo userConfigIRI].string); + ADD(@"User data IRI", [OFSystemInfo userDataIRI].string); + ADD(@"Temporary directory IRI", + [OFSystemInfo temporaryDirectoryIRI].string); + ADD(@"CPU vendor", [OFSystemInfo CPUVendor]); + ADD(@"CPU model", [OFSystemInfo CPUModel]); + +#if defined(OF_AMD64) || defined(OF_X86) + ADD_BOOL(@"Supports MMX", [OFSystemInfo supportsMMX]); + ADD_BOOL(@"Supports 3DNow!", [OFSystemInfo supports3DNow]); + ADD_BOOL(@"Supports enhanced 3DNow!", + [OFSystemInfo supportsEnhanced3DNow]); + ADD_BOOL(@"Supports SSE", [OFSystemInfo supportsSSE]); + ADD_BOOL(@"Supports SSE2", [OFSystemInfo supportsSSE2]); + ADD_BOOL(@"Supports SSE3", [OFSystemInfo supportsSSE3]); + ADD_BOOL(@"Supports SSSE3", [OFSystemInfo supportsSSSE3]); + ADD_BOOL(@"Supports SSE4.1", [OFSystemInfo supportsSSE41]); + ADD_BOOL(@"Supports SSE4.2", [OFSystemInfo supportsSSE42]); + ADD_BOOL(@"Supports AVX", [OFSystemInfo supportsAVX]); + ADD_BOOL(@"Supports AVX2", [OFSystemInfo supportsAVX2]); + ADD_BOOL(@"Supports AES-NI", [OFSystemInfo supportsAESNI]); + ADD_BOOL(@"Supports SHA extensions", + [OFSystemInfo supportsSHAExtensions]); + ADD_BOOL(@"Supports fused multiply-add", + [OFSystemInfo supportsFusedMultiplyAdd]); + ADD_BOOL(@"Supports F16C", [OFSystemInfo supportsF16C]); + ADD_BOOL(@"Supports AVX-512 Foundation", + [OFSystemInfo supportsAVX512Foundation]); + ADD_BOOL(@"Supports AVX-512 Conflict Detection Instructions", + [OFSystemInfo supportsAVX512ConflictDetectionInstructions]); + ADD_BOOL(@"Supports AVX-512 Exponential and Reciprocal Instructions", + [OFSystemInfo supportsAVX512ExponentialAndReciprocalInstructions]); + ADD_BOOL(@"Supports AVX-512 Prefetch Instructions", + [OFSystemInfo supportsAVX512PrefetchInstructions]); + ADD_BOOL(@"Supports AVX-512 Vector Length Extensions", + [OFSystemInfo supportsAVX512VectorLengthExtensions]); + ADD_BOOL(@"Supports AVX-512 Doubleword and Quadword Instructions", + [OFSystemInfo supportsAVX512DoublewordAndQuadwordInstructions]); + ADD_BOOL(@"Supports AVX-512 Byte and Word Instructions", + [OFSystemInfo supportsAVX512ByteAndWordInstructions]); + ADD_BOOL(@"Supports AVX-512 Integer Fused Multiply Add", + [OFSystemInfo supportsAVX512IntegerFusedMultiplyAdd]); + ADD_BOOL(@"Supports AVX-512 Vector Byte Manipulation Instructions", + [OFSystemInfo supportsAVX512VectorByteManipulationInstructions]); + ADD_BOOL(@"Supports AVX-512 Vector Population Count Instruction", + [OFSystemInfo supportsAVX512VectorPopulationCountInstruction]); + ADD_BOOL(@"Supports AVX-512 Vector Neutral Network Instructions", + [OFSystemInfo supportsAVX512VectorNeuralNetworkInstructions]); + ADD_BOOL(@"Supports AVX-512 Vector Byte Manipulation Instructions 2", + [OFSystemInfo supportsAVX512VectorByteManipulationInstructions2]); + ADD_BOOL(@"Supports AVX-512 Bit Algorithms", + [OFSystemInfo supportsAVX512BitAlgorithms]); + ADD_BOOL(@"Supports AVX-512 Float16 Instructions", + [OFSystemInfo supportsAVX512Float16Instructions]); + ADD_BOOL(@"Supports AVX-512 BFloat16 Instructions", + [OFSystemInfo supportsAVX512BFloat16Instructions]); +#endif + +#ifdef OF_POWERPC + ADD_BOOL(@"[OFSystemInfo] Supports AltiVec", + [OFSystemInfo supportsAltiVec]); +#endif + +#undef ADD +#undef ADD_UINT +#undef ADD_ULONGLONG +#undef ADD_BOOL + +#ifdef OF_HAVE_SOCKETS + networkInterfaces = [OFSystemInfo networkInterfaces]; + networkInterfacesString = [OFMutableString string]; + for (OFString *name in networkInterfaces) { + bool firstAddress = true; + OFNetworkInterface interface; + OFData *hardwareAddress; + + if (!firstInterface) + [networkInterfacesString appendString: @"; "]; + + firstInterface = false; + + [networkInterfacesString appendFormat: @"%@(", name]; + + interface = [networkInterfaces objectForKey: name]; + + appendAddresses(networkInterfacesString, + [interface objectForKey: OFNetworkInterfaceIPv4Addresses], + &firstAddress); +# ifdef OF_HAVE_IPV6 + appendAddresses(networkInterfacesString, + [interface objectForKey: OFNetworkInterfaceIPv6Addresses], + &firstAddress); +# endif +# ifdef OF_HAVE_IPX + appendAddresses(networkInterfacesString, + [interface objectForKey: OFNetworkInterfaceIPXAddresses], + &firstAddress); +# endif +# ifdef OF_HAVE_APPLETALK + appendAddresses(networkInterfacesString, + [interface objectForKey: + OFNetworkInterfaceAppleTalkAddresses], &firstAddress); +# endif + + hardwareAddress = [interface + objectForKey: OFNetworkInterfaceHardwareAddress]; + if (hardwareAddress != nil) { + const unsigned char *bytes = hardwareAddress.items; + size_t length = hardwareAddress.count; + + if (!firstAddress) + [networkInterfacesString appendString: @", "]; + + for (size_t i = 0; i < length; i++) { + if (i > 0) + [networkInterfacesString + appendString: @":"]; + + [networkInterfacesString + appendFormat: @"%02X", bytes[i]]; + } + } + + [networkInterfacesString appendString: @")"]; + } + [summary addObject: + [OFPair pairWithFirstObject: @"Network interfaces" + secondObject: networkInterfacesString]]; +#endif + + return summary; +} +@end DELETED src/test/OTAppDelegate.h Index: src/test/OTAppDelegate.h ================================================================== --- src/test/OTAppDelegate.h +++ src/test/OTAppDelegate.h @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2008-2024 Jonathan Schleifer - * - * All rights reserved. - * - * This file is part of ObjFW. It may be distributed under the terms of the - * Q Public License 1.0, which can be found in the file LICENSE.QPL included in - * the packaging of this file. - * - * Alternatively, it may be distributed under the terms of the GNU General - * Public License, either version 2 or 3, which can be found in the file - * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this - * file. - */ - -#import "OFApplication.h" - -OF_ASSUME_NONNULL_BEGIN - -@interface OTAppDelegate: OFObject -@end - -OF_ASSUME_NONNULL_END Index: src/test/OTAppDelegate.m ================================================================== --- src/test/OTAppDelegate.m +++ src/test/OTAppDelegate.m @@ -13,21 +13,24 @@ * file. */ #include "config.h" -#import "OTAppDelegate.h" - +#import "OFApplication.h" #import "OFColor.h" +#import "OFDictionary.h" #import "OFMethodSignature.h" #import "OFSet.h" #import "OFStdIOStream.h" #import "OFValue.h" #import "OTTestCase.h" #import "OTAssertionFailedException.h" + +@interface OTAppDelegate: OFObject +@end OF_APPLICATION_DELEGATE(OTAppDelegate) static bool isSubclassOfClass(Class class, Class superclass) @@ -162,15 +165,18 @@ - (void)applicationDidFinishLaunching: (OFNotification *)notification { OFSet OF_GENERIC(Class) *testClasses = [self testClasses]; size_t numSucceeded = 0, numFailed = 0; + OFMutableDictionary *summaries = [OFMutableDictionary dictionary]; [OFStdOut writeFormat: @"Running %zu test case(s)\n", testClasses.count]; for (Class class in testClasses) { + OFArray *summary; + [OFStdOut setForegroundColor: [OFColor teal]]; [OFStdOut writeFormat: @"Running ", class]; [OFStdOut setForegroundColor: [OFColor aqua]]; [OFStdOut writeFormat: @"%@\n", class]; [OFStdOut reset]; @@ -231,10 +237,30 @@ } else numFailed++; objc_autoreleasePoolPop(pool); } + + summary = [class summary]; + if (summary != nil) + [summaries setObject: summary forKey: class]; + } + + for (Class class in summaries) { + OFArray *summary = [summaries objectForKey: class]; + + [OFStdOut setForegroundColor: [OFColor teal]]; + [OFStdOut writeString: @"Summary for "]; + [OFStdOut setForegroundColor: [OFColor aqua]]; + [OFStdOut writeFormat: @"%@\n", class]; + + for (OFPair *line in summary) { + [OFStdOut setForegroundColor: [OFColor navy]]; + [OFStdOut writeFormat: @"%@: ", line.firstObject]; + [OFStdOut setForegroundColor: [OFColor blue]]; + [OFStdOut writeFormat: @"%@\n", line.secondObject]; + } } [OFStdOut setForegroundColor: [OFColor fuchsia]]; [OFStdOut writeFormat: @"%zu", numSucceeded]; [OFStdOut setForegroundColor: [OFColor purple]]; Index: src/test/OTTestCase.h ================================================================== --- src/test/OTTestCase.h +++ src/test/OTTestCase.h @@ -12,18 +12,24 @@ * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #ifdef OBJFWTEST_LOCAL_INCLUDES -# import "OFObject.h" +# import "ObjFW.h" #else -# import +# import #endif OF_ASSUME_NONNULL_BEGIN @interface OTTestCase: OFObject +#ifdef OF_HAVE_CLASS_PROPERTIES +@property (class, readonly, nullable, nonatomic) + OFArray OF_GENERIC(OFPair OF_GENERIC(OFString *, id) *) *summary; +#endif + ++ (nullable OFArray OF_GENERIC(OFPair OF_GENERIC(OFString *, id) *) *)summary; - (void)setUp; - (void)tearDown; @end OF_ASSUME_NONNULL_END Index: src/test/OTTestCase.m ================================================================== --- src/test/OTTestCase.m +++ src/test/OTTestCase.m @@ -16,13 +16,18 @@ #include "config.h" #import "OTTestCase.h" @implementation OTTestCase: OFObject ++ (OFArray OF_GENERIC(OFPair OF_GENERIC(OFString *, id) *) *)summary +{ + return nil; +} + - (void)setUp { } - (void)tearDown { } @end Index: tests/Makefile ================================================================== --- tests/Makefile +++ tests/Makefile @@ -22,11 +22,10 @@ OFMemoryStreamTests.m \ OFNotificationCenterTests.m \ OFObjectTests.m \ OFStreamTests.m \ OFStringTests.m \ - OFSystemInfoTests.m \ OFValueTests.m \ OFXMLElementBuilderTests.m \ OFXMLNodeTests.m \ OFXMLParserTests.m \ RuntimeTests.m \ DELETED tests/OFSystemInfoTests.m Index: tests/OFSystemInfoTests.m ================================================================== --- tests/OFSystemInfoTests.m +++ tests/OFSystemInfoTests.m @@ -1,263 +0,0 @@ -/* - * Copyright (c) 2008-2024 Jonathan Schleifer - * - * All rights reserved. - * - * This file is part of ObjFW. It may be distributed under the terms of the - * Q Public License 1.0, which can be found in the file LICENSE.QPL included in - * the packaging of this file. - * - * Alternatively, it may be distributed under the terms of the GNU General - * Public License, either version 2 or 3, which can be found in the file - * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this - * file. - */ - -#include "config.h" - -#import "TestsAppDelegate.h" - -#ifdef OF_HAVE_SOCKETS -static void -printAddresses(OFData *addresses, bool *firstAddress) -{ - size_t count = addresses.count; - - for (size_t i = 0; i < count; i++) { - const OFSocketAddress *address = [addresses itemAtIndex: i]; - - if (!*firstAddress) - [OFStdOut writeString: @", "]; - - *firstAddress = false; - - [OFStdOut writeString: OFSocketAddressString(address)]; - } -} -#endif - -@implementation TestsAppDelegate (OFSystemInfoTests) -- (void)systemInfoTests -{ - void *pool = objc_autoreleasePoolPush(); -#ifdef OF_HAVE_SOCKETS - OFDictionary *networkInterfaces; - bool firstInterface = true; -#endif - - [OFStdOut setForegroundColor: [OFColor lime]]; - - [OFStdOut writeFormat: @"[OFSystemInfo] Page size: %zd\n", - [OFSystemInfo pageSize]]; - - [OFStdOut writeFormat: @"[OFSystemInfo] Number of CPUs: %zd\n", - [OFSystemInfo numberOfCPUs]]; - - [OFStdOut writeFormat: @"[OFSystemInfo] ObjFW version: %@\n", - [OFSystemInfo ObjFWVersion]]; - - [OFStdOut writeFormat: @"[OFSystemInfo] ObjFW version major: %u\n", - [OFSystemInfo ObjFWVersionMajor]]; - - [OFStdOut writeFormat: @"[OFSystemInfo] ObjFW version minor: %u\n", - [OFSystemInfo ObjFWVersionMinor]]; - - [OFStdOut writeFormat: @"[OFSystemInfo] Operating system name: %@\n", - [OFSystemInfo operatingSystemName]]; - - [OFStdOut writeFormat: - @"[OFSystemInfo] Operating system version: %@\n", - [OFSystemInfo operatingSystemVersion]]; - - [OFStdOut writeFormat: @"[OFSystemInfo] User config IRI: %@\n", - [OFSystemInfo userConfigIRI].string]; - - [OFStdOut writeFormat: @"[OFSystemInfo] User data IRI: %@\n", - [OFSystemInfo userDataIRI].string]; - - [OFStdOut writeFormat: @"[OFSystemInfo] Temporary directory IRI: %@\n", - [OFSystemInfo temporaryDirectoryIRI].string]; - - [OFStdOut writeFormat: @"[OFSystemInfo] CPU vendor: %@\n", - [OFSystemInfo CPUVendor]]; - - [OFStdOut writeFormat: @"[OFSystemInfo] CPU model: %@\n", - [OFSystemInfo CPUModel]]; - -#if defined(OF_AMD64) || defined(OF_X86) - [OFStdOut writeFormat: @"[OFSystemInfo] Supports MMX: %d\n", - [OFSystemInfo supportsMMX]]; - - [OFStdOut writeFormat: @"[OFSystemInfo] Supports 3DNow!: %d\n", - [OFSystemInfo supports3DNow]]; - - [OFStdOut writeFormat: @"[OFSystemInfo] Supports enhanced 3DNow!: %d\n", - [OFSystemInfo supportsEnhanced3DNow]]; - - [OFStdOut writeFormat: @"[OFSystemInfo] Supports SSE: %d\n", - [OFSystemInfo supportsSSE]]; - - [OFStdOut writeFormat: @"[OFSystemInfo] Supports SSE2: %d\n", - [OFSystemInfo supportsSSE2]]; - - [OFStdOut writeFormat: @"[OFSystemInfo] Supports SSE3: %d\n", - [OFSystemInfo supportsSSE3]]; - - [OFStdOut writeFormat: @"[OFSystemInfo] Supports SSSE3: %d\n", - [OFSystemInfo supportsSSSE3]]; - - [OFStdOut writeFormat: @"[OFSystemInfo] Supports SSE4.1: %d\n", - [OFSystemInfo supportsSSE41]]; - - [OFStdOut writeFormat: @"[OFSystemInfo] Supports SSE4.2: %d\n", - [OFSystemInfo supportsSSE42]]; - - [OFStdOut writeFormat: @"[OFSystemInfo] Supports AVX: %d\n", - [OFSystemInfo supportsAVX]]; - - [OFStdOut writeFormat: @"[OFSystemInfo] Supports AVX2: %d\n", - [OFSystemInfo supportsAVX2]]; - - [OFStdOut writeFormat: @"[OFSystemInfo] Supports AES-NI: %d\n", - [OFSystemInfo supportsAESNI]]; - - [OFStdOut writeFormat: @"[OFSystemInfo] Supports SHA extensions: %d\n", - [OFSystemInfo supportsSHAExtensions]]; - - [OFStdOut writeFormat: @"[OFSystemInfo] Supports fused multiply-add: " - @"%d\n", - [OFSystemInfo supportsFusedMultiplyAdd]]; - - [OFStdOut writeFormat: @"[OFSystemInfo] Supports F16C: %d\n", - [OFSystemInfo supportsF16C]]; - - [OFStdOut writeFormat: - @"[OFSystemInfo] Supports AVX-512 Foundation: %d\n", - [OFSystemInfo supportsAVX512Foundation]]; - - [OFStdOut writeFormat: - @"[OFSystemInfo] Supports AVX-512 Conflict Detection Instructions: " - @"%d\n", - [OFSystemInfo supportsAVX512ConflictDetectionInstructions]]; - - [OFStdOut writeFormat: - @"[OFSystemInfo] Supports AVX-512 Exponential and Reciprocal " - @"Instructions: %d\n", - [OFSystemInfo supportsAVX512ExponentialAndReciprocalInstructions]]; - - [OFStdOut writeFormat: - @"[OFSystemInfo] Supports AVX-512 Prefetch Instructions: %d\n", - [OFSystemInfo supportsAVX512PrefetchInstructions]]; - - [OFStdOut writeFormat: - @"[OFSystemInfo] Supports AVX-512 Vector Length Extensions: %d\n", - [OFSystemInfo supportsAVX512VectorLengthExtensions]]; - - [OFStdOut writeFormat: - @"[OFSystemInfo] Supports AVX-512 Doubleword and Quadword " - @"Instructions: %d\n", - [OFSystemInfo supportsAVX512DoublewordAndQuadwordInstructions]]; - - [OFStdOut writeFormat: - @"[OFSystemInfo] Supports AVX-512 Byte and Word Instructions: %d\n", - [OFSystemInfo supportsAVX512ByteAndWordInstructions]]; - - [OFStdOut writeFormat: - @"[OFSystemInfo] Supports AVX-512 Integer Fused Multiply Add: %d\n", - [OFSystemInfo supportsAVX512IntegerFusedMultiplyAdd]]; - - [OFStdOut writeFormat: - @"[OFSystemInfo] Supports AVX-512 Vector Byte Manipulation " - @"Instructions: %d\n", - [OFSystemInfo supportsAVX512VectorByteManipulationInstructions]]; - - [OFStdOut writeFormat: - @"[OFSystemInfo] Supports AVX-512 Vector Population Count " - @"Instruction: %d\n", - [OFSystemInfo supportsAVX512VectorPopulationCountInstruction]]; - - [OFStdOut writeFormat: - @"[OFSystemInfo] Supports AVX-512 Vector Neutral Network " - @"Instructions: %d\n", - [OFSystemInfo supportsAVX512VectorNeuralNetworkInstructions]]; - - [OFStdOut writeFormat: - @"[OFSystemInfo] Supports AVX-512 Vector Byte Manipulation " - @"Instructions 2: %d\n", - [OFSystemInfo supportsAVX512VectorByteManipulationInstructions2]]; - - [OFStdOut writeFormat: - @"[OFSystemInfo] Supports AVX-512 Bit Algorithms: %d\n", - [OFSystemInfo supportsAVX512BitAlgorithms]]; - - [OFStdOut writeFormat: - @"[OFSystemInfo] Supports AVX-512 Float16 Instructions: %d\n", - [OFSystemInfo supportsAVX512Float16Instructions]]; - - [OFStdOut writeFormat: - @"[OFSystemInfo] Supports AVX-512 BFloat16 Instructions: %d\n", - [OFSystemInfo supportsAVX512BFloat16Instructions]]; -#endif - -#ifdef OF_POWERPC - [OFStdOut writeFormat: @"[OFSystemInfo] Supports AltiVec: %d\n", - [OFSystemInfo supportsAltiVec]]; -#endif - -#ifdef OF_HAVE_SOCKETS - networkInterfaces = [OFSystemInfo networkInterfaces]; - [OFStdOut writeString: @"[OFSystemInfo] Network interfaces: "]; - for (OFString *name in networkInterfaces) { - bool firstAddress = true; - OFNetworkInterface interface; - OFData *hardwareAddress; - - if (!firstInterface) - [OFStdOut writeString: @"; "]; - - firstInterface = false; - - [OFStdOut writeFormat: @"%@(", name]; - - interface = [networkInterfaces objectForKey: name]; - - printAddresses([interface objectForKey: - OFNetworkInterfaceIPv4Addresses], &firstAddress); -# ifdef OF_HAVE_IPV6 - printAddresses([interface objectForKey: - OFNetworkInterfaceIPv6Addresses], &firstAddress); -# endif -# ifdef OF_HAVE_IPX - printAddresses([interface objectForKey: - OFNetworkInterfaceIPXAddresses], &firstAddress); -# endif -# ifdef OF_HAVE_APPLETALK - printAddresses([interface objectForKey: - OFNetworkInterfaceAppleTalkAddresses], &firstAddress); -# endif - - hardwareAddress = [interface - objectForKey: OFNetworkInterfaceHardwareAddress]; - if (hardwareAddress != nil) { - const unsigned char *bytes = hardwareAddress.items; - size_t length = hardwareAddress.count; - - if (!firstAddress) - [OFStdOut writeString: @", "]; - - for (size_t i = 0; i < length; i++) { - if (i > 0) - [OFStdOut writeString: @":"]; - - [OFStdOut writeFormat: @"%02X", bytes[i]]; - } - } - - [OFStdOut writeString: @")"]; - } - [OFStdOut writeString: @"\n"]; -#endif - - objc_autoreleasePoolPop(pool); -} -@end Index: tests/TestsAppDelegate.h ================================================================== --- tests/TestsAppDelegate.h +++ tests/TestsAppDelegate.h @@ -137,14 +137,10 @@ @interface TestsAppDelegate (OFSPXStreamSocketTests) - (void)SPXStreamSocketTests; @end -@interface TestsAppDelegate (OFSystemInfoTests) -- (void)systemInfoTests; -@end - @interface TestsAppDelegate (OFStreamTests) - (void)streamTests; @end @interface TestsAppDelegate (OFStringTests) Index: tests/TestsAppDelegate.m ================================================================== --- tests/TestsAppDelegate.m +++ tests/TestsAppDelegate.m @@ -420,11 +420,10 @@ #endif #ifdef OF_HAVE_SOCKETS [self DNSResolverTests]; #endif - [self systemInfoTests]; [self localeTests]; [OFStdOut reset]; #if defined(OF_IOS)