Skip to content
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

Add unit tests when generating 'PACKAGE_TYPE_LIB' #214

Open
microbuilder opened this issue Sep 20, 2018 · 1 comment
Open

Add unit tests when generating 'PACKAGE_TYPE_LIB' #214

microbuilder opened this issue Sep 20, 2018 · 1 comment

Comments

@microbuilder
Copy link

Unit tests are not only helpful to promote code quality, they are also useful documentation for packages, and are generally up to date with any API changes.

As such, would it make sense to include unit tests by default in any new package created with newt pkg new (assuming the default PACKAGE_TYPE_LIB package type)?

This inclusion may push people to create more unit tests, and if they aren't desired it's simply a matter of deleting the appropriate sub-directory.

@microbuilder
Copy link
Author

As an update, unit tests are also the only way to run travis-ci tests on stand-alone packages/libs committed to Github since there isn't a project to build. See, for example, https://github.com/microbuilder/mb_ht16k33/blob/master/.travis.yml ... which requires a very simple unit test just to check that the package builds on PRs and commits: https://github.com/microbuilder/mb_ht16k33/blob/master/test/src/testcases/ht16k33_testcases.c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant