From 3a162727501ad0c56d5d6561cace115d858eacb7 Mon Sep 17 00:00:00 2001 From: Ebrahim Byagowi Date: Tue, 3 Sep 2019 17:19:33 +0430 Subject: [PATCH] [test] resolve msvc complain on signedness comparing --- src/test-number.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/test-number.cc b/src/test-number.cc index 4984149a2..8ec66eecf 100644 --- a/src/test-number.cc +++ b/src/test-number.cc @@ -100,7 +100,7 @@ main (int argc, char **argv) float pv; assert (hb_parse_float (&pp, end, &pv)); assert ((int) (pv * 1000.f) == 123); - assert (pp - str == ARRAY_LENGTH (str) - 1); + assert (pp - str == 4); assert (end - pp == 1); } @@ -112,7 +112,7 @@ main (int argc, char **argv) float pv; assert (hb_parse_float (&pp, end, &pv)); assert ((int) (pv * 1000.f) == 123); - assert (pp - str == ARRAY_LENGTH (str) - 1); + assert (pp - str == 5); assert (end - pp == 0); } @@ -124,7 +124,7 @@ main (int argc, char **argv) float pv; assert (hb_parse_float (&pp, end, &pv)); assert ((int) (pv * 1000.f) == 123); - assert (pp - str == ARRAY_LENGTH (str) - 1); + assert (pp - str == 7); assert (end - pp == 0); } @@ -136,7 +136,7 @@ main (int argc, char **argv) float pv; assert (hb_parse_float (&pp, end, &pv)); assert ((int) (pv * 1000.f) == 123); - assert (pp - str == ARRAY_LENGTH (str) - 1); + assert (pp - str == 6); assert (end - pp == 0); } @@ -148,7 +148,7 @@ main (int argc, char **argv) float pv; assert (hb_parse_float (&pp, end, &pv)); assert ((int) (pv * 1000.f) == 123); - assert (pp - str == ARRAY_LENGTH (str) - 1); + assert (pp - str == 10); assert (end - pp == 0); } @@ -160,7 +160,7 @@ main (int argc, char **argv) float pv; assert (hb_parse_float (&pp, end, &pv)); assert ((int) (pv * 1000.f) == -123); - assert (pp - str == ARRAY_LENGTH (str) - 1); + assert (pp - str == 13); assert (end - pp == 0); } @@ -172,7 +172,7 @@ main (int argc, char **argv) float pv; assert (hb_parse_float (&pp, end, &pv)); assert ((int) (pv * 1000.f) == -123); - assert (pp - str == ARRAY_LENGTH (str) - 1); + assert (pp - str == 8); assert (end - pp == 0); }