Differences From Artifact [df50ba0832]:
- File tests/TestsAppDelegate.h — part of check-in [374e1a1bfa] at 2021-01-02 22:04:26 on branch trunk — Update copyright (user: js, size: 5935) [annotate] [blame] [check-ins using] [more...]
To Artifact [36680e2682]:
- File
tests/TestsAppDelegate.h
— part of check-in
[14f1e22d79]
at
2021-05-08 23:22:59
on branch trunk
— tests: Align more with ObjFW style
ObjFW's style changed over the years, but the tests were never adjusted
to it. (user: js, size: 5646) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
11 12 13 14 15 16 17 | * 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 "ObjFW.h" | | | | < | | | < | | < | | | | | | | < | | | | | | | | | < | | < | | | < | < | < < < < < < < < < | 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 | * 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 "ObjFW.h" #define TEST(test, ...) \ { \ [self outputTesting: test inModule: module]; \ \ if (__VA_ARGS__) \ [self outputSuccess: test inModule: module]; \ else { \ [self outputFailure: test inModule: module]; \ _fails++; \ } \ } #define EXPECT_EXCEPTION(test, exception, code) \ { \ bool caught = false; \ \ [self outputTesting: test inModule: module]; \ \ @try { \ code; \ } @catch (exception *e) { \ caught = true; \ } \ \ if (caught) \ [self outputSuccess: test inModule: module]; \ else { \ [self outputFailure: test inModule: module]; \ _fails++; \ } \ } #define R(...) (__VA_ARGS__, 1) @class OFString; @interface TestsAppDelegate: OFObject <OFApplicationDelegate> { int _fails; } - (void)outputTesting: (OFString *)test inModule: (OFString *)module; - (void)outputSuccess: (OFString *)test inModule: (OFString *)module; - (void)outputFailure: (OFString *)test inModule: (OFString *)module; @end @interface TestsAppDelegate (OFArrayTests) - (void)arrayTests; @end @interface TestsAppDelegate (OFBlockTests) |
︙ | ︙ | |||
159 160 161 162 163 164 165 166 167 168 169 170 171 172 | @interface TestsAppDelegate (OFNumberTests) - (void)numberTests; @end @interface TestsAppDelegate (OFObjectTests) - (void)objectTests; @end @interface TestsAppDelegate (OFPropertyListTests) - (void)propertyListTests; @end @interface TestsAppDelegate (OFPluginTests) - (void)pluginTests; | > > > > | 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 | @interface TestsAppDelegate (OFNumberTests) - (void)numberTests; @end @interface TestsAppDelegate (OFObjectTests) - (void)objectTests; @end @interface TestsAppDelegate (OFPBKDF2Tests) - (void)PBKDF2Tests; @end @interface TestsAppDelegate (OFPropertyListTests) - (void)propertyListTests; @end @interface TestsAppDelegate (OFPluginTests) - (void)pluginTests; |
︙ | ︙ | |||
180 181 182 183 184 185 186 | - (void)runtimeARCTests; @end @interface TestsAppDelegate (OFRIPEMD160HashTests) - (void)RIPEMD160HashTests; @end | | | 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | - (void)runtimeARCTests; @end @interface TestsAppDelegate (OFRIPEMD160HashTests) - (void)RIPEMD160HashTests; @end @interface TestsAppDelegate (OFScryptTests) - (void)scryptTests; @end @interface TestsAppDelegate (OFSHA1HashTests) - (void)SHA1HashTests; @end |
︙ | ︙ | |||
204 205 206 207 208 209 210 | - (void)SHA384HashTests; @end @interface TestsAppDelegate (OFSHA512HashTests) - (void)SHA512HashTests; @end | < < < < | 191 192 193 194 195 196 197 198 199 200 201 202 203 204 | - (void)SHA384HashTests; @end @interface TestsAppDelegate (OFSHA512HashTests) - (void)SHA512HashTests; @end @interface TestsAppDelegate (OFSPXSocketTests) - (void)SPXSocketTests; @end @interface TestsAppDelegate (OFSPXStreamSocketTests) - (void)SPXStreamSocketTests; @end |
︙ | ︙ | |||
231 232 233 234 235 236 237 238 239 240 241 242 243 244 | @interface TestsAppDelegate (OFSystemInfoTests) - (void)systemInfoTests; @end @interface TestsAppDelegate (OFHMACTests) - (void)HMACTests; @end @interface TestsAppDelegate (OFStreamTests) - (void)streamTests; @end @interface TestsAppDelegate (OFStringTests) - (void)stringTests; | > > > > | 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 | @interface TestsAppDelegate (OFSystemInfoTests) - (void)systemInfoTests; @end @interface TestsAppDelegate (OFHMACTests) - (void)HMACTests; @end @interface TestsAppDelegate (OFSocketTests) - (void)socketTests; @end @interface TestsAppDelegate (OFStreamTests) - (void)streamTests; @end @interface TestsAppDelegate (OFStringTests) - (void)stringTests; |
︙ | ︙ | |||
276 277 278 279 280 281 282 | - (void)XMLNodeTests; @end @interface TestsAppDelegate (OFXMLParserTests) <OFXMLParserDelegate, OFXMLElementBuilderDelegate> - (void)XMLParserTests; @end | < < < < < < < < | 263 264 265 266 267 268 269 | - (void)XMLNodeTests; @end @interface TestsAppDelegate (OFXMLParserTests) <OFXMLParserDelegate, OFXMLElementBuilderDelegate> - (void)XMLParserTests; @end |