From 910356a8391ef7bb78b28e788d87c142012df67f Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 19 Dec 2002 21:44:48 +0000 Subject: [PATCH] Removed old cache testsuite Original commit message from CVS: Removed old cache testsuite --- tests/old/testsuite/caches/Makefile.am | 8 --- tests/old/testsuite/caches/cache1.c | 93 -------------------------------- tests/old/testsuite/elements/Makefile.am | 2 +- testsuite/caches/Makefile.am | 8 --- testsuite/caches/cache1.c | 93 -------------------------------- testsuite/elements/Makefile.am | 2 +- 6 files changed, 2 insertions(+), 204 deletions(-) delete mode 100644 tests/old/testsuite/caches/Makefile.am delete mode 100644 tests/old/testsuite/caches/cache1.c delete mode 100644 testsuite/caches/Makefile.am delete mode 100644 testsuite/caches/cache1.c diff --git a/tests/old/testsuite/caches/Makefile.am b/tests/old/testsuite/caches/Makefile.am deleted file mode 100644 index 1bbe0cf..0000000 --- a/tests/old/testsuite/caches/Makefile.am +++ /dev/null @@ -1,8 +0,0 @@ -testprogs = cache1 - -TESTS = $(testprogs) - -check_PROGRAMS = $(testprogs) - -LDADD = $(GST_LIBS) -CFLAGS = $(GST_CFLAGS) diff --git a/tests/old/testsuite/caches/cache1.c b/tests/old/testsuite/caches/cache1.c deleted file mode 100644 index 36922e5..0000000 --- a/tests/old/testsuite/caches/cache1.c +++ /dev/null @@ -1,93 +0,0 @@ -/* GStreamer - * Copyright (C) <1999> Erik Walthinsen - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include - -static void -lookup (GstCache *cache, GstCacheLookupMethod method, - GstFormat src_format, gint64 src_value, - GstFormat dest_format) -{ - GstCacheEntry *entry; - gint64 result; - - entry = gst_cache_get_assoc_entry (cache, 0, method, - src_format, src_value); - if (entry) { - gst_cache_entry_assoc_map (entry, dest_format, &result); - - g_print ("%lld\n", result); - } - else { - const GstFormatDefinition *def = gst_format_get_details (src_format); - - g_print ("no cache entry found for %lld %s\n", src_value, def->nick); - } -} - -typedef struct _GstCacheTestCase -{ - GstCacheLookupMethod method; - GstFormat src_format; - gint64 src_value; - GstFormat dest_format; -} GstCacheTestCase; - -const static GstCacheTestCase cases[] = -{ - { GST_CACHE_LOOKUP_EXACT, GST_FORMAT_BYTES, 3, GST_FORMAT_TIME }, - { GST_CACHE_LOOKUP_EXACT, GST_FORMAT_TIME, 5000, GST_FORMAT_BYTES }, - { GST_CACHE_LOOKUP_EXACT, GST_FORMAT_TIME, 5010, GST_FORMAT_BYTES }, - { GST_CACHE_LOOKUP_BEFORE, GST_FORMAT_TIME, 5010, GST_FORMAT_BYTES }, - { GST_CACHE_LOOKUP_BEFORE, GST_FORMAT_TIME, 0, GST_FORMAT_BYTES }, - { GST_CACHE_LOOKUP_AFTER, GST_FORMAT_TIME, G_MAXINT64, GST_FORMAT_BYTES }, - { GST_CACHE_LOOKUP_AFTER, GST_FORMAT_TIME, 0, GST_FORMAT_BYTES }, - { GST_CACHE_LOOKUP_BEFORE, GST_FORMAT_TIME, -1, GST_FORMAT_BYTES }, - { GST_CACHE_LOOKUP_BEFORE, GST_FORMAT_TIME, G_MAXINT64, GST_FORMAT_BYTES }, - { GST_CACHE_LOOKUP_AFTER, GST_FORMAT_TIME, G_MAXINT64, GST_FORMAT_BYTES }, -}; - -gint -main (gint argc, gchar *argv[]) -{ - GstCache *cache; - GstElement *element; - gint i, id; - - gst_init (&argc, &argv); - - cache = gst_cache_factory_make ("memcache"); - g_assert (cache != NULL); - - element = gst_element_factory_make ("identity", "element"); - g_assert (element != NULL); - - gst_cache_get_writer_id (cache, GST_OBJECT (element), &id); - - for (i = 0; i < 100000; i++) { - gst_cache_add_association (cache, 0, 0, GST_FORMAT_BYTES, (gint64)i, GST_FORMAT_TIME, - (gint64) (i * 1000), 0); - } - - for (i = 0; i < (sizeof (cases) / sizeof (GstCacheTestCase)); i++) { - lookup (cache, cases[i].method, cases[i].src_format, cases[i].src_value, cases[i].dest_format); - } - - return 0; -} diff --git a/tests/old/testsuite/elements/Makefile.am b/tests/old/testsuite/elements/Makefile.am index 45f858ed..8c6211e 100644 --- a/tests/old/testsuite/elements/Makefile.am +++ b/tests/old/testsuite/elements/Makefile.am @@ -1,5 +1,5 @@ if BUILD_FAILING_TESTS -tests_failing = fake +tests_failing = fake else tests_failing = endif diff --git a/testsuite/caches/Makefile.am b/testsuite/caches/Makefile.am deleted file mode 100644 index 1bbe0cf..0000000 --- a/testsuite/caches/Makefile.am +++ /dev/null @@ -1,8 +0,0 @@ -testprogs = cache1 - -TESTS = $(testprogs) - -check_PROGRAMS = $(testprogs) - -LDADD = $(GST_LIBS) -CFLAGS = $(GST_CFLAGS) diff --git a/testsuite/caches/cache1.c b/testsuite/caches/cache1.c deleted file mode 100644 index 36922e5..0000000 --- a/testsuite/caches/cache1.c +++ /dev/null @@ -1,93 +0,0 @@ -/* GStreamer - * Copyright (C) <1999> Erik Walthinsen - * - * 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., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include - -static void -lookup (GstCache *cache, GstCacheLookupMethod method, - GstFormat src_format, gint64 src_value, - GstFormat dest_format) -{ - GstCacheEntry *entry; - gint64 result; - - entry = gst_cache_get_assoc_entry (cache, 0, method, - src_format, src_value); - if (entry) { - gst_cache_entry_assoc_map (entry, dest_format, &result); - - g_print ("%lld\n", result); - } - else { - const GstFormatDefinition *def = gst_format_get_details (src_format); - - g_print ("no cache entry found for %lld %s\n", src_value, def->nick); - } -} - -typedef struct _GstCacheTestCase -{ - GstCacheLookupMethod method; - GstFormat src_format; - gint64 src_value; - GstFormat dest_format; -} GstCacheTestCase; - -const static GstCacheTestCase cases[] = -{ - { GST_CACHE_LOOKUP_EXACT, GST_FORMAT_BYTES, 3, GST_FORMAT_TIME }, - { GST_CACHE_LOOKUP_EXACT, GST_FORMAT_TIME, 5000, GST_FORMAT_BYTES }, - { GST_CACHE_LOOKUP_EXACT, GST_FORMAT_TIME, 5010, GST_FORMAT_BYTES }, - { GST_CACHE_LOOKUP_BEFORE, GST_FORMAT_TIME, 5010, GST_FORMAT_BYTES }, - { GST_CACHE_LOOKUP_BEFORE, GST_FORMAT_TIME, 0, GST_FORMAT_BYTES }, - { GST_CACHE_LOOKUP_AFTER, GST_FORMAT_TIME, G_MAXINT64, GST_FORMAT_BYTES }, - { GST_CACHE_LOOKUP_AFTER, GST_FORMAT_TIME, 0, GST_FORMAT_BYTES }, - { GST_CACHE_LOOKUP_BEFORE, GST_FORMAT_TIME, -1, GST_FORMAT_BYTES }, - { GST_CACHE_LOOKUP_BEFORE, GST_FORMAT_TIME, G_MAXINT64, GST_FORMAT_BYTES }, - { GST_CACHE_LOOKUP_AFTER, GST_FORMAT_TIME, G_MAXINT64, GST_FORMAT_BYTES }, -}; - -gint -main (gint argc, gchar *argv[]) -{ - GstCache *cache; - GstElement *element; - gint i, id; - - gst_init (&argc, &argv); - - cache = gst_cache_factory_make ("memcache"); - g_assert (cache != NULL); - - element = gst_element_factory_make ("identity", "element"); - g_assert (element != NULL); - - gst_cache_get_writer_id (cache, GST_OBJECT (element), &id); - - for (i = 0; i < 100000; i++) { - gst_cache_add_association (cache, 0, 0, GST_FORMAT_BYTES, (gint64)i, GST_FORMAT_TIME, - (gint64) (i * 1000), 0); - } - - for (i = 0; i < (sizeof (cases) / sizeof (GstCacheTestCase)); i++) { - lookup (cache, cases[i].method, cases[i].src_format, cases[i].src_value, cases[i].dest_format); - } - - return 0; -} diff --git a/testsuite/elements/Makefile.am b/testsuite/elements/Makefile.am index 45f858ed..8c6211e 100644 --- a/testsuite/elements/Makefile.am +++ b/testsuite/elements/Makefile.am @@ -1,5 +1,5 @@ if BUILD_FAILING_TESTS -tests_failing = fake +tests_failing = fake else tests_failing = endif -- 2.7.4