Skip to content

Commit

Permalink
Merge branch 'master' into Add-zkp
Browse files Browse the repository at this point in the history
  • Loading branch information
erikzhang authored Feb 5, 2023
2 parents b38a4a2 + a84d6ec commit 8d9038d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/Neo.UnitTests/SmartContract/UT_KeyBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ namespace Neo.UnitTests.SmartContract
[TestClass]
public class UT_KeyBuilder
{
private struct A
private struct TestKey
{
public int x;
public int Value;
}

[TestMethod]
Expand All @@ -28,11 +28,11 @@ public void Test()
Assert.AreEqual("010000000203040000000000000000000000000000000000000000", key.ToArray().ToHexString());

key = new KeyBuilder(1, 2);
key = key.Add(new A() { x = 123 });
key = key.Add(new TestKey { Value = 123 });
Assert.AreEqual("01000000027b000000", key.ToArray().ToHexString());

key = new KeyBuilder(1, 0);
key = key.AddBigEndian(new A() { x = 1 });
key = key.AddBigEndian(new TestKey { Value = 1 });
Assert.AreEqual("010000000000000001", key.ToArray().ToHexString());
}
}
Expand Down

0 comments on commit 8d9038d

Please sign in to comment.