Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This pull request fixes code compilation errors in player builds by conditionally compiling test assertions and flags with UNITY_EDITOR preprocessor directives.
- Wrapped LogAssert calls with UNITY_EDITOR directives to prevent compilation errors in player builds.
- Added TODO comments indicating that a solution for player builds is needed.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| Assets/_PackageRoot/Tests/Base/Utils/TestUtils.LoadFail.cs | Wrapped LogAssert.Expect in UNITY_EDITOR to avoid compilation errors in player builds. |
| Assets/_PackageRoot/Tests/Base/Utils/TestUtils.cs | Wrapped LogAssert.ignoreFailingMessages assignments in UNITY_EDITOR blocks to fix player build compilation errors. |
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a compilation error in player builds by updating references to UnityEngine.TestTools.LogAssert across several test files. The changes ensure that test builds using player runtimes no longer fail due to missing using directives for LogAssert.
- Removed the generic using directive for UnityEngine.TestTools from test files where it caused build issues.
- Replaced unqualified LogAssert calls with fully qualified UnityEngine.TestTools.LogAssert calls in TestUtils.LoadFail.cs and TestUtils.cs.
- Adjusted the ordering of using directives in TestConcurrency.cs for consistency.
Reviewed Changes
Copilot reviewed 3 out of 7 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| Assets/_PackageRoot/Tests/Base/Utils/TestUtils.LoadFail.cs | Updated LogAssert usage to resolve compilation error in player build. |
| Assets/_PackageRoot/Tests/Runtime/TestConcurrency.cs | Moved UnityEngine.TestTools directive to improve consistency. |
| Assets/_PackageRoot/Tests/Base/Utils/TestUtils.cs | Updated LogAssert.ignoreFailingMessages usage with full namespace for player build compatibility. |
Files not reviewed (4)
- Assets/_PackageRoot/Tests/Base/Extensions.Unity.ImageLoader.Tests.asmdef: Language not supported
- Assets/_PackageRoot/Tests/Editor/Extensions.Unity.ImageLoader.Tests.Editor.asmdef: Language not supported
- Assets/_PackageRoot/Tests/Runtime/Extensions.Unity.ImageLoader.Tests.Runtime.asmdef: Language not supported
- Assets/_PackageRoot/package.json: Language not supported
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.