summaryrefslogtreecommitdiff
path: root/cesar/mac/sar/test/utest/host/src/sar.c
diff options
context:
space:
mode:
Diffstat (limited to 'cesar/mac/sar/test/utest/host/src/sar.c')
-rw-r--r--cesar/mac/sar/test/utest/host/src/sar.c108
1 files changed, 108 insertions, 0 deletions
diff --git a/cesar/mac/sar/test/utest/host/src/sar.c b/cesar/mac/sar/test/utest/host/src/sar.c
new file mode 100644
index 0000000000..e2257a545a
--- /dev/null
+++ b/cesar/mac/sar/test/utest/host/src/sar.c
@@ -0,0 +1,108 @@
+/* Cesar project {{{
+ *
+ * Copyright (C) 2009 Spidcom
+ *
+ * <<<Licence>>>
+ *
+ * }}} */
+/**
+ * \file mac/sar/test/utest/host/src/sar.c
+ * \brief Main file for unit tests.
+ * \ingroup mac_sar
+ */
+#include "common/std.h"
+#include "lib/test.h"
+#include "lib/blk.h"
+#include "lib/trace.h"
+
+void
+test_suite_sar_activate (test_t test);
+
+void
+test_suite_sar_crc_error (test_t test);
+
+void
+test_suite_sar_detect_mf (test_t test);
+
+void
+test_suite_expiration (test_t test);
+
+void
+test_suite_rx_get_associated_mfs (test_t test);
+
+void
+test_suite_sar_mfs_cmd (test_t test);
+
+void
+test_suite_sar_create_mfs (test_t test);
+
+void
+test_suite_mfs_ssn_resize (test_t test);
+
+void
+test_suite_msdu_expiration (test_t test);
+
+void
+test_suite_reassembly (test_t test);
+
+void
+test_suite_reassembly_ce_measures (test_t test);
+
+void
+test_suite_upper_layer (test_t test);
+
+void
+test_suite_sar_sta_remove (test_t test);
+
+void
+test_suite_segmentation (test_t test);
+
+void
+test_suite_tx_job_desc_create (test_t test);
+
+
+void
+test_suite_misc (test_t test);
+
+void
+test_suite_sar_stats (test_t test);
+
+void
+test_suite_sar_pb_stats (test_t test);
+
+int
+main (int argc, char** argv)
+{
+ test_t test;
+
+ test_init (test, argc, argv);
+ trace_init ();
+
+ test_suite_sar_activate (test);
+ test_suite_sar_crc_error (test);
+ test_suite_sar_detect_mf (test);
+ test_suite_expiration (test);
+ test_suite_rx_get_associated_mfs (test);
+ test_suite_sar_mfs_cmd (test);
+ test_suite_sar_create_mfs (test);
+ test_suite_mfs_ssn_resize (test);
+ test_suite_reassembly (test);
+ test_suite_reassembly_ce_measures (test);
+ test_suite_upper_layer (test);
+ test_suite_sar_sta_remove (test);
+ test_suite_segmentation (test);
+ test_suite_tx_job_desc_create (test);
+ test_suite_misc (test);
+ test_suite_sar_stats (test);
+ test_suite_sar_pb_stats (test);
+ trace_uninit ();
+
+ test_begin (test, "Memory")
+ {
+ test_fail_if (blk_check_memory() == false, "Memory not freed");
+ }
+ test_end;
+
+ test_result (test);
+ return test_nb_failed (test) == 0 ? 0 : 1;
+}