skiadas / moodleToPreText

MIT License
0 stars 0 forks source link

Handle coderunner exercise that contain the whole program rather than just a function #5

Closed skiadas closed 3 months ago

skiadas commented 3 months ago

In these cases simply running the program, with given outputs, produces the desired results. The problem is that in that case we cannot simply insert the program in the same way as we would with function definitions. We need to instead "evaluate" it for each test separately.

Alternatively: automatically place the program as the body of a function, then call the function in the tests.