diff options
author | vitek-karas <vitek.karas@microsoft.com> | 2019-11-29 16:13:31 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2019-11-29 17:33:02 +0300 |
commit | cf0087516e9f15bb880938aec5223598d0676007 (patch) | |
tree | bc0b87745f08f9000755be85b5d2dc144eee6f42 /test | |
parent | 26cb3b8653c0bc3a7ebd85c4794d99f553e36619 (diff) |
Add a simple test for typeof(type)
Diffstat (limited to 'test')
-rw-r--r-- | test/Mono.Linker.Tests.Cases/Reflection/TypeUsedViaReflection.cs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/test/Mono.Linker.Tests.Cases/Reflection/TypeUsedViaReflection.cs b/test/Mono.Linker.Tests.Cases/Reflection/TypeUsedViaReflection.cs index 07a01b1ae..1937b971a 100644 --- a/test/Mono.Linker.Tests.Cases/Reflection/TypeUsedViaReflection.cs +++ b/test/Mono.Linker.Tests.Cases/Reflection/TypeUsedViaReflection.cs @@ -1,6 +1,4 @@ using System; -using System.Diagnostics; -using System.Reflection; using Mono.Linker.Tests.Cases.Expectations.Assertions; namespace Mono.Linker.Tests.Cases.Reflection { @@ -22,6 +20,7 @@ namespace Mono.Linker.Tests.Cases.Reflection { TestMultiDimensionalArrayFullString (); TestMultiDimensionalArrayAsmName (); TestDeeplyNested (); + TestTypeOf (); } [Kept] @@ -174,5 +173,14 @@ namespace Mono.Linker.Tests.Cases.Reflection { { var typeKept = Type.GetType ("Mono.Linker.Tests.Cases.Reflection.TypeUsedViaReflection+Nested1+N2+N3"); } + + [Kept] + class TypeOfToKeep { } + + [Kept] + static void TestTypeOf() + { + var typeKept = typeof(TypeOfToKeep); + } } } |