Skip to content

refactored i128,u128,1256,u256 #100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Substrate.NetApi.Test/TypeConverters/BaseTypesTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
using Microsoft.VisualStudio.TestPlatform.ObjectModel;
using System.Numerics;

namespace Substrate.NetApi.Test
{
Expand Down Expand Up @@ -248,9 +249,9 @@ public void BaseComTest()
Assert.AreNotEqual(baseComFromValue.Value, new BaseCom<U64>(new CompactInteger(new U64(20))).Value);
Assert.AreEqual(baseComFromValue.TypeSize, new BaseCom<U64>(new CompactInteger(new U64(20))).TypeSize);

Assert.AreEqual(baseComFromValue.Bytes, new BaseCom<U128>(new CompactInteger(new U128(10))).Bytes);
Assert.AreEqual(baseComFromValue.Value, new BaseCom<U128>(new CompactInteger(new U128(10))).Value);
Assert.AreEqual(baseComFromValue.TypeSize, new BaseCom<U128>(new CompactInteger(new U128(10))).TypeSize);
Assert.AreEqual(baseComFromValue.Bytes, new BaseCom<U128>(new CompactInteger((U128) new BigInteger(10))).Bytes);
Assert.AreEqual(baseComFromValue.Value, new BaseCom<U128>(new CompactInteger((U128)new BigInteger(10))).Value);
Assert.AreEqual(baseComFromValue.TypeSize, new BaseCom<U128>(new CompactInteger((U128)new BigInteger(10))).TypeSize);

// Test explicit conversion from CompactInteger to BaseCom
var compactInt = new CompactInteger(new U64(10));
Expand Down
Loading
Loading