summaryrefslogtreecommitdiff
path: root/test/pkstn.c
diff options
context:
space:
mode:
authorJonathan Bradley <jcb@pikum.xyz>2025-04-04 15:11:53 -0400
committerJonathan Bradley <jcb@pikum.xyz>2025-04-04 15:13:55 -0400
commit5e2783b6a8a65aba17789aa388c320bb85804d45 (patch)
tree13d5ba5802f8fe04ea872da7cbb0a03b7c81ea93 /test/pkstn.c
parent5715acd12cae75cc5fdf395567cb5603fd906a71 (diff)
pkstn: INCONVERTIBLE overhaul
Diffstat (limited to 'test/pkstn.c')
-rw-r--r--test/pkstn.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/test/pkstn.c b/test/pkstn.c
index 8884804..032d7e2 100644
--- a/test/pkstn.c
+++ b/test/pkstn.c
@@ -8,12 +8,13 @@ int main(int argc, char *argv[])
{
(void)argc;
(void)argv;
+ char *s;
enum PK_STN_RES res = {0};
// stn_int64_t
{
int64_t i = {0};
- res = pk_stn_int64_t(&i, "-1", 0);
+ res = pk_stn_int64_t(&i, "-1", &s, 0);
fprintf(stdout, "pkstn: stn_int64_t res: %ld\n", i);
if (res != PK_STN_RES_SUCCESS) exit(1);
if (-1 != i) exit(1);
@@ -22,7 +23,7 @@ int main(int argc, char *argv[])
// stn_uint64_t
{
uint64_t i = {0};
- res = pk_stn_uint64_t(&i, "1", 0);
+ res = pk_stn_uint64_t(&i, "1", &s, 0);
fprintf(stdout, "pkstn: stn_uint64_t res: %lu\n", i);
if (res != PK_STN_RES_SUCCESS) exit(1);
if (1 != i) exit(1);
@@ -31,7 +32,7 @@ int main(int argc, char *argv[])
// stn_int32_t
{
int32_t i = {0};
- res = pk_stn_int32_t(&i, "-1", 0);
+ res = pk_stn_int32_t(&i, "-1", &s, 0);
fprintf(stdout, "pkstn: stn_int32_t res: %d\n", i);
if (res != PK_STN_RES_SUCCESS) exit(1);
if (-1 != i) exit(1);
@@ -40,7 +41,7 @@ int main(int argc, char *argv[])
// stn_uint32_t
{
uint32_t i = {0};
- res = pk_stn_uint32_t(&i, "1", 0);
+ res = pk_stn_uint32_t(&i, "1", &s, 0);
fprintf(stdout, "pkstn: stn_uint32_t res: %u\n", i);
if (res != PK_STN_RES_SUCCESS) exit(1);
if (1 != i) exit(1);
@@ -49,7 +50,7 @@ int main(int argc, char *argv[])
// stn_int16_t
{
int16_t i = {0};
- res = pk_stn_int16_t(&i, "-1", 0);
+ res = pk_stn_int16_t(&i, "-1", &s, 0);
fprintf(stdout, "pkstn: stn_int16_t res: %d\n", i);
if (res != PK_STN_RES_SUCCESS) exit(1);
if (-1 != i) exit(1);
@@ -58,7 +59,7 @@ int main(int argc, char *argv[])
// stn_uint16_t
{
uint16_t i = {0};
- res = pk_stn_uint16_t(&i, "1", 0);
+ res = pk_stn_uint16_t(&i, "1", &s, 0);
fprintf(stdout, "pkstn: stn_uint16_t res: %u\n", i);
if (res != PK_STN_RES_SUCCESS) exit(1);
if (1 != i) exit(1);
@@ -67,7 +68,7 @@ int main(int argc, char *argv[])
// stn_int8_t
{
int8_t i = {0};
- res = pk_stn_int8_t(&i, "-1", 0);
+ res = pk_stn_int8_t(&i, "-1", &s, 0);
fprintf(stdout, "pkstn: stn_int8_t res: %d\n", i);
if (res != PK_STN_RES_SUCCESS) exit(1);
if (-1 != i) exit(1);
@@ -76,7 +77,7 @@ int main(int argc, char *argv[])
// stn_uint8_t
{
uint8_t i = {0};
- res = pk_stn_uint8_t(&i, "1", 0);
+ res = pk_stn_uint8_t(&i, "1", &s, 0);
fprintf(stdout, "pkstn: stn_uint8_t res: %u\n", i);
if (res != PK_STN_RES_SUCCESS) exit(1);
if (1 != i) exit(1);
@@ -85,7 +86,7 @@ int main(int argc, char *argv[])
// stn_float
{
float f = {0};
- res = pk_stn_float(&f, "-1");
+ res = pk_stn_float(&f, "-1", &s);
fprintf(stdout, "pkstn: stn_float res: %f\n", f);
if (res != PK_STN_RES_SUCCESS) exit(1);
if (-1 != f) exit(1);
@@ -94,7 +95,7 @@ int main(int argc, char *argv[])
// stn_double
{
double f = {0};
- res = pk_stn_double(&f, "-1");
+ res = pk_stn_double(&f, "-1", &s);
fprintf(stdout, "pkstn: stn_double res: %f\n", f);
if (res != PK_STN_RES_SUCCESS) exit(1);
if (-1 != f) exit(1);