xref: /aosp_15_r20/external/pigweed/pw_protobuf/fuzz.h (revision 61c4878ac05f98d0ceed94b57d316916de578985)
1 // Copyright 2022 The Pigweed Authors
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); you may not
4 // use this file except in compliance with the License. You may obtain a copy of
5 // the License at
6 //
7 //     https://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11 // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 // License for the specific language governing permissions and limitations under
13 // the License.
14 #pragma once
15 
16 #include <cstdint>
17 
18 namespace pw::protobuf::fuzz {
19 
20 // Encodable values. The fuzzer will iteratively choose different field types to
21 // generate and encode.
22 enum FieldType : uint8_t {
23   kUint32 = 0,
24   kPackedUint32,
25   kUint64,
26   kPackedUint64,
27   kInt32,
28   kPackedInt32,
29   kInt64,
30   kPackedInt64,
31   kSint32,
32   kPackedSint32,
33   kSint64,
34   kPackedSint64,
35   kBool,
36   kFixed32,
37   kPackedFixed32,
38   kFixed64,
39   kPackedFixed64,
40   kSfixed32,
41   kPackedSfixed32,
42   kSfixed64,
43   kPackedSfixed64,
44   kFloat,
45   kPackedFloat,
46   kDouble,
47   kPackedDouble,
48   kBytes,
49   kString,
50   kPush,
51   kPop,
52   kMaxValue = kPush,
53 };
54 
55 }  // namespace pw::protobuf::fuzz
56