1100ae2f9Sopenharmony_ci/*
2100ae2f9Sopenharmony_ci * Copyright (c) 2022 Huawei Device Co., Ltd.
3100ae2f9Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
4100ae2f9Sopenharmony_ci * you may not use this file except in compliance with the License.
5100ae2f9Sopenharmony_ci * You may obtain a copy of the License at
6100ae2f9Sopenharmony_ci *
7100ae2f9Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
8100ae2f9Sopenharmony_ci *
9100ae2f9Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
10100ae2f9Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
11100ae2f9Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12100ae2f9Sopenharmony_ci * See the License for the specific language governing permissions and
13100ae2f9Sopenharmony_ci * limitations under the License.
14100ae2f9Sopenharmony_ci */
15100ae2f9Sopenharmony_ci
16100ae2f9Sopenharmony_ci#ifndef TEST_FUZZTEST_EVENTQUEUE_FUZZER_EVENTQUEUE_FUZZER_H
17100ae2f9Sopenharmony_ci#define TEST_FUZZTEST_EVENTQUEUE_FUZZER_EVENTQUEUE_FUZZER_H
18100ae2f9Sopenharmony_ci
19100ae2f9Sopenharmony_ci#define FUZZ_PROJECT_NAME "eventqueue_fuzzer"
20100ae2f9Sopenharmony_ci
21100ae2f9Sopenharmony_ci#include <cstdint>
22100ae2f9Sopenharmony_ci
23100ae2f9Sopenharmony_ciuint32_t U32_AT(const uint8_t *ptr)
24100ae2f9Sopenharmony_ci{
25100ae2f9Sopenharmony_ci    // convert fuzz input data to an integer
26100ae2f9Sopenharmony_ci    return (ptr[0] << 24) | (ptr[1] << 16) | (ptr[2] << 8) | ptr[3];
27100ae2f9Sopenharmony_ci}
28100ae2f9Sopenharmony_ci
29100ae2f9Sopenharmony_ci#endif // TEST_FUZZTEST_EVENTQUEUE_FUZZER_EVENTQUEUE_FUZZER_H
30