ObjFW  Check-in [39cb19595d]

Overview
Comment:Add OFDate.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 39cb19595d1051d371a2bf911adbffb8a610ff333a685329a1b9dc5f24e25fd1
User & Date: js on 2010-12-25 19:31:43
Other Links: manifest | tags
Context
2010-12-25
23:29
Add +[OFFile modificationDateOfFile:] and change -[OFDate description]. check-in: 2d8533a428 user: js tags: trunk
19:31
Add OFDate. check-in: 39cb19595d user: js tags: trunk
14:48
Fix broken snprintf test.
This was broken by 60aa070105ac.
check-in: 5ebb07a3e4 user: js tags: trunk
Changes

Modified .hgignore from [0cbe01f9c4] to [fb4ec2287f].

16
17
18
19
20
21
22

23
24
25
26
27
28
29
30

config.h.in
config.log
config.status
configure
docs
extra.mk
generators/gen_tables

generators/CaseFolding.txt
generators/UnicodeData.txt
objfw-config
ObjFW.xcodeproj/*.mode1v3
ObjFW.xcodeproj/*.pbxuser
src/objfw-defs.h
src/ObjFW
tests/tests








>








>
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
config.h.in
config.log
config.status
configure
docs
extra.mk
generators/gen_tables
generators/gen_tables.exe
generators/CaseFolding.txt
generators/UnicodeData.txt
objfw-config
ObjFW.xcodeproj/*.mode1v3
ObjFW.xcodeproj/*.pbxuser
src/objfw-defs.h
src/ObjFW
tests/tests
tests/tests.exe

Modified configure.ac from [b48af55818] to [72341d46d1].

337
338
339
340
341
342
343




344
345
346
347
348
349
350
	AC_DEFINE(OF_ATOMIC_OPS, 1, [Whether we have atomic operations])
	AC_SUBST(ATOMIC_H, "atomic.h")
])
AC_MSG_RESULT($atomic_ops)

AC_CHECK_LIB(socket, socket, LIBS="$LIBS -lsocket")
AC_CHECK_LIB(ws2_32, main, LIBS="$LIBS -lws2_32")





AC_CHECK_HEADER(poll.h, [
	AC_DEFINE(OF_HAVE_POLL, 1, [Whether poll is supported])
])
AC_CHECK_HEADERS(sys/select.h, [
	AC_DEFINE(OF_HAVE_SYS_SELECT_H, 1, [Whether we have sys/select.h])
])







>
>
>
>







337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
	AC_DEFINE(OF_ATOMIC_OPS, 1, [Whether we have atomic operations])
	AC_SUBST(ATOMIC_H, "atomic.h")
])
AC_MSG_RESULT($atomic_ops)

AC_CHECK_LIB(socket, socket, LIBS="$LIBS -lsocket")
AC_CHECK_LIB(ws2_32, main, LIBS="$LIBS -lws2_32")

AC_CHECK_FUNC(gmtime_r, [
	AC_DEFINE(HAVE_GMTIME_R, 1, [Whether we have gmtime_r])
])

AC_CHECK_HEADER(poll.h, [
	AC_DEFINE(OF_HAVE_POLL, 1, [Whether poll is supported])
])
AC_CHECK_HEADERS(sys/select.h, [
	AC_DEFINE(OF_HAVE_SYS_SELECT_H, 1, [Whether we have sys/select.h])
])

Modified src/Makefile from [a18fe9b7a4] to [166d734b1c].

1
2
3
4
5
6
7
8
9
10
11
12
13

14
15
16
17
18
19
20
include ../extra.mk

LIB = ${OBJFW_SHARED_LIB}
LIB_MAJOR = ${OBJFW_LIB_MAJOR}
LIB_MINOR = ${OBJFW_LIB_MINOR}
STATIC_LIB = ${OBJFW_STATIC_LIB}

SRCS = OFApplication.m		\
       OFArray.m		\
       OFAutoreleasePool.m	\
       OFBlock.m		\
       OFConstantString.m	\
       OFDataArray.m		\

       OFDictionary.m		\
       OFExceptions.m		\
       OFFile.m			\
       OFHash.m			\
       OFEnumerator.m		\
       OFList.m			\
       OFMD5Hash.m		\













>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
include ../extra.mk

LIB = ${OBJFW_SHARED_LIB}
LIB_MAJOR = ${OBJFW_LIB_MAJOR}
LIB_MINOR = ${OBJFW_LIB_MINOR}
STATIC_LIB = ${OBJFW_STATIC_LIB}

SRCS = OFApplication.m		\
       OFArray.m		\
       OFAutoreleasePool.m	\
       OFBlock.m		\
       OFConstantString.m	\
       OFDataArray.m		\
       OFDate.m			\
       OFDictionary.m		\
       OFExceptions.m		\
       OFFile.m			\
       OFHash.m			\
       OFEnumerator.m		\
       OFList.m			\
       OFMD5Hash.m		\

Added src/OFDate.h version [c40f1e470a].











































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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
/*
 * Copyright (c) 2008 - 2010
 *   Jonathan Schleifer <js@webkeks.org>
 *
 * 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 included in
 * the packaging of this file.
 */

#include <sys/time.h>

#import "OFObject.h"

#ifdef __MINGW32__
/*
 * They think they don't need suseconds_t and can use long instead in
 * struct timeval... POSIX demands suseconds_t, of course.
 */
typedef long suseconds_t;
#endif

/**
 * \brief A class for storing, accessing and comparing dates.
 */
@interface OFDate: OFObject <OFCopying, OFComparing>
{
	time_t sec;
	suseconds_t usec;
}

/**
 * \return A new, autoreleased OFDate with the current date and time
 */
+ date;

/**
 * \param sec The seconds since 1970-01-01 00:00:00
 * \return A new, autoreleased OFDate with the specified date and time
 */
+ dateWithTimeIntervalSince1970: (time_t)sec;

/**
 * \param sec The seconds since 1970-01-01 00:00:00
 * \param usec The microsecond part of the time
 * \return A new, autoreleased OFDate with the specified date and time
 */
+ dateWithTimeIntervalSince1970: (time_t)sec
		   microseconds: (suseconds_t)usec;

/**
 * Initializes an already allocated OFDate with the specified date and time.
 *
 * \param sec The seconds since 1970-01-01 00:00:00
 * \return An initialized OFDate with the specified date and time
 */
- initWithTimeIntervalSince1970: (time_t)sec;

/**
 * Initializes an already allocated OFDate with the specified date and time.
 *
 * \param sec The seconds since 1970-01-01 00:00:00
 * \param usec The microsecond part of the time
 * \return An initialized OFDate with the specified date and time
 */
- initWithTimeIntervalSince1970: (time_t)sec
		   microseconds: (suseconds_t)usec;
@end

Added src/OFDate.m version [d05453646d].





















































































































































































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
/*
 * Copyright (c) 2008 - 2010
 *   Jonathan Schleifer <js@webkeks.org>
 *
 * 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 included in
 * the packaging of this file.
 */

#include "config.h"

#include <time.h>

#include <sys/time.h>

#import "OFDate.h"
#import "OFString.h"
#import "OFExceptions.h"

#if !defined(HAVE_GMTIME_R) && defined(OF_THREADS)
# import "OFThread.h"

static OFMutex *mutex;
#endif

@implementation OFDate
#if !defined(HAVE_GMTIME_R) && defined(OF_THREADS)
+ (void)initialize
{
	if (self == [OFDate class])
		mutex = [[OFMutex alloc] init];
}
#endif

+ date
{
	return [[[self alloc] init] autorelease];
}

+ dateWithTimeIntervalSince1970: (time_t)sec
{
	return [[[self alloc] initWithTimeIntervalSince1970: sec] autorelease];
}

+ dateWithTimeIntervalSince1970: (time_t)sec
		   microseconds: (suseconds_t)usec
{
	return [[[self alloc] initWithTimeIntervalSince1970: sec
					       microseconds: usec] autorelease];
}

