Use dependency link arguments in C# targets

This commit is contained in:
Niclas Moeslund Overby 2017-08-08 00:38:48 +02:00 committed by Jussi Pakkanen
parent 8c376a7fe4
commit c572d222da
2 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,7 @@
project('C# pkg-config', 'cs')
nunit_dep = dependency('nunit')
nunit_runner = find_program('nunit-console')
test_lib = library('test_lib', 'test-lib.cs', dependencies: nunit_dep)
test('nunit test', nunit_runner, args: test_lib)

View File

@ -0,0 +1,11 @@
using NUnit.Framework;
[TestFixture]
public class NUnitTest
{
[Test]
public void Test()
{
Assert.AreEqual(1 + 1, 2);
}
}