Fix String conversion

This commit is contained in:
Peter Butzhammer
2024-02-06 17:19:23 +01:00
parent f45e2c8b1f
commit b87480c4f9
2 changed files with 8 additions and 1 deletions

View File

@@ -31,6 +31,7 @@ public class S7ValueConverterTests
[TestCase(0.25f, "DB0.D0", new byte[] {0x3E, 0x80, 0x00, 0x00})]
[TestCase(0.25, "DB0.D0", new byte[] {0x3E, 0x80, 0x00, 0x00})]
[TestCase("ABCD", "DB0.string0.4", new byte[] {0x00, 0x04, 0x41, 0x42, 0x43, 0x44})]
[TestCase("ABCD", "DB0.string0.4", new byte[] {0x00, 0xF0, 0x41, 0x42, 0x43, 0x44})] // Clip to length in Address
[TestCase("ABCD", "DB0.DBB0.4", new byte[] {0x41, 0x42, 0x43, 0x44})]
public void Parse<T>(T expected, string address, byte[] data)
{