- init
{
	struct timeval t;

	if (gettimeofday(&t, NULL)) {
		Class c = isa;
		[self release];
		@throw [OFInitializationFailedException newWithClass: c];
	}

	return [self initWithTimeIntervalSince1970: t.tv_sec
				      microseconds: t.tv_usec];
}

- initWithTimeIntervalSince1970: (time_t)sec_
{
	return [self initWithTimeIntervalSince1970: sec_
				      microseconds: 0];
}

- initWithTimeIntervalSince1970: (time_t)sec_
		   microseconds: (suseconds_t)usec_
{
	self = [super init];

	sec = sec_;
	usec = usec_;

	return self;
}

- (BOOL)isEqual: (id)obj
{
	if (![obj isKindOfClass: [OFDate class]])
		return NO;
	if (((OFDate*)obj)->sec != sec || ((OFDate*)obj)->usec != usec)
		return NO;

	return YES;
}

- copy
{
	return [self retain];
}

- (of_comparison_result_t)compare: (id)obj
{
	if (![obj isKindOfClass: [OFDate class]])
		@throw [OFInvalidArgumentException newWithClass: isa
						       selector: _cmd];

	if (sec < ((OFDate*)obj)->sec)
		return OF_ORDERED_ASCENDING;
	if (sec > ((OFDate*)obj)->sec)
		return OF_ORDERED_DESCENDING;

	if (usec < ((OFDate*)obj)->usec)
		return OF_ORDERED_ASCENDING;
	if (usec > ((OFDate*)obj)->usec)
		return OF_ORDERED_DESCENDING;

	return OF_ORDERED_SAME;
}

- (OFString*)description
{
	char str[20];	/* YYYY-MM-DD hh:mm:ss */

#ifdef HAVE_GMTIME_R
	struct tm tm;

	if (gmtime_r(&sec, &tm) == NULL)
		@throw [OFOutOfRangeException newWithClass: isa];

	strftime(str, 20, "%Y-%m-%d %H:%M:%S", &tm);
#else
	struct tm *tm;

# ifdef OF_THREADS
	[mutex lock];

	@try {
# endif
		if ((tm = gmtime(&sec)) == NULL)
			@throw [OFOutOfRangeException newWithClass: isa];

		strftime(str, 20, "%Y-%m-%d %H:%M:%S", tm);
# ifdef OF_THREADS
	} @finally {
		[mutex unlock];
	}
# endif
#endif

	if (usec == 0)
		return [OFString stringWithFormat: @"%sZ", str];

	return [OFString stringWithFormat: @"%s.%06dZ", str, usec];
}
@end

Modified src/ObjFW.h from [b6d3c640b8] to [392c80aa74].

23
24
25
26
27
28
29

30
31
32
33
34
35
36

#import "OFList.h"

#import "OFDictionary.h"
#import "OFEnumerator.h"

#import "OFNumber.h"


#import "OFStream.h"
#import "OFStreamObserver.h"

#import "OFFile.h"

#import "OFStreamSocket.h"







>







23
24
25
26
27
28
29
30
31
32
33
34
35
36
37

#import "OFList.h"

#import "OFDictionary.h"
#import "OFEnumerator.h"

#import "OFNumber.h"
#import "OFDate.h"

#import "OFStream.h"
#import "OFStreamObserver.h"

#import "OFFile.h"

#import "OFStreamSocket.h"

Modified tests/Makefile from [9471e121b4] to [0d381940f6].

1
2
3
4
5
6
7
8

9
10
11
12
13
14
15
include ../extra.mk

SUBDIRS = ${TESTPLUGIN}

PROG_NOINST = tests${PROG_SUFFIX}
SRCS = OFArrayTests.m			\
       ${OFBLOCKTESTS_M}		\
       OFDataArrayTests.m		\

       OFDictionaryTests.m		\
       OFFileTests.m			\
       OFListTests.m			\
       OFMD5HashTests.m			\
       OFNumberTests.m			\
       OFObjectTests.m			\
       ${OFPLUGINTESTS_M}		\








