summaryrefslogtreecommitdiff
path: root/ce
diff options
context:
space:
mode:
authorlacour2007-10-31 16:59:32 +0000
committerlacour2007-10-31 16:59:32 +0000
commit954c5101f5ff9ea95c2f195650be219dea74d751 (patch)
tree65178ef0097113897a92542390ff3f877f2f7714 /ce
parentbbe3e90a2c0080ee1c6c43f2cf34f703e9aac45b (diff)
Delete diag_printf function.
Correction in test_frame_measurement. Should PASS tests. git-svn-id: svn+ssh://pessac/svn/cesar/trunk@931 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'ce')
-rwxr-xr-xce/test/common/src/print_utils.c11
-rwxr-xr-xce/test/rx/src/test_frame_measurement.c29
2 files changed, 11 insertions, 29 deletions
diff --git a/ce/test/common/src/print_utils.c b/ce/test/common/src/print_utils.c
index 648be29dba..520865e9ef 100755
--- a/ce/test/common/src/print_utils.c
+++ b/ce/test/common/src/print_utils.c
@@ -14,22 +14,15 @@
#include "common/std.h"
#include "ce/inc/io_utils.h"
#include "ce/test/common/print_utils.h"
-
-#define CE_PRINT
-
-#ifdef CE_PRINT
-#include <cyg/infra/diag.h>
-#endif
+#include <stdio.h>
void
my_print (const char *msg, ...)
{
-#ifdef CE_PRINT
va_list ap;
va_start (ap, msg);
- diag_vprintf ( msg, ap);
+ vfprintf (stderr, msg, ap);
va_end (ap);
-#endif
}
void
diff --git a/ce/test/rx/src/test_frame_measurement.c b/ce/test/rx/src/test_frame_measurement.c
index fe9eb36ecc..5a7019a02f 100755
--- a/ce/test/rx/src/test_frame_measurement.c
+++ b/ce/test/rx/src/test_frame_measurement.c
@@ -27,6 +27,7 @@
lib_rnd_t rnd;
int affect;
+int delay_unit;
void
test_is_time_noise_stable (test_t t)
@@ -71,9 +72,9 @@ test_is_time_noise_stable (test_t t)
test_fail_if (k < 10 && stable_nb < 80 );
test_fail_if (k > 10 && stable_nb > 20 );
test_fail_if (k == 10 && (stable_nb < 20 || stable_nb > 80) );
- blk_release_desc ((blk_t *) test);
}
- } test_end;
+ blk_release_desc ((blk_t *) test);
+ } test_end;
}
void
@@ -213,17 +214,11 @@ test_alloc_release (test_t test)
{
test_begin (test, "frame_measurement allocation and release")
{
- /*
- pbproc_rx_params_t *rx_params = (pbproc_rx_params_t *)blk_alloc ();
- rx_params->date = 1;
- frame_measurement_t *f;
- f = frame_measurement_alloc (rx_params);
- frame_measurement_free (f);
- */
+ //blk_print_memory ();
test_fail_unless (blk_check_memory ());
} test_end;
-
}
+
void
sar_fill_ber (pb_measurement_list_t *first, uint n, uint ber_init_value)
{
@@ -488,26 +483,20 @@ cyg_user_start (int argc, char **argv)
//dbg_fatal_try_begin
{
frame_measurement_init();
- /*int nb_loop = 1e3;
- int delay_unit = process_delay (nb_loop, 16, init_time_unit ());
- */
+ int nb_loop = 1e3;
+ delay_unit = process_delay (nb_loop, 16, init_time_unit ());
+ //my_print ("noise2mod duration = %d affectations\n", delay_unit);
test_init (test, argc, argv);
test_case_begin (test, "CE-computation");
test_is_time_noise_stable (test);
test_noise2mod (test);
test_compute_worst_tonemap (test);
- test_case_begin (test, "CE-acquisition");
- test_alloc_release (test);
-
test_case_begin (test, "CE-frame measurement management");
test_frame_measurement_ber_add (test);
test_frame_measurement_noise_add (test);
test_frame_measurement_add (test);
- test_begin (test, "check alloc/free")
- {
- test_fail_unless (blk_check_memory());
- } test_end;
+ test_alloc_release (test);
}
//dbg_fatal_try_catch (const char *fatal_message)
{