1 /*
2 * GStreamer AVTP Plugin
3 * Copyright (C) 2019 Intel Corporation
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later
9 * version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the
18 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301 USA
20 */
21
22 #include <gst/check/gstcheck.h>
23
GST_START_TEST(test_properties)24 GST_START_TEST (test_properties)
25 {
26 GstElement *element;
27 const gchar *ifname = "enp1s0";
28 const gchar *address = "01:AA:BB:CC:DD:EE";
29 gchar *str;
30
31 element = gst_check_setup_element ("avtpsrc");
32
33 g_object_set (G_OBJECT (element), "ifname", ifname, NULL);
34 g_object_get (G_OBJECT (element), "ifname", &str, NULL);
35 fail_unless_equals_string (str, ifname);
36 g_free (str);
37
38 g_object_set (G_OBJECT (element), "address", address, NULL);
39 g_object_get (G_OBJECT (element), "address", &str, NULL);
40 fail_unless_equals_string (str, address);
41 g_free (str);
42
43 gst_check_teardown_element (element);
44 }
45
46 GST_END_TEST;
47
48 static Suite *
avtpsrc_suite(void)49 avtpsrc_suite (void)
50 {
51 Suite *s = suite_create ("avtpsrc");
52 TCase *tc_chain = tcase_create ("general");
53
54 suite_add_tcase (s, tc_chain);
55 tcase_add_test (tc_chain, test_properties);
56
57 return s;
58 }
59
60 GST_CHECK_MAIN (avtpsrc);
61