test_tle_udp_destroy.h revision a152c68e
1/*
2 * Copyright (c) 2016  Intel Corporation.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at:
6 *
7 *     http://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,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16#ifndef TEST_TLE_UDP_DESTROY_H_
17#define TEST_TLE_UDP_DESTROY_H_
18
19#include <gtest/gtest.h>
20#include <rte_errno.h>
21#include <tle_udp_impl.h>
22
23class udp_destroy : public ::testing::Test {
24
25protected:
26	struct tle_udp_ctx *ctx;
27	struct tle_udp_ctx_param prm;
28
29	virtual void SetUp(void)
30	{
31		rte_errno = 0;
32		memset(&prm, 0, sizeof(prm));
33		prm.socket_id = SOCKET_ID_ANY;
34		prm.max_streams = 0x10;
35		prm.max_stream_rbufs = 0x100;
36		prm.max_stream_sbufs = 0x100;
37
38		ctx = tle_udp_create(&prm);
39		ASSERT_NE(ctx, (void *) NULL);
40	}
41
42	virtual void TearDown(void)
43	{
44	}
45};
46
47#endif /* TEST_TLE_UDP_DESTROY_H_ */
48