From 9f1df119405758e215967616aa2461035633c2d2 Mon Sep 17 00:00:00 2001 From: Sinai <49360850+sinai-dev@users.noreply.github.com> Date: Sat, 8 Jan 2022 17:56:56 +1100 Subject: [PATCH] Add some more tests --- src/Core/Tests/TestClass.cs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/Core/Tests/TestClass.cs b/src/Core/Tests/TestClass.cs index f261ef2..ccec61d 100644 --- a/src/Core/Tests/TestClass.cs +++ b/src/Core/Tests/TestClass.cs @@ -14,7 +14,7 @@ using UnhollowerBaseLib; namespace UnityExplorer.Tests { - public static class TestClass + public class TestClass { static TestClass() { @@ -54,6 +54,12 @@ namespace UnityExplorer.Tests } } + public int this[int index] + { + get => UnityEngine.Random.Range(0, int.MaxValue); + set => ExplorerCore.Log(index); + } + // Test methods private static object GetRandomObject() @@ -87,11 +93,12 @@ namespace UnityExplorer.Tests Vector3 vector, Quaternion quaternion, object obj, - Type type) + Type type, + GameObject go) { ExplorerCore.Log($"_string: {_string}, integer: {integer}, color: {color.ToString()}, flags: {flags}, " + $"vector: {vector.ToString()}, quaternion: {quaternion.ToString()}, obj: {obj?.ToString() ?? "null"}," + - $"type: {type?.FullName ?? "null"}"); + $"type: {type?.FullName ?? "null"}, go: {go?.ToString() ?? "null"}"); } private static void Init_Mono()