Skip to content

Commit 0cc8383

Browse files
fix(test): address PR review comments
- JEngineTestBase: save and restore LogAssert.ignoreFailingMessages state - JEngineTestBase: add XML documentation for virtual methods - PanelUITests: remove unused _panel field and cleanup code - PanelUITests: use discard pattern for unused root assignments - BootstrapEditorUITests: use discard pattern for unused root assignments - BuildManager: use LINQ Any() for IsIgnoredError filtering Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net>
1 parent cdee190 commit 0cc8383

4 files changed

Lines changed: 66 additions & 56 deletions

File tree

UnityProject/Packages/com.jasonxudeveloper.jengine.core/Editor/CustomEditor/BuildManager.cs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
using System;
2727
using System.Collections.Generic;
2828
using System.IO;
29+
using System.Linq;
2930
using HybridCLR.Editor;
3031
using HybridCLR.Editor.Commands;
3132
using HybridCLR.Editor.Settings;
@@ -551,14 +552,7 @@ private int CountRealErrors(int recentErrorCount)
551552

552553
private static bool IsIgnoredError(string errorMessage)
553554
{
554-
foreach (var ignoredError in IgnoredErrors)
555-
{
556-
if (errorMessage.Contains(ignoredError))
557-
{
558-
return true;
559-
}
560-
}
561-
return false;
555+
return IgnoredErrors.Any(ignoredError => errorMessage.Contains(ignoredError));
562556
}
563557

564558
private int GetUnityErrorCount()

UnityProject/Packages/com.jasonxudeveloper.jengine.ui/Tests/Editor/Internal/BootstrapEditorUITests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ public void EncryptionDropdown_AllOptions_UpdateConfigFields(EncryptionOption op
389389
_bootstrap.encryptionOption = option;
390390
_serializedObject.Update();
391391

392-
var root = BootstrapEditorUI.CreateInspector(_serializedObject, _bootstrap);
392+
_ = BootstrapEditorUI.CreateInspector(_serializedObject, _bootstrap);
393393

394394
var bundleConfig = EncryptionMapping.GetBundleConfig(option);
395395

@@ -521,9 +521,9 @@ public void CreateInspector_MultipleCalls_DoesNotThrow()
521521
{
522522
Assert.DoesNotThrow(() =>
523523
{
524-
var root1 = BootstrapEditorUI.CreateInspector(_serializedObject, _bootstrap);
525-
var root2 = BootstrapEditorUI.CreateInspector(_serializedObject, _bootstrap);
526-
var root3 = BootstrapEditorUI.CreateInspector(_serializedObject, _bootstrap);
524+
_ = BootstrapEditorUI.CreateInspector(_serializedObject, _bootstrap);
525+
_ = BootstrapEditorUI.CreateInspector(_serializedObject, _bootstrap);
526+
_ = BootstrapEditorUI.CreateInspector(_serializedObject, _bootstrap);
527527
});
528528
}
529529

0 commit comments

Comments
 (0)