>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
include ../extra.mk

SUBDIRS = ${TESTPLUGIN}

PROG_NOINST = tests${PROG_SUFFIX}
SRCS = OFArrayTests.m			\
       ${OFBLOCKTESTS_M}		\
       OFDataArrayTests.m		\
       OFDateTests.m			\
       OFDictionaryTests.m		\
       OFFileTests.m			\
       OFListTests.m			\
       OFMD5HashTests.m			\
       OFNumberTests.m			\
       OFObjectTests.m			\
       ${OFPLUGINTESTS_M}		\

Modified tests/OFArrayTests.m from [284bdfc798] to [0481947edb].

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
 * Q Public License 1.0, which can be found in the file LICENSE included in
 * the packaging of this file.
 */

#include "config.h"

#import "OFArray.h"
#import "OFAutoreleasePool.h"
#import "OFString.h"
#import "OFExceptions.h"

#import "TestsAppDelegate.h"

static OFString *module = @"OFArray";
static OFString *c_ary[] = {
	@"Foo",







|
|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
 * Q Public License 1.0, which can be found in the file LICENSE included in
 * the packaging of this file.
 */

#include "config.h"

#import "OFArray.h"
#import "OFString.h"
#import "OFAutoreleasePool.h"
#import "OFExceptions.h"

#import "TestsAppDelegate.h"

static OFString *module = @"OFArray";
static OFString *c_ary[] = {
	@"Foo",

Modified tests/OFBlockTests.m from [e76b67d1d2] to [a7923e2912].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*
 * Copyright (c) 2008 - 2010
 *   Jonathan Schleifer <js@webkeks.org>
 *
 * 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 included in
 * the packaging of this file.
 */

#include "config.h"

#import "OFString.h"
#import "OFBlock.h"
#import "OFAutoreleasePool.h"
#import "OFExceptions.h"

#if defined(OF_OBJFW_RUNTIME)
# include <objfw-rt.h>
#elif defined(OF_OLD_GNU_RUNTIME)
# include <objc/objc-api.h>













|
|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*
 * Copyright (c) 2008 - 2010
 *   Jonathan Schleifer <js@webkeks.org>
 *
 * 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 included in
 * the packaging of this file.
 */

#include "config.h"

#import "OFBlock.h"
#import "OFString.h"
#import "OFAutoreleasePool.h"
#import "OFExceptions.h"

#if defined(OF_OBJFW_RUNTIME)
# include <objfw-rt.h>
#elif defined(OF_OLD_GNU_RUNTIME)
# include <objc/objc-api.h>

Modified tests/OFDataArrayTests.m from [9023f5f95e] to [bf15779d8e].

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 */

#include "config.h"

#include <string.h>

#import "OFDataArray.h"
#import "OFAutoreleasePool.h"
#import "OFString.h"
#import "OFExceptions.h"

#import "TestsAppDelegate.h"

static OFString *module;
const char *str = "Hello!";








|
|







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 */

#include "config.h"

#include <string.h>

#import "OFDataArray.h"
#import "OFString.h"
#import "OFAutoreleasePool.h"
#import "OFExceptions.h"

#import "TestsAppDelegate.h"

static OFString *module;
const char *str = "Hello!";

Added tests/OFDateTests.m version [02c7704541].

































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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
/*
 * Copyright (c) 2008 - 2010
 *   Jonathan Schleifer <js@webkeks.org>
 *
 * 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 included in
 * the packaging of this file.
 */

#include "config.h"

#import "OFDate.h"
#import "OFString.h"
#import "OFAutoreleasePool.h"

#import "TestsAppDelegate.h"

static OFString *module = @"OFDate";

@implementation TestsAppDelegate (OFDateTests)
- (void)dateTests
{
	OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
	OFDate *d1, *d2;

	TEST(@"+[dateWithTimeIntervalSince1970:]",
	    (d1 = [OFDate dateWithTimeIntervalSince1970: 0]))

	TEST(@"+[dateWithTimeIntervalSince1970:microseconds:",
	    (d2 = [OFDate dateWithTimeIntervalSince1970: 3600 * 25 + 5
					   microseconds: 1]))

	TEST(@"-[description]",
	    [[d1 description] isEqual: @"1970-01-01 00:00:00Z"] &&
	    [[d2 description] isEqual: @"1970-01-02 01:00:05.000001Z"])

	TEST(@"-[isEqual:]",
	    [d1 isEqual: [OFDate dateWithTimeIntervalSince1970: 0]] &&
	    ![d1 isEqual: [OFDate dateWithTimeIntervalSince1970: 0
						   microseconds: 1]])

	TEST(@"-[compare:]", [d1 compare: d2] == OF_ORDERED_ASCENDING)

	[pool drain];
}
@end

Modified tests/OFDictionaryTests.m from [6e72394016] to [b151adf08e].

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
 * Q Public License 1.0, which can be found in the file LICENSE included in
 * the packaging of this file.
 */

#include "config.h"

#import "OFDictionary.h"
#import "OFArray.h"
#import "OFAutoreleasePool.h"
#import "OFString.h"
#import "OFExceptions.h"

#import "TestsAppDelegate.h"

static OFString *module = @"OFDictionary";
static OFString *keys[] = {
	@"key1",







|
|
|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
 * Q Public License 1.0, which can be found in the file LICENSE included in
 * the packaging of this file.
 */

#include "config.h"

#import "OFDictionary.h"
#import "OFString.h"
#import "OFArray.h"
#import "OFAutoreleasePool.h"
#import "OFExceptions.h"

#import "TestsAppDelegate.h"

static OFString *module = @"OFDictionary";
static OFString *keys[] = {
	@"key1",

Modified tests/OFFileTests.m from [1dc4ca2de6] to [656b112b9b].

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
 * Q Public License 1.0, which can be found in the file LICENSE included in
 * the packaging of this file.
 */

#include "config.h"

#import "OFFile.h"
#import "OFAutoreleasePool.h"
#import "OFString.h"
#import "OFArray.h"
#import "OFExceptions.h"

#import "TestsAppDelegate.h"

static OFString *module = @"OFFile";








|
|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
 * Q Public License 1.0, which can be found in the file LICENSE included in
 * the packaging of this file.
 */

#include "config.h"

#import "OFFile.h"
#import "OFString.h"
#import "OFAutoreleasePool.h"
#import "OFArray.h"
#import "OFExceptions.h"

#import "TestsAppDelegate.h"

static OFString *module = @"OFFile";

Modified tests/OFListTests.m from [5d968fdd9a] to [54d7a78727].

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
 * Q Public License 1.0, which can be found in the file LICENSE included in
 * the packaging of this file.
 */

#include "config.h"

#import "OFList.h"
#import "OFAutoreleasePool.h"
#import "OFString.h"
#import "OFExceptions.h"

#import "TestsAppDelegate.h"

static OFString *module = @"OFList";
static OFString *strings[] = {
	@"Foo",







|
|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
 * Q Public License 1.0, which can be found in the file LICENSE included in
 * the packaging of this file.
 */

#include "config.h"

#import "OFList.h"
#import "OFString.h"
#import "OFAutoreleasePool.h"
#import "OFExceptions.h"

#import "TestsAppDelegate.h"

static OFString *module = @"OFList";
static OFString *strings[] = {
	@"Foo",

Modified tests/OFMD5HashTests.m from [a1e904da57] to [a53e31da0c].

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
 */

#include "config.h"

#include <string.h>

#import "OFMD5Hash.h"
#import "OFFile.h"
#import "OFAutoreleasePool.h"
#import "OFString.h"
#import "OFExceptions.h"

#import "TestsAppDelegate.h"

static OFString *module = @"OFMD5Hash";

const uint8_t testfile_md5[OF_MD5_DIGEST_SIZE] =







|
|
|







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
 */

#include "config.h"

#include <string.h>

#import "OFMD5Hash.h"
#import "OFString.h"
#import "OFFile.h"
#import "OFAutoreleasePool.h"
#import "OFExceptions.h"

#import "TestsAppDelegate.h"

static OFString *module = @"OFMD5Hash";

const uint8_t testfile_md5[OF_MD5_DIGEST_SIZE] =

Modified tests/OFPluginTests.m from [964d21d8c4] to [ae364528b5].

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
 * Q Public License 1.0, which can be found in the file LICENSE included in
 * the packaging of this file.
 */

#include "config.h"

#import "OFPlugin.h"
#import "OFAutoreleasePool.h"
#import "OFString.h"
#import "OFExceptions.h"

#import "TestsAppDelegate.h"

#import "plugin/TestPlugin.h"

static OFString *module = @"OFPlugin";








<

|







8
9
10
11
12
13
14

15
16
17
18
19
20
21
22
23
 * Q Public License 1.0, which can be found in the file LICENSE included in
 * the packaging of this file.
 */

#include "config.h"

#import "OFPlugin.h"

#import "OFString.h"
#import "OFAutoreleasePool.h"

#import "TestsAppDelegate.h"

#import "plugin/TestPlugin.h"

static OFString *module = @"OFPlugin";

Modified tests/OFSHA1HashTests.m from [3b66f80231] to [888022ac88].

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
 */

#include "config.h"

#include <string.h>

#import "OFSHA1Hash.h"
#import "OFFile.h"
#import "OFAutoreleasePool.h"
#import "OFString.h"
#import "OFExceptions.h"

#import "TestsAppDelegate.h"

static OFString *module = @"OFHash";

const uint8_t testfile_sha1[OF_SHA1_DIGEST_SIZE] =







|
|
|







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
 */

#include "config.h"

#include <string.h>

#import "OFSHA1Hash.h"
#import "OFString.h"
#import "OFFile.h"
#import "OFAutoreleasePool.h"
#import "OFExceptions.h"

#import "TestsAppDelegate.h"

static OFString *module = @"OFHash";

const uint8_t testfile_sha1[OF_SHA1_DIGEST_SIZE] =

Modified tests/OFStreamTests.m from [6e872e9aa9] to [e09114dec9].

9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
 * the packaging of this file.
 */

#include "config.h"

#include <string.h>

#import "OFString.h"
#import "OFStream.h"
#import "OFAutoreleasePool.h"

#import "TestsAppDelegate.h"

static OFString *module = @"OFStream";

@interface StreamTester: OFStream







|
|







9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
 * the packaging of this file.
 */

#include "config.h"

#include <string.h>

#import "OFStream.h"
#import "OFString.h"
#import "OFAutoreleasePool.h"

#import "TestsAppDelegate.h"

static OFString *module = @"OFStream";

@interface StreamTester: OFStream

Modified tests/OFTCPSocketTests.m from [ea1bb29bbd] to [4906c17743].

12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include "config.h"

#include <stdlib.h>
#include <string.h>
#include <time.h>

#import "OFTCPSocket.h"
#import "OFAutoreleasePool.h"
#import "OFString.h"
#import "OFExceptions.h"
#import "macros.h"

#import "TestsAppDelegate.h"

static OFString *module = @"OFTCPSocket";








|
|







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include "config.h"

#include <stdlib.h>
#include <string.h>
#include <time.h>

#import "OFTCPSocket.h"
#import "OFString.h"
#import "OFAutoreleasePool.h"
#import "OFExceptions.h"
#import "macros.h"

#import "TestsAppDelegate.h"

static OFString *module = @"OFTCPSocket";

Modified tests/OFThreadTests.m from [c4069ad79c] to [8364025882].

8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
 * Q Public License 1.0, which can be found in the file LICENSE included in
 * the packaging of this file.
 */

#include "config.h"

#import "OFThread.h"
#import "OFAutoreleasePool.h"
#import "OFString.h"
#import "OFExceptions.h"

#import "TestsAppDelegate.h"

static OFString *module = @"OFThread";

@interface TestThread: OFThread







|
|







8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
 * Q Public License 1.0, which can be found in the file LICENSE included in
 * the packaging of this file.
 */

#include "config.h"

#import "OFThread.h"
#import "OFString.h"
#import "OFAutoreleasePool.h"
#import "OFExceptions.h"

#import "TestsAppDelegate.h"

static OFString *module = @"OFThread";

@interface TestThread: OFThread

Modified tests/OFXMLElementTests.m from [5a91def578] to [99da37aae1].

11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

#include "config.h"

#import "OFXMLElement.h"
#import "OFString.h"
#import "OFArray.h"
#import "OFAutoreleasePool.h"
#import "OFString.h"
#import "OFExceptions.h"

#import "TestsAppDelegate.h"

static OFString *module = @"OFXMLElement";

@implementation TestsAppDelegate (OFXMLElementTests)







<







11
12
13
14
15
16
17

18
19
20
21
22
23
24

#include "config.h"

#import "OFXMLElement.h"
#import "OFString.h"
#import "OFArray.h"
#import "OFAutoreleasePool.h"

#import "OFExceptions.h"

#import "TestsAppDelegate.h"

static OFString *module = @"OFXMLElement";

@implementation TestsAppDelegate (OFXMLElementTests)

Modified tests/OFXMLParserTests.m from [b0b9d9cd30] to [6c87c08778].

14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <stdlib.h>
#include <string.h>

#import "OFXMLParser.h"
#import "OFString.h"
#import "OFArray.h"
#import "OFAutoreleasePool.h"
#import "OFString.h"
#import "OFExceptions.h"

#import "TestsAppDelegate.h"

static OFString *module = @"OFXMLParser";
static OFXMLParser *parser;
static int i = 0;







<







14
15
16
17
18
19
20

21
22
23
24
25
26
27
#include <stdlib.h>
#include <string.h>

#import "OFXMLParser.h"
#import "OFString.h"
#import "OFArray.h"
#import "OFAutoreleasePool.h"

#import "OFExceptions.h"

#import "TestsAppDelegate.h"

static OFString *module = @"OFXMLParser";
static OFXMLParser *parser;
static int i = 0;

Modified tests/TestsAppDelegate.h from [4c6e17c535] to [2ac7771cef].

75
76
77
78
79
80
81




82
83
84
85
86
87
88
@interface TestsAppDelegate (OFBlockTests)
- (void)blockTests;
@end

@interface TestsAppDelegate (OFDataArrayTests)
- (void)dataArrayTests;
@end





@interface TestsAppDelegate (OFDictionaryTests)
- (void)dictionaryTests;
@end

@interface TestsAppDelegate (OFFileTests)
- (void)fileTests;







>
>
>
>







75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
@interface TestsAppDelegate (OFBlockTests)
- (void)blockTests;
@end

@interface TestsAppDelegate (OFDataArrayTests)
- (void)dataArrayTests;
@end

@interface TestsAppDelegate (OFDateTests)
- (void)dateTests;
@end

@interface TestsAppDelegate (OFDictionaryTests)
- (void)dictionaryTests;
@end

@interface TestsAppDelegate (OFFileTests)
- (void)fileTests;

Modified tests/TestsAppDelegate.m from [0af66a545f] to [5ced896949].

84
85
86
87
88
89
90

91
92
93
94
95
96
97
	[self fileTests];
	[self MD5HashTests];
	[self SHA1HashTests];
	[self dataArrayTests];
	[self arrayTests];
	[self dictionaryTests];
	[self listTests];

	[self numberTests];
	[self streamTests];
	[self TCPSocketTests];
#ifdef OF_THREADS
	[self threadTests];
#endif
	[self XMLElementTests];







>







84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
	[self fileTests];
	[self MD5HashTests];
	[self SHA1HashTests];
	[self dataArrayTests];
	[self arrayTests];
	[self dictionaryTests];
	[self listTests];
	[self dateTests];
	[self numberTests];
	[self streamTests];
	[self TCPSocketTests];
#ifdef OF_THREADS
	[self threadTests];
#endif
	[self XMLElementTests];