Example 2: handle new jobs
This example is an extract of code from a job scheduler responsible
for management of a set of jobs stored in an array.
Each job has a status and priority as well as additional data
used during job execution. This code is the DaimlerChrysler
C++ testing system itself to facilitate parallel execution of
test processes. The input space is the job array (the ‘data’
entries are unimportant for coverage). The test problem is
to find the right input data for the flag check work, tested
in the last condition shown. In order to execute the true
branch of this conditional, the assignment check work=1; in
the for loop must be avoided on every iteration.