2014-08-13 10:39:27 +01:00
|
|
|
using System.Linq;
|
|
|
|
|
|
|
|
using NUnit.Framework;
|
|
|
|
|
|
|
|
using Mono.Cecil.Rocks;
|
|
|
|
|
|
|
|
namespace Mono.Cecil.Tests {
|
|
|
|
|
|
|
|
[TestFixture]
|
|
|
|
public class ModuleDefinitionRocksTests : BaseTestFixture {
|
|
|
|
|
2016-11-10 13:04:39 +00:00
|
|
|
[Test]
|
|
|
|
public void GetAllTypesTest ()
|
2014-08-13 10:39:27 +01:00
|
|
|
{
|
2016-11-10 13:04:39 +00:00
|
|
|
TestCSharp ("Types.cs", module => {
|
|
|
|
var sequence = new [] {
|
2014-08-13 10:39:27 +01:00
|
|
|
module.GetType ("<Module>"),
|
|
|
|
module.GetType ("Foo"),
|
|
|
|
module.GetType ("Foo/Bar"),
|
|
|
|
module.GetType ("Foo/Gazonk"),
|
|
|
|
module.GetType ("Foo/Gazonk/Baz"),
|
|
|
|
module.GetType ("Pan"),
|
|
|
|
};
|
|
|
|
|
2016-11-10 13:04:39 +00:00
|
|
|
Assert.IsTrue (sequence.SequenceEqual (module.GetAllTypes ()));
|
|
|
|
});
|
2014-08-13 10:39:27 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|