[lib/cbuf] [app/tests] fix off by one in lib/cbuf. add a test.

Previously, if tail was == 0, and we wrote exactly enough bytes to
the end of the buffer, then head would end up at 0 as well. This
would make the buffer instaneously empty, as head == tail.
This commit is contained in:
Girts
2016-10-29 17:24:11 -07:00
committed by Travis Geiselbrecht
parent a77295ae63
commit 61d06e19fc
6 changed files with 142 additions and 8 deletions

View File

@@ -5,6 +5,7 @@ MODULE := $(LOCAL_DIR)
MODULE_SRCS += \
$(LOCAL_DIR)/benchmarks.c \
$(LOCAL_DIR)/cache_tests.c \
$(LOCAL_DIR)/cbuf_tests.c \
$(LOCAL_DIR)/clock_tests.c \
$(LOCAL_DIR)/fibo.c \
$(LOCAL_DIR)/float.c \
@@ -18,6 +19,9 @@ MODULE_SRCS += \
MODULE_ARM_OVERRIDE_SRCS := \
MODULE_DEPS += \
lib/cbuf
MODULE_COMPILEFLAGS += -Wno-format -fno-builtin
include make/module.mk