From c251b809bd7dac83d1358fe2cd4d987db01d7f00 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Thu, 3 Jun 2010 01:07:33 +0200 Subject: [PATCH] test-fvec.c: update --- tests/src/test-fvec.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/tests/src/test-fvec.c b/tests/src/test-fvec.c index d51feece..a68aa531 100644 --- a/tests/src/test-fvec.c +++ b/tests/src/test-fvec.c @@ -1,11 +1,21 @@ #include +#include int main(){ - /* allocate some memory */ - uint_t win_s = 1024; /* window size */ - fvec_t * in = new_fvec (win_s); /* input buffer */ - del_fvec(in); + uint_t buffer_size = 1024; + fvec_t * in = new_fvec (buffer_size); - return 0; + assert( in->length == buffer_size); + + assert( in->data[0] == 0); + assert( in->data[buffer_size / 2] == 0); + assert( in->data[buffer_size - 1] == 0); + + in->data[buffer_size -1 ] = 1; + assert( in->data[buffer_size - 1] == 1); + + del_fvec(in); + + return 0; } -- 2.26.2