|
From: | Enrico Gallus |
Subject: | Re: [cybop-developers] UnitTests |
Date: | Wed, 8 Mar 2017 12:37:28 +0900 |
Hi, last thing for today. Sorry for spamming the mailing list like that. I am relieved that you like it! Taking over the test will take some time, but it is not that urgent. I just wanted to show a way how it could be done. Maybe there are better ways to use the CTest framework. I already have some improvements in mind and put some todo’s to the cmake files. The tests i converted have been really simple, because they did not include any other c-files. I tried a “complicate” example and converted the unit tests for the integer calculation. It was like hell… Is it that terrible to work with c? I mean, i’m using Visual Studio Code with an C-Extension, you probably use eclipse with the CDT extension? To gather all the includes in the test file, just because the method under test “calculate_integer_absolute” uses the logger which has some forward declarations was awful. In the end the include lists contains now a lot of comparator/memoriser and modifier includes. I guess it can’t be helped. I just started coding C, so maybe there is a better way to provide the includes in the INTEGER_CALCULATOR_TESTER_SOURCE I appreciate any ideas for improvement. I put this to my TODO-list and would like to fix the cmake first. Enrico |
[Prev in Thread] | Current Thread | [Next in Thread] |