| 5 | | == Encoder, and Filter Tests == |
| | 5 | The recipes for the tests written in GNU Make are located under `tests/fate` in the FFmpeg source. Because FFmpeg has a very complex codebase, differing code needs a wide variety of tests. Let us start with the common part of the tests. |
| | 6 | |
| | 7 | == Four Parts of a Test == |
| | 8 | |
| | 9 | A typical test usually consists of four parts: |
| | 10 | |
| | 11 | 1. Registration: meaning that `make fate` automatically execute the test you want to add; |
| | 12 | 2. Dependencies: which are usually samples for a format, a generated sample, or a program specifically written to test this feature; |
| | 13 | 3. Configuration: this part is the most important of all, because it controls how the test will be run. |
| | 14 | |
| | 15 | Let us focus on the separate parts of a test. |
| | 16 | |
| | 17 | === Registration === |
| | 18 | |
| | 19 | ==== One Test for one Feature ==== |
| | 20 | |
| | 21 | The most common case is that only one test is allocated for one feature (e.g. decoder, muxer, hashing algorithm, etc.). Let's open `tests/fate/audio.mak`, which is a file containing tests for audio codecs. |
| | 22 | |
| | 23 | == Filter Tests == |
| | 24 | |
| | 25 | |