Skip to content

Commit

Permalink
tests/getvaluetest.c: add a couple more test expectations
Browse files Browse the repository at this point in the history
  • Loading branch information
jimklimov committed Nov 2, 2021
1 parent 63ca15e commit 60f3a3d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/getvaluetest.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ static int RunBuiltInTests(char *argv[]) {
{.buf = "00 ff", .Offset = 0, .Size = 8, .LogMin = -1, .LogMax = 127, .expectedValue = -1},
{.buf = "00 ff", .Offset = 0, .Size = 8, .LogMin = 0, .LogMax = 127, .expectedValue = 127},
{.buf = "00 ff", .Offset = 0, .Size = 8, .LogMin = 0, .LogMax = 255, .expectedValue = 255},
{.buf = "13 14", .Offset = 0, .Size = 8, .LogMin = 0, .LogMax = 255, .expectedValue = 20},
{.buf = "0f 17 09", .Offset = 0, .Size = 16, .LogMin = 0, .LogMax = 65535, .expectedValue = 2327}, // 0x0917 => 232.7V in a UPS.Input.Voltage after conversions
{.buf = "33 00 0a 08 80", .Offset = 0, .Size = 32, .LogMin = 0, .LogMax = 65535, .expectedValue = 2560},
{.buf = "00 00 08 00 00", .Offset = 0, .Size = 32, .LogMin = 0, .LogMax = 65535, .expectedValue = 2048},
{.buf = "06 00 00 08", .Offset = 0, .Size = 8, .LogMin = 0, .LogMax = 255, .expectedValue = 0},
Expand Down

0 comments on commit 60f3a3d

Please sign in to comment.