From a152c68e17b6ad1ae48a126e0b80c05cb44188b8 Mon Sep 17 00:00:00 2001 From: Daniel Mrzyglod Date: Sat, 6 Aug 2016 20:38:27 +0100 Subject: tldk_test: Add TLDK unit tests Unit tests for TLDK libtle_udp & libtle_dring libraries Change-Id: I6818c72ca0260f1af784e758bfe21118c395afcf Signed-off-by: Karol Latecki Signed-off-by: Daniel Mrzyglod --- test/gtest/test_tle_udp_destroy.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 test/gtest/test_tle_udp_destroy.cpp (limited to 'test/gtest/test_tle_udp_destroy.cpp') diff --git a/test/gtest/test_tle_udp_destroy.cpp b/test/gtest/test_tle_udp_destroy.cpp new file mode 100644 index 0000000..2244b18 --- /dev/null +++ b/test/gtest/test_tle_udp_destroy.cpp @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2016 Intel Corporation. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "test_tle_udp_destroy.h" + +TEST(udp_destroy_null, udp_destroy_null) +{ + tle_udp_destroy(NULL); + EXPECT_EQ(rte_errno, EINVAL); +} + +TEST_F(udp_destroy, udp_destroy_positive) +{ + int rc; + tle_udp_destroy(ctx); + ASSERT_EQ(rte_errno, 0); +} -- cgit 1.2.3-korg