From 430df345c4c86579bbcc0079c7776ad687018994 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Sat, 14 Dec 2013 21:20:45 +0000 Subject: [PATCH] tests: add unit test for bitreader, bytereader and bytewriter with no inlining used --- tests/check/Makefile.am | 3 +++ tests/check/libs/.gitignore | 3 +++ tests/check/libs/bitreader-noinline.c | 21 +++++++++++++++++++++ tests/check/libs/bytereader-noinline.c | 21 +++++++++++++++++++++ tests/check/libs/bytewriter-noinline.c | 21 +++++++++++++++++++++ 5 files changed, 69 insertions(+) create mode 100644 tests/check/libs/bitreader-noinline.c create mode 100644 tests/check/libs/bytereader-noinline.c create mode 100644 tests/check/libs/bytewriter-noinline.c diff --git a/tests/check/Makefile.am b/tests/check/Makefile.am index 0568d90..4f5b718 100644 --- a/tests/check/Makefile.am +++ b/tests/check/Makefile.am @@ -137,6 +137,9 @@ check_PROGRAMS = \ libs/bitreader \ libs/bytereader \ libs/bytewriter \ + libs/bitreader-noinline \ + libs/bytereader-noinline \ + libs/bytewriter-noinline \ libs/collectpads \ libs/gstnetclientclock \ libs/gstnettimeprovider \ diff --git a/tests/check/libs/.gitignore b/tests/check/libs/.gitignore index cc2b54f..d1ada55 100644 --- a/tests/check/libs/.gitignore +++ b/tests/check/libs/.gitignore @@ -3,8 +3,11 @@ adapter basesink basesrc bitreader +bitreader-noinline bytereader +bytereader-noinline bytewriter +bytewriter-noinline gdp collectpads controller diff --git a/tests/check/libs/bitreader-noinline.c b/tests/check/libs/bitreader-noinline.c new file mode 100644 index 0000000..107a9a4 --- /dev/null +++ b/tests/check/libs/bitreader-noinline.c @@ -0,0 +1,21 @@ +/* GStreamer unit test for GstBitReader without using inlining + * Copyright (C) 2013 Tim-Philipp Müller + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#define GST_BIT_READER_DISABLE_INLINES +#include "bitreader.c" diff --git a/tests/check/libs/bytereader-noinline.c b/tests/check/libs/bytereader-noinline.c new file mode 100644 index 0000000..8200128 --- /dev/null +++ b/tests/check/libs/bytereader-noinline.c @@ -0,0 +1,21 @@ +/* GStreamer unit test for GstByteReader without using inlining + * Copyright (C) 2013 Tim-Philipp Müller + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#define GST_BYTE_READER_DISABLE_INLINES +#include "bytereader.c" diff --git a/tests/check/libs/bytewriter-noinline.c b/tests/check/libs/bytewriter-noinline.c new file mode 100644 index 0000000..241d4a0 --- /dev/null +++ b/tests/check/libs/bytewriter-noinline.c @@ -0,0 +1,21 @@ +/* GStreamer unit test for GstByteWriter without using inlining + * Copyright (C) 2013 Tim-Philipp Müller + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#define GST_BYTE_WRITER_DISABLE_INLINES +#include "bytewriter.c" -- 2.7.4