Overview
Comment: | ObjFWTest: Improve format for redirected output |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | objfwtest |
Files: | files | file ages | folders |
SHA3-256: |
5e89084e60fe4975617fb136800437ba |
User & Date: | js on 2024-02-17 18:19:14 |
Other Links: | branch diff | manifest | tags |
Context
2024-02-17
| ||
19:18 | Migrate RuntimeARCTests to ObjFWTest check-in: 2ee3da6551 user: js tags: objfwtest | |
18:19 | ObjFWTest: Improve format for redirected output check-in: 5e89084e60 user: js tags: objfwtest | |
18:07 | Migrate OFStringTests to ObjFWTest check-in: 823cff099d user: js tags: objfwtest | |
Changes
Modified src/test/OTAppDelegate.m from [5a8390683c] to [c93ecdfdda].
︙ | ︙ | |||
215 216 217 218 219 220 221 | - (void)printStatusForTest: (SEL)test inClass: (Class)class status: (enum Status)status description: (OFString *)description { switch (status) { case StatusRunning: | > | | | | | | > > > > | | | | | | > > > | | | | | | | > > > | | | | | | > > > > | 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 | - (void)printStatusForTest: (SEL)test inClass: (Class)class status: (enum Status)status description: (OFString *)description { switch (status) { case StatusRunning: if (OFStdOut.hasTerminal) { [OFStdOut setForegroundColor: [OFColor olive]]; [OFStdOut writeFormat: @"-[%@ ", class]; [OFStdOut setForegroundColor: [OFColor yellow]]; [OFStdOut writeFormat: @"%s", sel_getName(test)]; [OFStdOut setForegroundColor: [OFColor olive]]; [OFStdOut writeString: @"]: "]; } else [OFStdOut writeFormat: @"-[%@ %s]: ", class, sel_getName(test)]; break; case StatusOk: if (OFStdOut.hasTerminal) { [OFStdOut setForegroundColor: [OFColor green]]; [OFStdOut writeFormat: @"\r-[%@ ", class]; [OFStdOut setForegroundColor: [OFColor lime]]; [OFStdOut writeFormat: @"%s", sel_getName(test)]; [OFStdOut setForegroundColor: [OFColor green]]; [OFStdOut writeLine: @"]: ok"]; } else [OFStdOut writeLine: @"ok"]; break; case StatusFailed: if (OFStdOut.hasTerminal) { [OFStdOut setForegroundColor: [OFColor maroon]]; [OFStdOut writeFormat: @"\r-[%@ ", class]; [OFStdOut setForegroundColor: [OFColor red]]; [OFStdOut writeFormat: @"%s", sel_getName(test)]; [OFStdOut setForegroundColor: [OFColor maroon]]; [OFStdOut writeLine: @"]: failed"]; [OFStdOut writeLine: description]; } else [OFStdOut writeLine: @"failed"]; break; case StatusSkipped: if (OFStdOut.hasTerminal) { [OFStdOut setForegroundColor: [OFColor gray]]; [OFStdOut writeFormat: @"\r-[%@ ", class]; [OFStdOut setForegroundColor: [OFColor silver]]; [OFStdOut writeFormat: @"%s", sel_getName(test)]; [OFStdOut setForegroundColor: [OFColor gray]]; [OFStdOut writeLine: @"]: skipped"]; } else [OFStdOut writeLine: @"skipped"]; if (description != nil) [OFStdOut writeLine: description]; break; } if (status == StatusFailed) { #if defined(OF_WII) [OFStdOut setForegroundColor: [OFColor silver]]; [OFStdOut writeLine: @"Press A to continue"]; |
︙ | ︙ |