Skip to content

Conversation

@kb2ma
Copy link
Contributor

@kb2ma kb2ma commented Jan 28, 2017

Based on the recent addition of uint parsing for the Observe option, it really seemed like time to add unit testing. This commit adds the basic framework, and then I'll follow-on with an Observe-specific test.

This commit adds a top level tests directory for unit tests. The tests depend on reuse of the embunit framework in the RIOT submodule. The tests/embunit directory includes Makefiles to build the framework from that source.

I also added the ability to compile nanocoap source to object files in the nanocoap Makefile. This compilation is only called by the unit test Makefile as needed. I also added a section in the README to describe setup and use.

I'm sure the Makefiles can be streamlined, but hey, it's a start, and definitely worthwhile!

@kb2ma
Copy link
Contributor Author

kb2ma commented Jan 29, 2017

Two updates:

  1. Added .gitignore to initial commit and squashed.
  2. Added commit for Observe registration test.

@haukepetersen
Copy link
Contributor

@kaspar030: what do you think about this PR? I think having unittests for nanocoap is quite helpful. Alternative could be to simply move nanocoap into RIOT and use the existing infrastructure :-)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants