51 строка
1.1 KiB
C#
51 строка
1.1 KiB
C#
using System;
|
|
|
|
using NUnit.Framework;
|
|
|
|
using Xamarin.Tests;
|
|
|
|
namespace GeneratorTests
|
|
{
|
|
[TestFixture ()]
|
|
[Parallelizable (ParallelScope.All)]
|
|
public class ErrorTests
|
|
{
|
|
[Test]
|
|
public void BI0086 ()
|
|
{
|
|
var bgen = new BGenTool ();
|
|
bgen.CreateTemporaryBinding ("");
|
|
bgen.AssertExecuteError ("build");
|
|
bgen.AssertError (86, "A target framework (--target-framework) must be specified.");
|
|
}
|
|
|
|
[Test]
|
|
public void BI1061 ()
|
|
{
|
|
var bgen = new BGenTool ();
|
|
bgen.Profile = Profile.iOS;
|
|
bgen.CreateTemporaryBinding (@"using System;
|
|
using Foundation;
|
|
|
|
namespace Bug52570Tests {
|
|
|
|
[Category]
|
|
[BaseType (typeof (FooObject))]
|
|
interface FooObject_Extensions {
|
|
|
|
[Static]
|
|
[Export (""someMethod:"")]
|
|
bool SomeMethod (NSRange range);
|
|
}
|
|
|
|
[BaseType (typeof (NSObject))]
|
|
interface FooObject {
|
|
|
|
}
|
|
}");
|
|
bgen.AssertExecute ("build");
|
|
bgen.AssertWarning (1117, "The SomeMethod member is decorated with [Static] and its container class Bug52570Tests.FooObject_Extensions is decorated with [Category] this leads to hard to use code. Please inline SomeMethod into Bug52570Tests.FooObject class.");
|
|
}
|
|
}
|
|
}
|