-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Try to integrate googletest as unit-test. #34
Conversation
I don't like submodules. And I don't like vendoring. What's wrong with using packages provided by the OS? |
I am not very familiar with googletest, but the official website seems to recommend compiling googletest as part of source code in the test part. The other possibility is to not use googletest and use other framework instead. |
Since pttbbs is written in pure c, it's possible that we just switch to check (looks like the project is still update-to-date): |
I hope to see real unit tests written before choosing the framework. |
b02597a
to
4492850
Compare
https://github.com/chhsiao1981/pttbbs/tree/hsiao.googletest/tests |
63b3b0e
to
b213097
Compare
Intended to use Makefile (pmake) instead of cmake. For now:
|
b213097
to
7d5bb9d
Compare
hi @robertabcd I revised this PR and provided some basic examples as the templates for the unittest. I added tests/test_mbbsd/mbbsd_mock.c as mock for mbbsd.c because there is main in mbbsd.c Hopefully the revision satisfies the PR and others can contribute more on unittest. |
7d5bb9d
to
99b09bb
Compare
I'll close this for now and revise the pr. |
Try to integrate googletest as unit-test.