mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 19:21:06 +00:00
gstreamer-sharp: Add test checking AppSrc and AppSink constructors work properly
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1885>
This commit is contained in:
parent
38a3af96d0
commit
1f3ca43c51
2 changed files with 44 additions and 1 deletions
42
subprojects/gstreamer-sharp/Tests/AppTests.cs
Normal file
42
subprojects/gstreamer-sharp/Tests/AppTests.cs
Normal file
|
@ -0,0 +1,42 @@
|
|||
// Copyright (C) 2020 Jakub Adam <jakub.adam@collabora.com>
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 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
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
// 02110-1301 USA
|
||||
|
||||
using NUnit.Framework;
|
||||
using System;
|
||||
using Gst;
|
||||
using Gst.App;
|
||||
|
||||
namespace GstSharp.Tests
|
||||
{
|
||||
[TestFixture]
|
||||
public class AppTests : TestBase
|
||||
{
|
||||
[Test]
|
||||
public void TestAppElementsConstructors()
|
||||
{
|
||||
Gst.Application.Init();
|
||||
|
||||
var appsink = new AppSink("appsink");
|
||||
Assert.IsNotNull(appsink);
|
||||
|
||||
var appsrc = new AppSrc("appsrc");
|
||||
Assert.IsNotNull(appsrc);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -37,7 +37,8 @@ if nunit_console.found()
|
|||
if nunit_dep.found()
|
||||
foreach test: [
|
||||
# 'PipelineTests',
|
||||
'SdpTests'
|
||||
'SdpTests',
|
||||
'AppTests'
|
||||
]
|
||||
lib = shared_library(test, test + '.cs', 'TestBase.cs',
|
||||
cs_args: ['-nowarn:169', '-nowarn:108', '-nowarn:114'],
|
||||
|
|
Loading…
Reference in a new issue