 |
Changeset 3421
- Timestamp:
- 04/09/08 13:05:34
(8 months ago)
- Author:
- larsivi
- Message:
Somewhat improved reporting.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r3202 |
r3421 |
|
| 51 | 51 | bool tangoUnitTester() |
|---|
| 52 | 52 | { |
|---|
| 53 | | uint count = 0; |
|---|
| | 53 | uint countFailed = 0; |
|---|
| | 54 | uint countTotal = 1; |
|---|
| 54 | 55 | Stdout ("NOTE: This is still fairly rudimentary, and will only report the").newline; |
|---|
| 55 | 56 | Stdout (" first error per module.").newline; |
|---|
| … | … | |
| 57 | 58 | { |
|---|
| 58 | 59 | if ( m.unitTest) { |
|---|
| 59 | | Stdout.format ("{}. Executing unittests in '{}' ", count, m.name); |
|---|
| | 60 | Stdout.format ("{}. Executing unittests in '{}' ", countTotal, m.name); |
|---|
| 60 | 61 | try { |
|---|
| 61 | 62 | m.unitTest(); |
|---|
| 62 | 63 | } |
|---|
| 63 | 64 | catch (Exception e) { |
|---|
| | 65 | countFailed++; |
|---|
| 64 | 66 | Stdout(" - Unittest failed.").newline; |
|---|
| 65 | 67 | Stdout.format(" File '{}', line '{}'.", e.file, e.line).newline; |
|---|
| … | … | |
| 70 | 72 | } |
|---|
| 71 | 73 | Stdout(" - Success.").newline; |
|---|
| 72 | | count++; |
|---|
| | 74 | countTotal++; |
|---|
| 73 | 75 | } |
|---|
| 74 | 76 | } |
|---|
| | 77 | |
|---|
| | 78 | Stdout.format ("{} out of {} tests failed.", countFailed, countTotal - 1).newline; |
|---|
| 75 | 79 | return true; |
|---|
| 76 | 80 | } |
|---|
Download in other formats:
|
 |
 |
|
 |
Copyright © 2006-2008 Tango. All Rights Reserved. | Page Width:
Static or
Dynamic