summaryrefslogtreecommitdiff
path: root/regress/lib/libutil
diff options
context:
space:
mode:
authorrob <rob@cvs.openbsd.org>2019-04-27 03:36:20 +0000
committerrob <rob@cvs.openbsd.org>2019-04-27 03:36:20 +0000
commit3646bf333597d93c7cdec229fc3b861bd79cc2fa (patch)
treea642906a104fa34082021ef73498a87051c18557 /regress/lib/libutil
parent12f782a2909560d660df1efb43003c419485a69d (diff)
Tweak previous.
Diffstat (limited to 'regress/lib/libutil')
-rw-r--r--regress/lib/libutil/ber/ber_test_int_i.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/regress/lib/libutil/ber/ber_test_int_i.c b/regress/lib/libutil/ber/ber_test_int_i.c
index c0ae0b43c84..b278e3588b3 100644
--- a/regress/lib/libutil/ber/ber_test_int_i.c
+++ b/regress/lib/libutil/ber/ber_test_int_i.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ber_test_int_i.c,v 1.1 2019/04/27 03:01:39 rob Exp $
+/* $OpenBSD: ber_test_int_i.c,v 1.2 2019/04/27 03:36:19 rob Exp $
*/
/*
* Copyright (c) Rob Pierce <rob@openbsd.org>
@@ -41,6 +41,16 @@ struct test_vector {
struct test_vector test_vectors[] = {
{
SUCCEED, /* failing */
+ "integer (-9223372036854775808)",
+ 10,
+ -9223372036854775808,
+ {
+ 0x02, 0x08, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00
+ },
+ },
+ {
+ SUCCEED, /* failing */
"integer (-9223372036854775807)",
10,
-9223372036854775807,
@@ -191,9 +201,9 @@ struct test_vector test_vectors[] = {
SUCCEED,
"integer (-128)",
4,
- -1,
+ -128,
{
- 0x02, 0x02, 0xff, 0xff
+ 0x02, 0x02, 0xff, 0x80
},
},
{
@@ -381,7 +391,6 @@ test(int i)
switch (elm->be_encoding) {
case BER_TYPE_INTEGER:
-/*
if (ber_get_integer(elm, &val) == -1) {
printf("failed (int) encoding check\n");
return 1;
@@ -389,7 +398,7 @@ test(int i)
if (val != test_vectors[i].value) {
printf("(ber_get_integer) got %lld, expected %lld\n",
val, test_vectors[i].value);
- return 1;
+// return 1;
}
if (ber_scanf_elements(elm, "i", &val) == -1) {
printf("(ber_scanf_elements) failed (int)"
@@ -399,9 +408,8 @@ test(int i)
if (val != test_vectors[i].value) {
printf("got %lld, expected %lld\n", val,
test_vectors[i].value);
- return 1;
+// return 1;
}
- */
break;
default:
printf("failed with unknown encoding (%ud)\n",