diff options
author | Harald Welte <laforge@gnumonks.org> | 2009-06-10 05:40:52 +0800 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2009-06-10 05:40:52 +0800 |
commit | 13e10daa330ea2b699c9aa9d14b3adbd01111fd6 (patch) | |
tree | bf9144f9cf625baab472492b3047970cab14ef83 /tests/gsm0408 | |
parent | f7c43524cfc6e30a0223d3aaff89fe955d6e5146 (diff) |
move openbsc into its own subdirectory
Diffstat (limited to 'tests/gsm0408')
-rw-r--r-- | tests/gsm0408/Makefile.am | 5 | ||||
-rw-r--r-- | tests/gsm0408/gsm0408_test.c | 72 |
2 files changed, 0 insertions, 77 deletions
diff --git a/tests/gsm0408/Makefile.am b/tests/gsm0408/Makefile.am deleted file mode 100644 index 51463dcbf..000000000 --- a/tests/gsm0408/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -INCLUDES = $(all_includes) -I$(top_srcdir)/include -noinst_PROGRAMS = gsm0408_test - -gsm0408_test_SOURCES = gsm0408_test.c -gsm0408_test_LDADD = $(top_builddir)/src/libbsc.a -ldbi diff --git a/tests/gsm0408/gsm0408_test.c b/tests/gsm0408/gsm0408_test.c deleted file mode 100644 index c99766a72..000000000 --- a/tests/gsm0408/gsm0408_test.c +++ /dev/null @@ -1,72 +0,0 @@ -/* simple test for the gsm0408 formatting functions */ -/* - * (C) 2008 by Holger Hans Peter Freyther <zecke@selfish.org> - * All Rights Reserved - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - * - */ - -#include <assert.h> -#include <stdio.h> -#include <stdlib.h> - -#include <openbsc/gsm_04_08.h> - -#define COMPARE(result, op, value) \ - if (!((result) op (value))) {\ - fprintf(stderr, "Compare failed. Was %x should be %x in %s:%d\n",result, value, __FILE__, __LINE__); \ - exit(-1); \ - } - - -/* - * Test Location Area Identifier formatting. Table 10.5.3 of 04.08 - */ -static void test_location_area_identifier(void) -{ - struct gsm48_loc_area_id lai48; - - printf("Testing test location area identifier\n"); - - /* - * Test the default/test setup. Coming from - * bsc_hack.c dumps - */ - gsm0408_generate_lai(&lai48, 1, 1, 1); - COMPARE(lai48.digits[0], ==, 0x00); - COMPARE(lai48.digits[1], ==, 0xF1); - COMPARE(lai48.digits[2], ==, 0x10); - COMPARE(lai48.lac, ==, htons(0x0001)); - - gsm0408_generate_lai(&lai48, 602, 1, 15); - COMPARE(lai48.digits[0], ==, 0x06); - COMPARE(lai48.digits[1], ==, 0xF2); - COMPARE(lai48.digits[2], ==, 0x10); - COMPARE(lai48.lac, ==, htons(0x000f)); -} - -int main(int argc, char** argv) -{ - test_location_area_identifier(); -} - - - -/* - * Stubs to compile and link - */ -void input_event(void) {} -void nm_state_event(void) {} |