diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-06-13 13:04:01 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-06-13 13:04:01 -0400 |
commit | bd2b3d46af129dad293653047c91f33b5dd1cccf (patch) | |
tree | 82fb2441e150f35b131eadfbfe9563961520360e /tests | |
parent | 9c25d5e2f13239fc5bd5a6d73778b01f799fe70a (diff) | |
download | stasis-bd2b3d46af129dad293653047c91f33b5dd1cccf.tar.gz |
Fix test to match changes to startswith and endswith
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_str.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/test_str.c b/tests/test_str.c index 943c3ce..fc2cf46 100644 --- a/tests/test_str.c +++ b/tests/test_str.c @@ -132,9 +132,9 @@ void test_endswith() { {.data = "I have a pencil box.", .input = "I have a pencil box.", .expected = true}, {.data = ". ", .input = ".", .expected = false}, {.data = "I have a pencil box.", .input = "pencil box", .expected = false}, - {.data = NULL, .input = "test", .expected = -1}, - {.data = "I have a pencil box", .input = NULL, .expected = -1}, - {.data = NULL, .input = NULL, .expected = -1}, + {.data = NULL, .input = "test", .expected = false}, + {.data = "I have a pencil box", .input = NULL, .expected = false}, + {.data = NULL, .input = NULL, .expected = false}, }; for (size_t i = 0; i < sizeof(tc) / sizeof(*tc); i++) { int result = endswith(tc[i].data, tc[i].input); @@ -157,9 +157,9 @@ void test_startswith() { {.data = "I have a pencil box.", .input = "I have a pencil box.", .expected = true}, {.data = " I have a pencil box.", .input = "I have", .expected = false}, {.data = "I have a pencil box.", .input = "pencil box", .expected = false}, - {.data = NULL, .input = "test", .expected = -1}, - {.data = "I have a pencil box", .input = NULL, .expected = -1}, - {.data = NULL, .input = NULL, .expected = -1}, + {.data = NULL, .input = "test", .expected = false}, + {.data = "I have a pencil box", .input = NULL, .expected = false}, + {.data = NULL, .input = NULL, .expected = false}, }; for (size_t i = 0; i < sizeof(tc) / sizeof(*tc); i++) { int result = startswith(tc[i].data, tc[i].input); |