When Player Solution is executed (Run button pressed):
For each nn of 'NN' test cases in Unit:
[x] Copy input text to a $PLAYER_SOLUTION/bn_nn_input.txt file.
[x] If test case has an expected output, copy it to a $PLAYER_SOLUTION/bn_nn_output_ex.txt file.
[ ] If test case does not have an expected output and it has a least one standard generator, build the generator and generate the corresponding expected output. # Pending issue
[x] If test case has expected error output, copy it to $PLAYER_SOLUTION/bn_nn_error_ex.txt.
If Unit has at least one generator:
[x] Choose a random rr generator
[x] Copy the source code of the generator to a file $PLAYER_SOLUTION/bn_gen_rr.c[pp]. Extension must be assigned according to the programming language of the generator.
[x] Compile the generated file, and get an executable
[x] Get the default-run attribute of the generator, lets name it MM
[x] For each mm in MM, create the test case NN + mm depending on the type of generator. See examples below.
[x] Store the number of generated test cases in player solution. It will required later by UnitPlayingScene to show the number of test cases to pass.
When Player Solution is executed (Run button pressed):
For each
nn
of 'NN' test cases in Unit:$PLAYER_SOLUTION/bn_nn_input.txt
file.$PLAYER_SOLUTION/bn_nn_output_ex.txt
file.$PLAYER_SOLUTION/bn_nn_error_ex.txt
.If Unit has at least one generator:
rr
generator$PLAYER_SOLUTION/bn_gen_rr.c[pp]
. Extension must be assigned according to the programming language of the generator.default-run
attribute of the generator, lets name itMM
mm
inMM
, create the test caseNN + mm
depending on the type of generator. See examples below.Standard generator:
File generator:
Notice standard-generator requires a solution element. #Issue pending