Debian Codegraph @

tests/test-ghostpad.cc

raw symbols SCIP
1 /*
2 * test-ghostpad.cc
3 *
4 * Created on: Aug 5, 2013
5 * Author: m.kolny
6 */
7
8 #include "mmtest.h"
9 #include <gstreamermm.h>
10
11 using namespace Gst;
12 using Glib::RefPtr;
13
14 TEST(GhostPadTest, CreatingGhostPad)
15 {
16 Glib::ustring pad_name = "sample_name";
17 PadDirection direction = PAD_SINK;
18 RefPtr<GhostPad> ghost_pad = GhostPad::create(direction, pad_name);
19
20 MM_ASSERT_TRUE(ghost_pad);
21 ASSERT_EQ(direction, ghost_pad->get_direction());
22 ASSERT_STREQ(pad_name.c_str(), ghost_pad->get_name().c_str());
23 }
24
25 TEST(GhostPadTest, CreatingGhostPadFromTemplate)
26 {
27 PadDirection direction = PAD_SRC;
28 RefPtr<Caps> caps = Caps::create_simple("video/x-raw-yuv");
29 RefPtr<PadTemplate> templ = PadTemplate::create("pad-template", direction, PAD_ALWAYS, caps);
30
31 RefPtr<GhostPad> ghost_pad = GhostPad::create(templ);
32
33 MM_ASSERT_TRUE(ghost_pad);
34 ASSERT_EQ(direction, ghost_pad->get_direction());
35 }