Overview
Comment: | Migration of OFList tests to new testing framework. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
1d802bf56cdc333dac97ce32623c0d92 |
User & Date: | js on 2009-09-28 07:55:55 |
Other Links: | manifest | tags |
Context
2009-09-30
| ||
13:23 | Migration of OFTCPSocket tests to new testing framework. check-in: 67cf530ed3 user: js tags: trunk | |
2009-09-28
| ||
07:55 | Migration of OFList tests to new testing framework. check-in: 1d802bf56c user: js tags: trunk | |
2009-09-27
| ||
15:04 | Small documentation addendum. check-in: ada9f37216 user: js tags: trunk | |
Changes
Modified tests/Makefile from [fa107a94eb] to [65d045983b].
1 2 3 4 5 6 7 | include ../extra.mk SUBDIRS = OFDataArray \ OFHashes \ ${OFPLUGIN} \ OFTCPSocket \ OFThread \ | < | 1 2 3 4 5 6 7 8 9 10 11 12 | include ../extra.mk SUBDIRS = OFDataArray \ OFHashes \ ${OFPLUGIN} \ OFTCPSocket \ OFThread \ OFXMLElement \ OFXMLParser \ ${OBJC_SYNC} include ../buildsys.mk |
Deleted tests/OFList/Makefile version [e6690a0819].
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted tests/OFList/OFList.m version [c3c7e77f4a].
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Modified tests_new/Makefile from [11f3a0cee1] to [4ac30c970c].
1 2 3 4 5 6 7 8 9 10 | PROG_NOINST = tests${PROG_SUFFIX} SRCS = array.m \ dictionary.m \ main.m \ object.m \ string.m include ../buildsys.mk include ../extra.mk | > | 1 2 3 4 5 6 7 8 9 10 11 | PROG_NOINST = tests${PROG_SUFFIX} SRCS = array.m \ dictionary.m \ list.m \ main.m \ object.m \ string.m include ../buildsys.mk include ../extra.mk |
︙ | ︙ |
Added tests_new/list.m version [afc8552369].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | /* * Copyright (c) 2008 - 2009 * Jonathan Schleifer <js@webkeks.org> * * All rights reserved. * * This file is part of libobjfw. 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 "OFList.h" #import "OFAutoreleasePool.h" #import "OFString.h" #import "OFExceptions.h" #import "main.h" static OFString *module = @"OFList"; static OFString *strings[] = { @"Foo", @"Bar", @"Baz" }; void list_tests() { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; OFList *list; TEST(@"+[list]", (list = [OFList list])) TEST(@"-[append:]", [list append: strings[0]] && [list append: strings[1]] && [list append: strings[2]]) TEST(@"-[first]", [[list first]->object isEqual: strings[0]]) TEST(@"-[first]->next", [[list first]->next->object isEqual: strings[1]]) TEST(@"-[last]", [[list last]->object isEqual: strings[2]]) TEST(@"-[last]->prev", [[list last]->prev->object isEqual: strings[1]]) TEST(@"-[remove:]", [list remove: [list last]] && [[list last]->object isEqual: strings[1]] && [list remove: [list first]] && [[list first]->object isEqual: [list last]->object]) TEST(@"-[insert:before:]", [list insert: strings[0] before: [list last]] && [[list last]->prev->object isEqual: strings[0]]) TEST(@"-[insert:after:]", [list insert: strings[2] after: [list first]->next] && [[list last]->object isEqual: strings[2]]) TEST(@"-[count]", [list count] == 3) TEST(@"-[copy]", (list = [[list copy] autorelease]) && [[list first]->object isEqual: strings[0]] && [[list first]->next->object isEqual: strings[1]] && [[list last]->object isEqual: strings[2]]) TEST(@"-[isEqual:]", [list isEqual: [[list copy] autorelease]]) [pool release]; } |
Modified tests_new/main.m from [fe239efee7] to [6c72294cec].
︙ | ︙ | |||
17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #include <stdlib.h> #import "OFString.h" #import "OFAutoreleasePool.h" extern void array_tests(); extern void dictionary_tests(); extern void object_tests(); extern void string_tests(); static int fails = 0; static void output(OFString *str, int color) | > | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #include <stdlib.h> #import "OFString.h" #import "OFAutoreleasePool.h" extern void array_tests(); extern void dictionary_tests(); extern void list_tests(); extern void object_tests(); extern void string_tests(); static int fails = 0; static void output(OFString *str, int color) |
︙ | ︙ | |||
87 88 89 90 91 92 93 94 95 96 | int main() { object_tests(); string_tests(); array_tests(); dictionary_tests(); return fails; } | > | 88 89 90 91 92 93 94 95 96 97 98 | int main() { object_tests(); string_tests(); array_tests(); dictionary_tests(); list_tests(); return fails; } |