Remove unnecessary mock code for socket 73/272873/1
authorhyunuk.tak <hyunuk.tak@samsung.com>
Mon, 21 Mar 2022 03:22:33 +0000 (12:22 +0900)
committerhyunuk.tak <hyunuk.tak@samsung.com>
Mon, 28 Mar 2022 01:48:58 +0000 (10:48 +0900)
Change-Id: I561e26409c4d8475911fc1d8301c68a711eea6b4
Signed-off-by: hyunuk.tak <hyunuk.tak@samsung.com>
tests/unittest/mocks/thread-mock-socket.cpp
tests/unittest/mocks/thread-mock-socket.h [deleted file]
tests/unittest/thread-unittest-init.cpp

index 27fc5da..4cd99ff 100644 (file)
 extern "C" {
 #endif
 
-// static bool __thread_mock_socket = false;
-// extern int __real_socket(int domain, int type, int protocol);
-
-// void thread_mock_set_socket(bool flag)
-// {
-//     __thread_mock_socket = flag;
-// }
-
-// int __wrap_socket(int domain, int type, int protocol)
-// {
-//     return __thread_mock_socket ? 1 : __real_socket(domain, type, protocol);
-// }
-
 int connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen)
 {
        return 0;
diff --git a/tests/unittest/mocks/thread-mock-socket.h b/tests/unittest/mocks/thread-mock-socket.h
deleted file mode 100644 (file)
index 6705f62..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * 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.
- */
-
-#pragma once
-
-#include <stdbool.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-void thread_mock_set_socket(bool flag);
-
-#ifdef __cplusplus
-}
-#endif
\ No newline at end of file
index 7c5aed7..97afd45 100644 (file)
@@ -17,7 +17,6 @@
 #include <gtest/gtest.h>
 
 #include "thread.h"
-#include "mocks/thread-mock-socket.h"
 
 class ThreadInitTest : public ::testing::Test
 {