"I'd like to update code and see the unit tests update automatically"
I think you have that a bit backwards there. I want to write the tests and have my code automatically update to make them pass.
I think you have that a bit backwards there. I want to write the tests and have my code automatically update to make them pass.
/**
* Auto-generated, do not edit!
*/
function add(x, y) {
/* test 1 */
if (x == 2 && y == 2) {
return 4;
}
/* test 2 */
if (x == 1 && y == -1) {
return 0;
}
}One interesting thing though with auto-generated code based on specific test code is that when the test fails at some point the process just has to be repeated, potentially being done automatically.
http://people.csail.mit.edu/asolar/papers/asplos06-final.pdf