Skip to content

Commit

Permalink
update test key name (neo-project#2839)
Browse files Browse the repository at this point in the history
* update test key name

* Change value too

---------

Co-authored-by: Shargon <[email protected]>
  • Loading branch information
Jim8y and shargon authored Feb 2, 2023
1 parent ba957ff commit a84d6ec
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 a84d6ec

Please sign in to comment.