Not logged inOpenClonk Forum
Up Topic Development / Developer's Corner / GTest! Or not?
- - By Isilkor Date 2011-05-17 17:46
I have written some tests to make sure IsValidUtf8 behaves correctly, and as it turns out, it didn't. The tests currently use Google Test. I want to push them to the repository, in the hope that other, free-standing functions or classes (e.g. C4MapGeneratorS2, or the script engine) will get tests written for them as well; this may expose other errors or at least we'd be able to find regressions quickly.

Does anybody of you have experience with Google Test, or another framework, and wants to propose a different one? Or maybe you are averse to unit testing in general? Any thoughts go here.
Reply
Parent - - By Newton [de] Date 2011-05-17 19:00
I have just used functions with asserts until now. Can one test private methods with Google Test too?
Parent - By Isilkor Date 2011-05-17 19:07

> I have just used functions with asserts until now.


This is pretty much assertions on crack (and without killing the program if they fire).

> Can one test private methods with Google Test too?


No you're still bound by the rules of C++. You can test the public interface though.
Reply
Up Topic Development / Developer's Corner / GTest! Or not?

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill