1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #include <aws/common/string.h>
7 #include <proof_helpers/make_common_data_structures.h>
8 #include <proof_helpers/utils.h>
9 #include <stddef.h>
10 
aws_array_list_comparator_string_harness()11 void aws_array_list_comparator_string_harness() {
12     struct aws_string *str_a = nondet_allocate_string_bounded_length(MAX_STRING_LEN);
13     struct aws_string *str_b = nondet_bool() ? str_a : nondet_allocate_string_bounded_length(MAX_STRING_LEN);
14     __CPROVER_assume(aws_string_is_valid(str_a));
15     __CPROVER_assume(aws_string_is_valid(str_b));
16 
17     bool nondet_parameter_a;
18     bool nondet_parameter_b;
19     if (aws_array_list_comparator_string(nondet_parameter_a ? &str_a : NULL, nondet_parameter_b ? &str_b : NULL) == 0) {
20         if (nondet_parameter_a && nondet_parameter_b) {
21             assert_bytes_match(str_a->bytes, str_b->bytes, str_a->len);
22         }
23     }
24 }
25