From a5ede02fd66018ae1ecef6cc7174955fa3a9d499 Mon Sep 17 00:00:00 2001 From: Irvin Date: Wed, 11 Dec 2024 20:01:10 +0700 Subject: [PATCH] Update BigIntUnstringifier test. #119 --- .../Tests/BigIntUnstringifierTest.cs | 30 ------------------ Assets/Sui-Unity-SDK/Tests/ZKLogin.meta | 8 +++++ .../Tests/ZKLogin/BigIntUnstringifierTest.cs | 31 +++++++++++++++++++ .../BigIntUnstringifierTest.cs.meta | 0 4 files changed, 39 insertions(+), 30 deletions(-) delete mode 100644 Assets/Sui-Unity-SDK/Tests/BigIntUnstringifierTest.cs create mode 100644 Assets/Sui-Unity-SDK/Tests/ZKLogin.meta create mode 100644 Assets/Sui-Unity-SDK/Tests/ZKLogin/BigIntUnstringifierTest.cs rename Assets/Sui-Unity-SDK/Tests/{ => ZKLogin}/BigIntUnstringifierTest.cs.meta (100%) diff --git a/Assets/Sui-Unity-SDK/Tests/BigIntUnstringifierTest.cs b/Assets/Sui-Unity-SDK/Tests/BigIntUnstringifierTest.cs deleted file mode 100644 index 73f8dda..0000000 --- a/Assets/Sui-Unity-SDK/Tests/BigIntUnstringifierTest.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -using NUnit.Framework; -using OpenDive.Crypto.PoseidonLite.Constants; -using UnityEngine.Windows; -using OpenDive.Crypto.PoseidonLite; -using System.Numerics; - -public class BigIntUnstringifierTest : MonoBehaviour -{ - [Test] - public void UnstrinifyBigInt1() - { - var constant1 = new Dictionary - { - ["C"] = C1.C, - ["M"] = C1.M - }; - - var result = BigIntUnstringifier.UnstringifyBigInts(constant1); - - // Access C array - var cArray = (List)result["C"]; - - // Access M array (list of lists) - var mArray = (List>)result["M"]; - } -} diff --git a/Assets/Sui-Unity-SDK/Tests/ZKLogin.meta b/Assets/Sui-Unity-SDK/Tests/ZKLogin.meta new file mode 100644 index 0000000..f0ade96 --- /dev/null +++ b/Assets/Sui-Unity-SDK/Tests/ZKLogin.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 26dccc76b48f64a129ae0bdda1dadbd3 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Sui-Unity-SDK/Tests/ZKLogin/BigIntUnstringifierTest.cs b/Assets/Sui-Unity-SDK/Tests/ZKLogin/BigIntUnstringifierTest.cs new file mode 100644 index 0000000..6222514 --- /dev/null +++ b/Assets/Sui-Unity-SDK/Tests/ZKLogin/BigIntUnstringifierTest.cs @@ -0,0 +1,31 @@ +using System.Collections.Generic; +using UnityEngine; +using NUnit.Framework; +using OpenDive.Crypto.PoseidonLite.Constants; +using OpenDive.Crypto.PoseidonLite; +using System.Numerics; + +namespace Sui.Tests.ZkLogin +{ + public class BigIntUnstringifierTest : MonoBehaviour + { + [Test] + public void UnstrinifyBigInt1() + { + var constant1 = new Dictionary + { + ["C"] = C1.C, + ["M"] = C1.M + }; + + var result = BigIntUnstringifier.UnstringifyBigInts(constant1); + + // Access C array + var cArray = (List)result["C"]; + + // Access M array (list of lists) + var mArray = (List>)result["M"]; + } + } + +} \ No newline at end of file diff --git a/Assets/Sui-Unity-SDK/Tests/BigIntUnstringifierTest.cs.meta b/Assets/Sui-Unity-SDK/Tests/ZKLogin/BigIntUnstringifierTest.cs.meta similarity index 100% rename from Assets/Sui-Unity-SDK/Tests/BigIntUnstringifierTest.cs.meta rename to Assets/Sui-Unity-SDK/Tests/ZKLogin/BigIntUnstringifierTest.cs.meta