Add error enumerators to `enum argpar_iter_parse_next_status`
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 1 Jun 2021 14:13:08 +0000 (10:13 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 4 Jun 2021 17:59:04 +0000 (13:59 -0400)
commitd4d05805c9634c2ca9ae92950d01196917b6b260
treeb4e9218e83e3978303f6842ca46d0efdd81b70d6
parent871eba329ad77b01051cd29ec372f8ae5a401882
Add error enumerators to `enum argpar_iter_parse_next_status`

This patch adds all the possible reasons for a failure of
argpar_iter_parse_next() as error enumerators to
`enum argpar_iter_parse_next_status`.

This will make it possible to convert the `error` parameter of
argpar_iter_parse_next() to a rich error, without any formatted error
message.

In `test_argpar.c`, test_fail() now accepts an expected
argpar_iter_parse_next() status which it forwards to
test_fail_argpar_iter() which ensures that argpar_iter_parse_next()
returns the expected error status.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I9e8e91dea6066bd2ee935d6ca465569a6fd379aa
argpar/argpar.c
argpar/argpar.h
tests/test_argpar.c
This page took 0.03107 seconds and 4 git commands to generate.