aboutsummaryrefslogtreecommitdiffstats
path: root/tests/conv/conv.h
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2017-01-19 03:33:24 +0700
committerHarald Welte <laforge@gnumonks.org>2017-03-06 17:06:45 +0000
commit68930e85b5945db8ffea055fd178bc1f88b31d99 (patch)
tree9f8dc6855539d156c6a49e9c8b5a425fcaf2355e /tests/conv/conv.h
parent77a5b0946f67d0228a4dbb5a04940070e12ebf2f (diff)
tests/conv: separate test logic
To be able to add some more tests, related to convolutional coding, without duplication of code, the test logic was separated from the conv_test.c into conv.c and conv.h. Change-Id: Idbdc7e19cb9b9a36cd1fccd621cd858e87530d98
Diffstat (limited to 'tests/conv/conv.h')
-rw-r--r--tests/conv/conv.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/conv/conv.h b/tests/conv/conv.h
new file mode 100644
index 00000000..676c5aff
--- /dev/null
+++ b/tests/conv/conv.h
@@ -0,0 +1,16 @@
+#pragma once
+
+#define MAX_LEN_BITS 512
+#define MAX_LEN_BYTES (512/8)
+
+struct conv_test_vector {
+ const char *name;
+ const struct osmo_conv_code *code;
+ int in_len;
+ int out_len;
+ int has_vec;
+ pbit_t vec_in[MAX_LEN_BYTES];
+ pbit_t vec_out[MAX_LEN_BYTES];
+};
+
+int do_check(const struct conv_test_vector *test);