From 7b399a567a4f82b31ce9d17befa39265b2219084 Mon Sep 17 00:00:00 2001 From: "Alfred E. Heggestad" <114750+alfredh@users.noreply.github.com> Date: Thu, 26 Dec 2024 16:06:38 +0100 Subject: [PATCH] test: add testcode for rem au-module --- test/CMakeLists.txt | 1 + test/au.c | 26 ++++++++++++++++++++++++++ test/test.c | 1 + test/test.h | 1 + 4 files changed, 29 insertions(+) create mode 100644 test/au.c diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 6ec5eb466..8458987b5 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -70,6 +70,7 @@ set(SRCS aac.c aes.c async.c + au.c aubuf.c aulength.c aulevel.c diff --git a/test/au.c b/test/au.c new file mode 100644 index 000000000..3ab6007ed --- /dev/null +++ b/test/au.c @@ -0,0 +1,26 @@ +/** + * @file au.c Audio testcode + * + * Copyright (C) 2024 Alfred E. Heggestad + */ + +#include +#include +#include "test.h" + + +#define DEBUG_MODULE "au" +#define DEBUG_LEVEL 5 +#include + + +int test_au(void) +{ + int err = 0; + + uint32_t nsamp = au_calc_nsamp(8000, 1, 20); + ASSERT_EQ(160, nsamp); + + out: + return err; +} diff --git a/test/test.c b/test/test.c index 97358ae30..9be0c7bc0 100644 --- a/test/test.c +++ b/test/test.c @@ -52,6 +52,7 @@ static const struct test tests[] = { TEST(test_aac), TEST(test_aes), TEST(test_aes_gcm), + TEST(test_au), TEST(test_aubuf), TEST(test_aulength), TEST(test_aulevel), diff --git a/test/test.h b/test/test.h index 9cbe02a96..4b6ac9bff 100644 --- a/test/test.h +++ b/test/test.h @@ -157,6 +157,7 @@ extern enum test_mode test_mode; int test_aac(void); int test_aes(void); int test_aes_gcm(void); +int test_au(void); int test_aubuf(void); int test_aulevel(void); int test_aulength(void);