1 // 2 // SignatureHelperTest.cs 3 // 4 // Author: Atsushi Enomoto <atsushi@ximian.com> 5 // 6 // Copyright (C) 2007 Novell, Inc. 7 // 8 using System; 9 using System.Reflection; 10 using System.Reflection.Emit; 11 using NUnit.Framework; 12 13 namespace MonoTests.System.Reflection.Emit 14 { 15 [TestFixture] 16 public class SignatureHelperTest 17 { 18 [Test] GetFieldSigHelperNullModule()19 public void GetFieldSigHelperNullModule () 20 { 21 SignatureHelper.GetFieldSigHelper (null); 22 } 23 24 [Test] GetLocalVarSigHelperNullModule()25 public void GetLocalVarSigHelperNullModule () 26 { 27 SignatureHelper.GetLocalVarSigHelper (null); 28 } 29 30 [Test] GetMethodSigHelperNullModule()31 public void GetMethodSigHelperNullModule () 32 { 33 SignatureHelper.GetMethodSigHelper (null, CallingConventions.Standard, typeof (int)); 34 } 35 36 [Test] 37 [ExpectedException (typeof (ArgumentException))] GetFieldSigHelperNormalModule()38 public void GetFieldSigHelperNormalModule () 39 { 40 SignatureHelper.GetFieldSigHelper (typeof (int).Module); 41 } 42 43 [Test] 44 [ExpectedException (typeof (ArgumentException))] GetLocalVarSigHelperNormalModule()45 public void GetLocalVarSigHelperNormalModule () 46 { 47 SignatureHelper.GetLocalVarSigHelper (typeof (int).Module); 48 } 49 50 [Test] 51 [ExpectedException (typeof (ArgumentException))] GetMethodSigHelperNormalModule()52 public void GetMethodSigHelperNormalModule () 53 { 54 SignatureHelper.GetMethodSigHelper (typeof (int).Module, CallingConventions.Standard, typeof (int)); 55 } 56 } 57 } 58