diff --git a/src/lib/core/tests/BUILD.gn b/src/lib/core/tests/BUILD.gn index 2686af32916138..92b13a2a0259e1 100644 --- a/src/lib/core/tests/BUILD.gn +++ b/src/lib/core/tests/BUILD.gn @@ -20,11 +20,10 @@ import("${chip_root}/build/chip/chip_test_suite.gni") chip_test_suite("tests") { output_name = "libCoreTests" - sources = [ + test_sources = [ "TestCHIPCallback.cpp", "TestCHIPErrorStr.cpp", "TestCHIPTLV.cpp", - "TestCore.h", "TestReferenceCounted.cpp", ] @@ -34,11 +33,4 @@ chip_test_suite("tests") { "${chip_root}/src/lib/core", "${nlunit_test_root}:nlunit-test", ] - - tests = [ - "TestCHIPErrorStr", - "TestReferenceCounted", - "TestCHIPTLV", - "TestCHIPCallback", - ] } diff --git a/src/lib/core/tests/TestCHIPCallback.cpp b/src/lib/core/tests/TestCHIPCallback.cpp index d1422534bb140c..05a133f91545c6 100644 --- a/src/lib/core/tests/TestCHIPCallback.cpp +++ b/src/lib/core/tests/TestCHIPCallback.cpp @@ -21,9 +21,6 @@ * This file implements a test for CHIP Callback * */ - -#include "TestCore.h" - #include #include #include diff --git a/src/lib/core/tests/TestCHIPCallbackDriver.cpp b/src/lib/core/tests/TestCHIPCallbackDriver.cpp deleted file mode 100644 index 090556f26dae1b..00000000000000 --- a/src/lib/core/tests/TestCHIPCallbackDriver.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * - * 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. - */ - -/** - * @file - * This file implements a standalone/native program executable - * test driver for the CHIP core library Callback classes - * - */ - -#include "TestCore.h" - -#include - -int main() -{ - // Generate machine-readable, comma-separated value (CSV) output. - nlTestSetOutputStyle(OUTPUT_CSV); - - return (TestCHIPCallback()); -} diff --git a/src/lib/core/tests/TestCHIPErrorStr.cpp b/src/lib/core/tests/TestCHIPErrorStr.cpp index fa67b69f5b837a..52aef711055da3 100644 --- a/src/lib/core/tests/TestCHIPErrorStr.cpp +++ b/src/lib/core/tests/TestCHIPErrorStr.cpp @@ -32,8 +32,6 @@ #define __STDC_LIMIT_MACROS #endif -#include "TestCore.h" - #include #include #include diff --git a/src/lib/core/tests/TestCHIPErrorStrDriver.cpp b/src/lib/core/tests/TestCHIPErrorStrDriver.cpp deleted file mode 100644 index 1139acdd9048ce..00000000000000 --- a/src/lib/core/tests/TestCHIPErrorStrDriver.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * - * 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. - */ - -/** - * @file - * This file implements a standalone/native program executable - * test driver for the CHIP core library error string unit tests. - * - */ - -#include "TestCore.h" - -#include - -int main() -{ - // Generate machine-readable, comma-separated value (CSV) output. - nlTestSetOutputStyle(OUTPUT_CSV); - - return (TestCHIPErrorStr()); -} diff --git a/src/lib/core/tests/TestCHIPTLV.cpp b/src/lib/core/tests/TestCHIPTLV.cpp index 346aeb7cfc8711..d06de6b6c89f07 100644 --- a/src/lib/core/tests/TestCHIPTLV.cpp +++ b/src/lib/core/tests/TestCHIPTLV.cpp @@ -23,8 +23,6 @@ * */ -#include "TestCore.h" - #include #include diff --git a/src/lib/core/tests/TestCHIPTLVDriver.cpp b/src/lib/core/tests/TestCHIPTLVDriver.cpp deleted file mode 100644 index 67a5d74a23fa62..00000000000000 --- a/src/lib/core/tests/TestCHIPTLVDriver.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * - * 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. - */ - -/** - * @file - * This file implements a standalone/native program executable - * test driver for the CHIP TLV unit tests. - * - */ - -#include "TestCore.h" - -#include - -#if CHIP_SYSTEM_CONFIG_USE_LWIP -#include -#endif // CHIP_SYSTEM_CONFIG_USE_LWIP - -#include - -int main() -{ -#if CHIP_SYSTEM_CONFIG_USE_LWIP - tcpip_init(NULL, NULL); -#endif // CHIP_SYSTEM_CONFIG_USE_LWIP - - // Generate machine-readable, comma-separated value (CSV) output. - nlTestSetOutputStyle(OUTPUT_CSV); - - return (TestCHIPTLV()); -} diff --git a/src/lib/core/tests/TestCore.h b/src/lib/core/tests/TestCore.h deleted file mode 100644 index ea5e13da25528c..00000000000000 --- a/src/lib/core/tests/TestCore.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * - * 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. - */ - -/** - * @file - * This file declares test entry points for CHIP core library - * unit tests. - * - */ - -#pragma once - -#ifdef __cplusplus -extern "C" { -#endif - -int TestCHIPCallback(void); -int TestCHIPErrorStr(void); -int TestCHIPTLV(void); -int TestReferenceCounted(void); - -#ifdef __cplusplus -} -#endif diff --git a/src/lib/core/tests/TestReferenceCounted.cpp b/src/lib/core/tests/TestReferenceCounted.cpp index 74a73670fe69ec..c7eaad896d2f93 100644 --- a/src/lib/core/tests/TestReferenceCounted.cpp +++ b/src/lib/core/tests/TestReferenceCounted.cpp @@ -23,8 +23,6 @@ * */ -#include "TestCore.h" - #include #include #include diff --git a/src/lib/core/tests/TestReferenceCountedDriver.cpp b/src/lib/core/tests/TestReferenceCountedDriver.cpp deleted file mode 100644 index 57dd578e97f052..00000000000000 --- a/src/lib/core/tests/TestReferenceCountedDriver.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * - * 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. - */ - -/** - * @file - * This file implements a standalone/native program executable - * test driver for the CHIP core library reference counted object tests. - * - */ - -#include "TestCore.h" - -#include - -int main() -{ - // Generate machine-readable, comma-separated value (CSV) output. - nlTestSetOutputStyle(OUTPUT_CSV); - - return (TestReferenceCounted()); -}