From bde3caa0e06e5d630ee0beb1404047f56e3a920e Mon Sep 17 00:00:00 2001 From: Irvin Date: Fri, 15 Nov 2024 18:32:33 +0700 Subject: [PATCH] Add dummy tests for BigIntUnstringifier. #119 --- .../Tests/BigIntUnstringifierTest.cs | 30 +++++++++++++++++++ .../Tests/BigIntUnstringifierTest.cs.meta | 11 +++++++ 2 files changed, 41 insertions(+) create mode 100644 Assets/Sui-Unity-SDK/Tests/BigIntUnstringifierTest.cs create mode 100644 Assets/Sui-Unity-SDK/Tests/BigIntUnstringifierTest.cs.meta diff --git a/Assets/Sui-Unity-SDK/Tests/BigIntUnstringifierTest.cs b/Assets/Sui-Unity-SDK/Tests/BigIntUnstringifierTest.cs new file mode 100644 index 0000000..73f8dda --- /dev/null +++ b/Assets/Sui-Unity-SDK/Tests/BigIntUnstringifierTest.cs @@ -0,0 +1,30 @@ +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/BigIntUnstringifierTest.cs.meta b/Assets/Sui-Unity-SDK/Tests/BigIntUnstringifierTest.cs.meta new file mode 100644 index 0000000..0466e05 --- /dev/null +++ b/Assets/Sui-Unity-SDK/Tests/BigIntUnstringifierTest.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 263595c04c6a840e4a58b4fe41913499 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: