diff --git a/com.unity.mobile.android-logcat/Tests/Editor/AndroidLogcatNetTests.cs b/com.unity.mobile.android-logcat/Tests/Editor/AndroidLogcatNetTests.cs index 83bb435..56b9fe2 100644 --- a/com.unity.mobile.android-logcat/Tests/Editor/AndroidLogcatNetTests.cs +++ b/com.unity.mobile.android-logcat/Tests/Editor/AndroidLogcatNetTests.cs @@ -6,7 +6,7 @@ using NUnit.Framework; using UnityEditor; using UnityEditor.Compilation; -using Assembly = System.Reflection.Assembly; +using Unity.Android.Logcat; class AndroidLogcatNetTests { @@ -32,14 +32,13 @@ private UnityEditor.Compilation.Assembly GetLogcatAssembly() [Test] public void ValidateAssemblyReferences() { - var logcatAssembly = GetLogcatAssembly(); - var expectedReferences = new List(new[] { "mscorlib", "System", "System.Xml.Linq", "UnityEngine.IMGUIModule", + "UnityEngine.UICommonModule", "UnityEngine.CoreModule", "UnityEngine.VideoModule", "UnityEngine.TextRenderingModule", @@ -48,11 +47,13 @@ public void ValidateAssemblyReferences() "UnityEngine.ImageConversionModule", "UnityEngine.JSONSerializeModule", "UnityEditor.CoreModule", + "Unity.Scripting", }); var referencedCount = expectedReferences.ToDictionary(s => s, s => 0); - var references = Assembly.ReflectionOnlyLoadFrom(logcatAssembly.outputPath).GetReferencedAssemblies().Select(a => a.Name); + // ReflectionOnlyLoadFrom is unsupported on CoreCLR; inspect the loaded assembly instead. + var references = typeof(AndroidLogcatConsoleWindow).Assembly.GetReferencedAssemblies().Select(a => a.Name); foreach (var r in references) { Assert.Contains(r, expectedReferences, $"Unexpected reference '{r}'");