diff options
author | Michael Klingbeil <klingm@amazon.com> | 2023-05-17 19:46:09 +0300 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@amazon.com> | 2023-06-16 20:01:38 +0300 |
commit | 4b9c620a8dbee1c2d164310ac8ace44fff97b162 (patch) | |
tree | 233bdf27d03372bc13704f2c046071a0e4d361c4 /Makefile.mips | |
parent | df2f98f809a40cb380bf4570aa6522d12beac18c (diff) |
Fixup extensions implementation and add unit tests
Add unit tests for opus_packet_extensions_count, opus_packet_extensions_parse,
and opus_packet_extensions_generate. Add various assertions for NULL buffers or
negative length arguments. Add explicit check for invalid length in
opus_packet_extensions_count. Check for extension id >127 in
opus_packet_extensions_generate. Check for invalid length input in
opus_packet_extensions_generate.
Signed-off-by: Jean-Marc Valin <jmvalin@amazon.com>
Diffstat (limited to 'Makefile.mips')
-rw-r--r-- | Makefile.mips | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/Makefile.mips b/Makefile.mips index e9bfc22e..8e8f837c 100644 --- a/Makefile.mips +++ b/Makefile.mips @@ -102,13 +102,16 @@ TESTOPUSDECODE_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(TESTOPUSDECODE_SRCS_C)) TESTOPUSENCODE_SRCS_C = tests/test_opus_encode.c tests/opus_encode_regressions.c TESTOPUSENCODE_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(TESTOPUSENCODE_SRCS_C)) +TESTOPUSEXTENSIONS_SRCS_C = tests/test_opus_extensions.c +TESTOPUSEXTENSIONS_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(TESTOPUSEXTENSIONS_SRCS_C)) + TESTOPUSPADDING_SRCS_C = tests/test_opus_padding.c TESTOPUSPADDING_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(TESTOPUSPADDING_SRCS_C)) OPUSCOMPARE_SRCS_C = src/opus_compare.c OPUSCOMPARE_OBJS := $(patsubst %.c,%$(OBJSUFFIX),$(OPUSCOMPARE_SRCS_C)) -TESTS := test_opus_api test_opus_decode test_opus_encode test_opus_padding +TESTS := test_opus_api test_opus_decode test_opus_encode test_opus_extensions test_opus_padding # Rules all: lib opus_demo opus_compare $(TESTS) @@ -133,6 +136,9 @@ test_opus_decode$(EXESUFFIX): $(TESTOPUSDECODE_OBJS) $(TARGET) test_opus_encode$(EXESUFFIX): $(TESTOPUSENCODE_OBJS) $(TARGET) $(LINK.o.cmdline) +test_opus_extensions$(EXESUFFIX): $(TESTOPUSEXTENSIONS_OBJS) $(TARGET) + $(LINK.o.cmdline) + test_opus_padding$(EXESUFFIX): $(TESTOPUSPADDING_OBJS) $(TARGET) $(LINK.o.cmdline) @@ -154,8 +160,10 @@ force: clean: rm -f opus_demo$(EXESUFFIX) opus_compare$(EXESUFFIX) $(TARGET) \ test_opus_api$(EXESUFFIX) test_opus_decode$(EXESUFFIX) \ - test_opus_encode$(EXESUFFIX) test_opus_padding$(EXESUFFIX) \ + test_opus_encode$(EXESUFFIX) test_opus_extensions$(EXESUFFIX) \ + test_opus_padding$(EXESUFFIX) $(OBJS) $(OPUSDEMO_OBJS) $(OPUSCOMPARE_OBJS) $(TESTOPUSAPI_OBJS) \ - $(TESTOPUSDECODE_OBJS) $(TESTOPUSENCODE_OBJS) $(TESTOPUSPADDING_OBJS) + $(TESTOPUSDECODE_OBJS) $(TESTOPUSENCODE_OBJS) \ + $(TESTOPUSEXTENSIONS_OBJS) $(TESTOPUSPADDING_OBJS) .PHONY: all lib clean force check |