16 #include "src/libfuzzer/libfuzzer_macro.h"
17 #include "test/core/avl/avl_fuzzer.pb.h"
29 switch (
action.action_case()) {
30 case avl_fuzzer::Action::kSet:
34 case avl_fuzzer::Action::kDel:
38 case avl_fuzzer::Action::kGet: {
41 if (
it ==
map_.end() && p !=
nullptr) abort();
42 if (
it !=
map_.end() && p ==
nullptr) abort();
43 if (
it !=
map_.end() &&
it->second != *p) abort();
45 case avl_fuzzer::Action::ACTION_NOT_SET:
54 if (
it ==
map_.end()) abort();
55 if (
it->first !=
key) abort();
56 if (
it->second !=
value) abort();
59 if (
it !=
map_.end()) abort();
66 template <
typename RepeatedField>
69 for (
const auto& kv : p) {
70 a =
a.Add(kv.key(), kv.value());
75 template <
typename RepeatedField>
78 for (
const auto& kv : p) {
79 a[kv.key()] = kv.value();
88 for (
const auto&
action :
msg.actions()) {
92 for (
const auto&
cmp :
msg.compares()) {
97 if ((left_avl == right_avl) != (left_map == right_map)) abort();
98 if ((left_avl < right_avl) != (left_map < right_map)) abort();