| 1 |
This is a unit test for the BacktraceInfo class, which is used in drkonqi |
| 2 |
to rate the usefulness of a backtrace. |
| 3 |
|
| 4 |
This test dynamically loads test data from the "backtraceinfotest_data" directory. |
| 5 |
To add new data, simply create a file starting with the "test_" prefix and paste |
| 6 |
a backtrace in it. Then, in the "usefulness_map" file, add a line with the following format: |
| 7 |
|
| 8 |
test_file: UsefulnessValue |
| 9 |
|
| 10 |
where "test_file" is the exact filename of the file containing the backtrace and |
| 11 |
UsefulnessValue is the usefulness value that you expect the backtrace to get. |
| 12 |
Whitespaces do not matter, they are ignored. Valid usefulness values can be seen |
| 13 |
in backtraceinfotest.h, in the enum BacktraceInfoTest::Usefulness. |
| 14 |
|
| 15 |
The UsefulnessValue has to be the enum's text representation of the |
| 16 |
value and not an integer. For example, having the enum like this: |
| 17 |
|
| 18 |
enum Usefulness { ReallyUseful = 0, MayBeUseful=1, ProbablyUseless=2, Useless = 3 }; |
| 19 |
|
| 20 |
"ReallyUseful" is a valid value, but "0" isn't. |
| 21 |
|
| 22 |
|
| 23 |
All files in the "backtraceinfotest_data" directory that do not start with the |
| 24 |
"test_" prefix are ignored (except the "usefulness_map" file, which has a special |
| 25 |
purpose, as described above) |