Fixed casting in GetIntAt

- fix #29
This commit is contained in:
Federico Barresi
2022-05-18 14:29:28 +02:00
parent eb8448a59c
commit 5a3c85c5f7
3 changed files with 9 additions and 3 deletions

View File

@@ -100,7 +100,7 @@ namespace Sharp7.Tests
[Theory]
[InlineData(new byte[] { 1, 1, 0, 0 }, 0, 257)]
public void TestGetIntAt(byte[] buffer, int pos, int expected) { S7.GetIntAt(buffer, pos).ShouldBe(expected); }
public void TestGetIntAt(byte[] buffer, int pos, short expected) { S7.GetIntAt(buffer, pos).ShouldBe(expected); }
[Theory]
[InlineData(new byte[] { 0, 0, 0, 0 }, 0, 1, new byte[] { 0, 1, 0, 0 })]