Overview
Comment: | Migration of OFArray tests to new testing framework. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
dbb0223586dc795fe7a49fa74166e09f |
User & Date: | js on 2009-09-27 11:42:06 |
Other Links: | manifest | tags |
Context
2009-09-27
| ||
14:23 | Add -[initWithFilePointer:] to OFFile. check-in: 3cf27e00c4 user: js tags: trunk | |
11:42 | Migration of OFArray tests to new testing framework. check-in: dbb0223586 user: js tags: trunk | |
2009-09-26
| ||
13:27 | Migration of OFDictionary tests to new testing framework. check-in: a3bfa21725 user: js tags: trunk | |
Changes
Modified tests/Makefile from [ec507306f8] to [fa107a94eb].
1 2 3 | include ../extra.mk SUBDIRS = OFDataArray \ | < | 1 2 3 4 5 6 7 8 9 10 11 12 13 | include ../extra.mk SUBDIRS = OFDataArray \ OFHashes \ ${OFPLUGIN} \ OFTCPSocket \ OFThread \ OFList \ OFXMLElement \ OFXMLParser \ ${OBJC_SYNC} include ../buildsys.mk |
Deleted tests/OFArray/Makefile version [a3d17e2555].
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Deleted tests/OFArray/OFArray.m version [0b105e4c04].
|
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < |
Modified tests_new/Makefile from [26538f9b0c] to [11f3a0cee1].
1 | PROG_NOINST = tests${PROG_SUFFIX} | > | | 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 |
︙ | ︙ |
Added tests_new/array.m version [765475729a].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | /* * 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 "OFArray.h" #import "OFAutoreleasePool.h" #import "OFString.h" #import "OFExceptions.h" #import "main.h" static OFString *module = @"OFArray"; static OFString *c_ary[] = { @"Foo", @"Bar", @"Baz", nil }; void array_tests() { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; OFArray *a[3]; TEST(@"+[array]", (a[0] = [OFMutableArray array])) TEST(@"+[arrayWithObjects:]", (a[1] = [OFArray arrayWithObjects: @"Foo", @"Bar", @"Baz", nil])) TEST(@"+[arrayWithCArray:]", (a[2] = [OFArray arrayWithCArray: c_ary])) TEST(@"-[addObject:]", [a[0] addObject: c_ary[0]] && [a[0] addObject: c_ary[1]] && [a[0] addObject: c_ary[2]]) TEST(@"-[count]", [a[0] count] == 3 && [a[1] count] == 3 && [a[2] count] == 3) TEST(@"-[isEqual:]", [a[0] isEqual: a[1]] && [a[1] isEqual: a[2]]) TEST(@"-[objectAtIndex:]", [[a[0] objectAtIndex: 0] isEqual: c_ary[0]] && [[a[0] objectAtIndex: 1] isEqual: c_ary[1]] && [[a[0] objectAtIndex: 2] isEqual: c_ary[2]] && [[a[1] objectAtIndex: 0] isEqual: c_ary[0]] && [[a[1] objectAtIndex: 1] isEqual: c_ary[1]] && [[a[1] objectAtIndex: 2] isEqual: c_ary[2]] && [[a[2] objectAtIndex: 0] isEqual: c_ary[0]] && [[a[2] objectAtIndex: 1] isEqual: c_ary[1]] && [[a[2] objectAtIndex: 2] isEqual: c_ary[2]]) TEST(@"-[removeNObjects:]", [a[0] removeNObjects: 2] && [a[0] count] == 1 && [[a[0] objectAtIndex: 0] isEqual: c_ary[0]]) EXPECT_EXCEPTION(@"Detect out of range in -[objectAtIndex:]", OFOutOfRangeException, [a[0] objectAtIndex: 1]) [pool release]; } |
Modified tests_new/main.m from [f044fa8a49] to [fe239efee7].
︙ | ︙ | |||
15 16 17 18 19 20 21 22 23 24 25 26 27 28 | #include <stdio.h> #endif #include <stdlib.h> #import "OFString.h" #import "OFAutoreleasePool.h" extern void dictionary_tests(); extern void object_tests(); extern void string_tests(); static int fails = 0; static void | > | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | #include <stdio.h> #endif #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 |
︙ | ︙ | |||
84 85 86 87 88 89 90 91 92 93 94 | } int main() { object_tests(); string_tests(); dictionary_tests(); return fails; } | > | 85 86 87 88 89 90 91 92 93 94 95 96 | } int main() { object_tests(); string_tests(); array_tests(); dictionary_tests(); return fails; } |