Transcripting Test
Definition:
A Transcripting Test is writing information to the console or a global stream, for example the Transcript in Smalltalk, while it is running.
Also Known As:
The Loudmouth
Code Example:
HeapTest >> #testExamples
self shouldnt: [ self heapExample ] raise: Error.
self shouldnt: [ self heapSortExample ] raise: Error.
HeapTest >> #heapSortExample
"HeapTest new heapSortExample"
"Sort a random collection of Floats and compare the results with ... ''
| n rnd array time sorted |
n := 10000. "# of elements to sort"
rnd := Random new.
Transcript cr; show:'Time for heap-sort: ', time printString,' msecs'.
"The quicksort version"
Transcript cr; show:'Time for quick-sort: ', time printString,' msecs'.
"The merge-sort version"
References:
Quality attributes
- Code Example
- Cause and Effect
- Frequency
- Refactoring