diff --git a/Assets/_PackageRoot/Tests/Base/Extensions.Unity.ImageLoader.Tests.asmdef b/Assets/_PackageRoot/Tests/Base/Extensions.Unity.ImageLoader.Tests.asmdef index dcaeb90..5aaddc4 100644 --- a/Assets/_PackageRoot/Tests/Base/Extensions.Unity.ImageLoader.Tests.asmdef +++ b/Assets/_PackageRoot/Tests/Base/Extensions.Unity.ImageLoader.Tests.asmdef @@ -8,12 +8,14 @@ "includePlatforms": [], "excludePlatforms": [], "allowUnsafeCode": false, - "overrideReferences": false, + "overrideReferences": true, "precompiledReferences": [ - "NSubstitute.dll" + "nunit.framework.dll" + ], + "autoReferenced": false, + "defineConstraints": [ + "UNITY_INCLUDE_TESTS" ], - "autoReferenced": true, - "defineConstraints": [], "versionDefines": [], "noEngineReferences": false } \ No newline at end of file diff --git a/Assets/_PackageRoot/Tests/Base/Utils/TestUtils.LoadFail.cs b/Assets/_PackageRoot/Tests/Base/Utils/TestUtils.LoadFail.cs index 8076c04..1bafc99 100644 --- a/Assets/_PackageRoot/Tests/Base/Utils/TestUtils.LoadFail.cs +++ b/Assets/_PackageRoot/Tests/Base/Utils/TestUtils.LoadFail.cs @@ -28,8 +28,10 @@ public static IEnumerator LoadFail(string url, FutureLoadingFrom? expectedLoadin futureListener.Assert_Events_Contains(expectedLoadingFrom.Value.ToEventName()); var task1 = future.AsTask(); + if (expectedLoadingFrom.HasValue && expectedLoadingFrom.Value == FutureLoadingFrom.Source) // exception should be thrown only if ONLY loading from Source - LogAssert.Expect(LogType.Error, $"[ImageLoader] Future[id={future.Id}] Timeout ({timeout}): {url}"); + LogAssert.Expect(LogType.Error, $"[ImageLoader] Future[id={future.Id}] Timeout ({timeout}): {url}"); // compilation error in player build + yield return TestUtils.WaitWhile(() => future.IsInProgress, TimeSpan.FromSeconds(10)); var task2 = future.AsTask(); diff --git a/Assets/_PackageRoot/Tests/Base/Utils/TestUtils.cs b/Assets/_PackageRoot/Tests/Base/Utils/TestUtils.cs index 7ffd901..503e6be 100644 --- a/Assets/_PackageRoot/Tests/Base/Utils/TestUtils.cs +++ b/Assets/_PackageRoot/Tests/Base/Utils/TestUtils.cs @@ -32,14 +32,17 @@ public static IEnumerator ClearEverything(string message) { if (message != null) Debug.Log(message.PadRight(50, '-')); - LogAssert.ignoreFailingMessages = true; + + LogAssert.ignoreFailingMessages = true; // compilation error in player build + UniTaskScheduler.UnobservedExceptionWriteLogType = LogType.Exception; ImageLoader.ClearSpriteRef(); ImageLoader.ClearTextureRef(); yield return ImageLoader.ClearCacheAll().TimeoutCoroutine(TimeSpan.FromSeconds(10)); WaitForGCFast(); - LogAssert.ignoreFailingMessages = false; + + LogAssert.ignoreFailingMessages = false; // compilation error in player build } public static void WaitForGCFast() { diff --git a/Assets/_PackageRoot/Tests/Editor/Extensions.Unity.ImageLoader.Tests.Editor.asmdef b/Assets/_PackageRoot/Tests/Editor/Extensions.Unity.ImageLoader.Tests.Editor.asmdef index 0cb286a..233d018 100644 --- a/Assets/_PackageRoot/Tests/Editor/Extensions.Unity.ImageLoader.Tests.Editor.asmdef +++ b/Assets/_PackageRoot/Tests/Editor/Extensions.Unity.ImageLoader.Tests.Editor.asmdef @@ -12,12 +12,14 @@ ], "excludePlatforms": [], "allowUnsafeCode": false, - "overrideReferences": false, + "overrideReferences": true, "precompiledReferences": [ - "NSubstitute.dll" + "nunit.framework.dll" + ], + "autoReferenced": false, + "defineConstraints": [ + "UNITY_INCLUDE_TESTS" ], - "autoReferenced": true, - "defineConstraints": [], "versionDefines": [], "noEngineReferences": false } \ No newline at end of file diff --git a/Assets/_PackageRoot/Tests/Runtime/Extensions.Unity.ImageLoader.Tests.Runtime.asmdef b/Assets/_PackageRoot/Tests/Runtime/Extensions.Unity.ImageLoader.Tests.Runtime.asmdef index 91b1c32..2bb0f58 100644 --- a/Assets/_PackageRoot/Tests/Runtime/Extensions.Unity.ImageLoader.Tests.Runtime.asmdef +++ b/Assets/_PackageRoot/Tests/Runtime/Extensions.Unity.ImageLoader.Tests.Runtime.asmdef @@ -9,12 +9,14 @@ "includePlatforms": [], "excludePlatforms": [], "allowUnsafeCode": false, - "overrideReferences": false, + "overrideReferences": true, "precompiledReferences": [ - "NSubstitute.dll" + "nunit.framework.dll" + ], + "autoReferenced": false, + "defineConstraints": [ + "UNITY_INCLUDE_TESTS" ], - "autoReferenced": true, - "defineConstraints": [], "versionDefines": [], "noEngineReferences": false } \ No newline at end of file diff --git a/Assets/_PackageRoot/Tests/Runtime/TestConcurrency.cs b/Assets/_PackageRoot/Tests/Runtime/TestConcurrency.cs index 546d16a..283bfe6 100644 --- a/Assets/_PackageRoot/Tests/Runtime/TestConcurrency.cs +++ b/Assets/_PackageRoot/Tests/Runtime/TestConcurrency.cs @@ -3,10 +3,10 @@ using System.Collections; using NUnit.Framework; using Cysharp.Threading.Tasks; -using UnityEngine.TestTools; using UnityEngine; using System.Threading.Tasks; using Extensions.Unity.ImageLoader.Tests.Utils; +using UnityEngine.TestTools; namespace Extensions.Unity.ImageLoader.Tests { diff --git a/Assets/_PackageRoot/package.json b/Assets/_PackageRoot/package.json index dc9ee8a..8c1b3ed 100644 --- a/Assets/_PackageRoot/package.json +++ b/Assets/_PackageRoot/package.json @@ -7,7 +7,7 @@ "url": "https://github.com/IvanMurzak" }, "license": "MIT", - "version": "7.0.0", + "version": "7.0.1", "unity": "2019.4", "description": "Asynchronous image loading from remote or local destination. It has two layers of configurable Memory and Disk cache systems.", "keywords": [