Skip to content

Commit

Permalink
test: add testcode for rem au-module
Browse files Browse the repository at this point in the history
  • Loading branch information
alfredh authored and sreimers committed Dec 26, 2024
1 parent 9816bde commit ef7674e
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ set(SRCS
aac.c
aes.c
async.c
au.c
aubuf.c
aulength.c
aulevel.c
Expand Down
26 changes: 26 additions & 0 deletions test/au.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/**
* @file au.c Audio testcode
*
* Copyright (C) 2024 Alfred E. Heggestad
*/

#include <re.h>
#include <rem.h>
#include "test.h"


#define DEBUG_MODULE "au"
#define DEBUG_LEVEL 5
#include <re_dbg.h>


int test_au(void)
{
int err = 0;

uint32_t nsamp = au_calc_nsamp(8000, 1, 20);
ASSERT_EQ(160, nsamp);

out:
return err;
}
1 change: 1 addition & 0 deletions test/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
1 change: 1 addition & 0 deletions test/test.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ef7674e

Please sign in to comment.