Comment: | Make tests an OFApplicationDelegate. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
666d38f8be35c127d58c24977b13d09c |
User & Date: | js on 2010-04-07 20:56:48 |
Other Links: | manifest | tags |
2010-04-07
| ||
21:06 | Rename tests files so they are named after the category they implement. check-in: 7bbce47bda user: js tags: trunk | |
20:56 | Make tests an OFApplicationDelegate. check-in: 666d38f8be user: js tags: trunk | |
19:55 | Add OFApplication. check-in: f034850a98 user: js tags: trunk | |
Modified tests/Makefile from [83972f22ab] to [be540c194d].
1 2 3 4 5 | 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 | - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - + + | include ../extra.mk SUBDIRS = ${TESTPLUGIN} PROG_NOINST = tests${PROG_SUFFIX} |
︙ |
Modified tests/OFArray.m from [793d53e296] to [004dd7f704].
︙ | |||
12 13 14 15 16 17 18 | 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 | - + - - + + | #include "config.h" #import "OFArray.h" #import "OFAutoreleasePool.h" #import "OFString.h" #import "OFExceptions.h" |
︙ | |||
185 186 187 188 189 190 191 | 185 186 187 188 189 190 191 192 | + | TEST(@"Detection of mutation during Fast Enumeration", ok) [m[0] removeNObjects: 1]; #endif [pool drain]; } @end |
Modified tests/OFDataArray.m from [f55dde2843] to [106dfbcd0f].
︙ | |||
14 15 16 17 18 19 20 | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | - + - - + + | #include <string.h> #import "OFDataArray.h" #import "OFAutoreleasePool.h" #import "OFString.h" #import "OFExceptions.h" |
︙ | |||
107 108 109 110 111 112 113 | 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | - + - - + - + + | fromCArray: NULL]) EXPECT_EXCEPTION(@"Detect out of range in -[removeNItems:]", OFOutOfRangeException, [array[0] removeNItems: [array[0] count] + 1]) } |
Modified tests/OFDictionary.m from [fc592aae5a] to [3031e7357f].
︙ | |||
13 14 15 16 17 18 19 | 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 | - + - - + + | #import "OFDictionary.h" #import "OFArray.h" #import "OFAutoreleasePool.h" #import "OFString.h" #import "OFExceptions.h" |
︙ | |||
146 147 148 149 150 151 152 | 146 147 148 149 150 151 152 153 | + | ![dict isEqual: dict2] && [dict setObject: values[0] forKey: keys[0]] && [dict isEqual: dict2]) [pool drain]; } @end |
Modified tests/OFHashes.m from [89c9cc43b6] to [9cfde3ad08].
︙ | |||
15 16 17 18 19 20 21 | 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 | - + - - + + | #import "OFHashes.h" #import "OFFile.h" #import "OFAutoreleasePool.h" #import "OFString.h" #import "OFExceptions.h" |
︙ | |||
62 63 64 65 66 67 68 | 62 63 64 65 66 67 68 69 | + | ofSize: 1]) EXPECT_EXCEPTION(@"Detect invalid call of -[updateWithBuffer] #2", OFHashAlreadyCalculatedException, [sha1 updateWithBuffer: "" ofSize: 1]) [pool drain]; } @end |
Modified tests/OFList.m from [de1fa087bb] to [20f31495db].
︙ | |||
12 13 14 15 16 17 18 | 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 | - + + - + - | #include "config.h" #import "OFList.h" #import "OFAutoreleasePool.h" #import "OFString.h" #import "OFExceptions.h" |
︙ | |||
66 67 68 69 70 71 72 | 66 67 68 69 70 71 72 73 | + | [[list first]->next->object isEqual: strings[1]] && [[list last]->object isEqual: strings[2]]) TEST(@"-[isEqual:]", [list isEqual: [[list copy] autorelease]]) [pool drain]; } @end |
Modified tests/OFNumber.m from [74f86e0a57] to [389ac325a5].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 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 | + - + - - + + | /* * 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 "OFNumber.h" #import "OFAutoreleasePool.h" |
︙ | |||
44 45 46 47 48 49 50 | 45 46 47 48 49 50 51 52 | + | [[num xor: [OFNumber numberWithInt: 123456831]] asInt] == 42) TEST(@"-[shiftRight:]", [[num shiftRight: [OFNumber numberWithInt: 8]] asInt] == 482253) [pool drain]; } @end |
Modified tests/OFObject.m from [e75c8eaf49] to [d56cd335e9].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 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 | + - + - - + + | /* * 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 "OFAutoreleasePool.h" #import "OFExceptions.h" |
︙ | |||
61 62 63 64 65 66 67 | 62 63 64 65 66 67 68 69 | + | EXPECT_EXCEPTION(@"Detect resizing of memory not allocated by object", OFMemoryNotPartOfObjectException, [obj resizeMemory: (void*)1 toSize: 1024]) [pool drain]; } @end |
Modified tests/OFPlugin.m from [1ac0553021] to [964d21d8c4].
︙ | |||
12 13 14 15 16 17 18 | 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 | - + - - + + + | #include "config.h" #import "OFPlugin.h" #import "OFAutoreleasePool.h" #import "OFString.h" #import "OFExceptions.h" |
Modified tests/OFStream.m from [eef8cfeb9a] to [f89e698465].
︙ | |||
9 10 11 12 13 14 15 16 17 18 | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | + - + | * the packaging of this file. */ #include "config.h" #include <string.h> #import "OFString.h" #import "OFStream.h" #import "OFAutoreleasePool.h" |
︙ | |||
55 56 57 58 59 60 61 | 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 | - - + + + | return of_pagesize; } return 0; } @end |
Modified tests/OFString.m from [6ebf6017ca] to [ac7e540eac].
︙ | |||
12 13 14 15 16 17 18 | 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 | - + - - + + | #include "config.h" #import "OFString.h" #import "OFArray.h" #import "OFAutoreleasePool.h" #import "OFExceptions.h" |
︙ | |||
337 338 339 340 341 342 343 | 337 338 339 340 341 342 343 344 | + | TEST(@"-[stringByXMLUnescapingWithHandler:]", (h = [[[EntityHandler alloc] init] autorelease]) && (s[0] = [@"x&foo;y" stringByXMLUnescapingWithHandler: h]) && [s[0] isEqual: @"xbary"]) [pool drain]; } @end |
Modified tests/OFTCPSocket.m from [32c7d0b2cf] to [0def59b121].
︙ | |||
17 18 19 20 21 22 23 | 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | - + + - + - | #import "OFTCPSocket.h" #import "OFAutoreleasePool.h" #import "OFString.h" #import "OFExceptions.h" #import "macros.h" |
︙ | |||
61 62 63 64 65 66 67 | 61 62 63 64 65 66 67 68 | + | TEST(@"-[readNBytes:intoBuffer:]", [accepted readNBytes: 6 intoBuffer: buf] && !memcmp(buf, "Hello!", 6)) [pool drain]; } @end |
Modified tests/OFThread.m from [003a442993] to [40840a8d67].
︙ | |||
12 13 14 15 16 17 18 | 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 | - + - - + + + | #include "config.h" #import "OFThread.h" #import "OFAutoreleasePool.h" #import "OFString.h" #import "OFExceptions.h" |
Modified tests/OFXMLElement.m from [919f0bd4ed] to [df22df1a10].
︙ | |||
14 15 16 17 18 19 20 | 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | - + - - + + | #import "OFXMLElement.h" #import "OFString.h" #import "OFArray.h" #import "OFAutoreleasePool.h" #import "OFString.h" #import "OFExceptions.h" |
︙ | |||
47 48 49 50 51 52 53 | 47 48 49 50 51 52 53 54 | + | TEST(@"-[addChild:]", [elem[0] addChild: [OFXMLElement elementWithName: @"bar"]] && [[elem[0] string] isEqual: @"<foo foo='b&ar'><bar/></foo>"]) [pool drain]; } @end |
Modified tests/OFXMLParser.m from [3ae1450c68] to [23648ec2a7].
︙ | |||
16 17 18 19 20 21 22 | 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 | - + - - - + + + + + + + + | #import "OFXMLParser.h" #import "OFString.h" #import "OFArray.h" #import "OFAutoreleasePool.h" #import "OFString.h" #import "OFExceptions.h" |
︙ | |||
112 113 114 115 116 117 118 | 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 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 | - - - - + + - + + + + + + + - + + + + + + + + + + - + + + + + + + + - + - - + - - + - + | break; default: TEST(msg, NO) break; } } |
Added tests/TestsAppDelegate.h version [e3e2ff48b8].