From f77dcb217261148de1c57c8b042873efbad81d20 Mon Sep 17 00:00:00 2001 From: Nick Wellnhofer Date: Wed, 19 Nov 2014 18:37:52 +0100 Subject: Input validation for setters --- api_test/main.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'api_test') diff --git a/api_test/main.c b/api_test/main.c index 82a0dfb..f74dee2 100644 --- a/api_test/main.c +++ b/api_test/main.c @@ -201,6 +201,15 @@ accessors(test_batch_runner *runner) OK(runner, !cmark_node_set_title(header, "title"), "set_title error"); + OK(runner, !cmark_node_set_header_level(header, 0), + "set_header_level too small"); + OK(runner, !cmark_node_set_header_level(header, 7), + "set_header_level too large"); + OK(runner, !cmark_node_set_list_type(bullet_list, CMARK_NO_LIST), + "set_list_type invalid"); + OK(runner, !cmark_node_set_list_start(bullet_list, -1), + "set_list_start negative"); + cmark_node_destroy(doc); } -- cgit v1.2.3