Skip to content

Commit 2ea9238

Browse files
test(ui,util): improve code coverage (#614)
* test(ui,util): improve code coverage for JEngine.UI and JEngine.Util Add comprehensive tests to improve code coverage: JEngine.Util: - JActionAwaiterTests: tests for JActionAwaitable and JActionAwaiter - JActionExecutionHandleTests: tests for JActionExecutionHandle, JActionExecutionAwaiter, and JActionExecution structs - JActionNestedExecutionTests: tests for sequential, parallel, and cancellation scenarios JEngine.UI: - EditorUIRegistrationTests: verify handler registration - MessageBoxTests: add real prefab tests using new SkipDontDestroyOnLoad test hook for EditMode compatibility - JDropdownTests: add formatter, edge case, and ForEnum tests - JObjectFieldTests: add panel attachment and BindProperty tests - JTextFieldTests: add panel attachment, placeholder, and edge case tests Also adds SkipDontDestroyOnLoad test hook to MessageBox to enable EditMode testing without DontDestroyOnLoad errors. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net> * chore: update compiled assets and bundles for standalone mode Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net> * fix(test): address code review feedback - Convert sync [Test] to [UnityTest] with await for ExecuteAsync tests - Rename misleading test names to match assertions - Remove handler invocation tests with poor error handling - Use discard for intentionally unused task variables Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net> * fix(util): ensure JAction disposal if ExecuteAsync throws Use 'using var' pattern consistently to ensure JAction is properly disposed even if ExecuteAsync() throws an exception. This addresses the code scanning alert about Dispose not being called on exception. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net> * fix(util): add timeouts to WaitUntil calls in tests Add 5-second timeouts to UniTask.WaitUntil calls to prevent tests from hanging indefinitely if there's a regression. Uses CancellationTokenSource with timeout for deterministic failure behavior. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net> --------- Signed-off-by: JasonXuDeveloper - 傑 <jason@xgamedev.net> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent a4666d0 commit 2ea9238

File tree

80 files changed

+1828
-165
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+1828
-165
lines changed
104 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.
11.5 KB
Binary file not shown.

UnityProject/Assets/HotUpdate/Compiled/AOT/JEngine.UI.dll.bytes.meta

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 Bytes
Binary file not shown.
-512 Bytes
Binary file not shown.

UnityProject/Assets/HybridCLRGenerate/AOTGenericReferences.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ public class AOTGenericReferences : UnityEngine.MonoBehaviour
231231
// System.Func<object,System.ValueTuple<byte,byte>>
232232
// System.Func<object,System.ValueTuple<byte,object>>
233233
// System.Func<object,byte>
234+
// System.Func<object,object,object,object,Cysharp.Threading.Tasks.UniTask<byte>>
234235
// System.Func<object,object>
235236
// System.Func<object>
236237
// System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter<System.ValueTuple<byte,System.ValueTuple<byte,System.ValueTuple<byte,System.ValueTuple<byte,System.ValueTuple<byte,System.ValueTuple<byte,byte>>>>>>>

UnityProject/Assets/HybridCLRGenerate/link.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<assembly fullname="JEngine.Core">
44
<type fullname="JEngine.Core.Bootstrap" preserve="all" />
55
<type fullname="JEngine.Core.Encrypt.EncryptionOption" preserve="all" />
6-
<type fullname="JEngine.Core.Misc.MessageBox" preserve="all" />
6+
<type fullname="JEngine.Core.Prompt" preserve="all" />
77
<type fullname="JEngine.Core.Update.PackageInitializationCallbacks" preserve="all" />
88
<type fullname="JEngine.Core.Update.PackageInitializationStatus" preserve="all" />
99
<type fullname="JEngine.Core.Update.SceneLoadCallbacks" preserve="all" />
@@ -60,6 +60,7 @@
6060
<type fullname="System.Exception" preserve="all" />
6161
<type fullname="System.Func`2" preserve="all" />
6262
<type fullname="System.Func`3" preserve="all" />
63+
<type fullname="System.Func`5" preserve="all" />
6364
<type fullname="System.Int32" preserve="all" />
6465
<type fullname="System.Object" preserve="all" />
6566
<type fullname="System.Runtime.CompilerServices.AsyncStateMachineAttribute" preserve="all" />

UnityProject/Assets/Obfuz/SymbolObfus/symbol-mapping.xml

Lines changed: 133 additions & 52 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)