[riot-notifications] [RIOT-OS/RIOT] gcoap: DEVELHELP checks resources are sorted (#7580)

Gaëtan Harter notifications at github.com
Thu Sep 7 16:02:02 CEST 2017


gcoap requires resources to be sorted alphabetically, but currently nothing verifies it.
I added a runtime check that warns if not the case, only enable when DEVELHELP is.

Also, in tests-gcoap, the test resources where not sorted.

To make it visible, without adding many tests, I needed to enable DEVELHELP in unittests makefile.

I also fixed an unused variable enclosing ifdef, as its NDEBUG that controls assert.
NDEBUG should be enabled when DEVELHELP is, but if you enable it with -DDEVELHELP=1, NDEBUG is not and it did not compile anymore.
You can view, comment on, or merge this pull request online at:

  https://github.com/RIOT-OS/RIOT/pull/7580

-- Commit Summary --

  * net/gcoap: void unused variable depending on NDEBUG
  * net/gcoap: verify listener resources are sorted when registering
  * unittests: enable DEVELHELP when building tests
  * tests-gcoap: fixup typo ressources->resources
  * tests-gcoap: Fix resources order which should be sorted.

-- File Changes --

    M sys/net/application_layer/gcoap/gcoap.c (30)
    M tests/unittests/Makefile (1)
    M tests/unittests/tests-gcoap/tests-gcoap.c (12)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/7580.patch
https://github.com/RIOT-OS/RIOT/pull/7580.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/7580
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20170907/f6b13334/attachment.html>


More information about the notifications mailing list