jeudi 1 septembre 2016

Is it possible to write unit test for c language in lua

I am willing to read Redis source code. But simple read it really sleep me. I write python and have written many unit tests.To me unit test is really a good way to read source code.

I search through the google, there are so many unit test framework for c language. I try check and Criterion, and do not like both of them. first, they all have to run all the test-cases everytime, but in my opinion, the ability to run part of the testcases is really needed. second, try to fix the lib path problem sucks me, it really take times. And I still can not be clear about what have to do to make it works.

I notice that the Redis write itself testcase in tcl language which I never used before. So this idea comes to me, Is it possible to write c unit test in other language? for example Lua. I am not good at lua.But I hearded that it communicate with c very well. And as a script language, it may behave like the way I want it.But the google give no good answer.

so is it a good way to write unit test in lua? Have anybody do that before?

Aucun commentaire:

Enregistrer un commentaire