As I'm making changes to the Turkish resource grammar, I am starting to doubt if the changes I'm making are messing with the stuff I have implemented before.
When I consulted @inariksit, she told that the current practice is to use resource.gfs and to have a “gold standard” against which its linearization is diffed.
I think it would be much better have a built-in solution for this like anassertLin command that takes in an abstract expression, a concrete grammar name, and an expected output and checks the linearization for equality to the expected output. Then we could have -test flag for gf that, so that when we run on a gf -run tests.gfs, prints out all the assertLins coming from tests.gfs nicely and tells whether all tests have succeeded or not.
Though this doesn't have substantial benefits compared to file-diffing, it could be one step towards a unified practice of testing resource grammars which seems to be nonexistent at this point.
If I'm not missing anything, this should also be easy to implement.
Thoughts or comments? @inariksit @krangelov
As I'm making changes to the Turkish resource grammar, I am starting to doubt if the changes I'm making are messing with the stuff I have implemented before.
When I consulted @inariksit, she told that the current practice is to use
resource.gfsand to have a “gold standard” against which its linearization is diffed.I think it would be much better have a built-in solution for this like an
assertLincommand that takes in an abstract expression, a concrete grammar name, and an expected output and checks the linearization for equality to the expected output. Then we could have-testflag forgfthat, so that when we run on agf -run tests.gfs, prints out all theassertLins coming fromtests.gfsnicely and tells whether all tests have succeeded or not.Though this doesn't have substantial benefits compared to file-diffing, it could be one step towards a unified practice of testing resource grammars which seems to be nonexistent at this point.
If I'm not missing anything, this should also be easy to implement.
Thoughts or comments? @inariksit @krangelov