Skip to content

Commit

Permalink
test: add test
Browse files Browse the repository at this point in the history
Signed-off-by: satoshi-ota <[email protected]>
  • Loading branch information
satoshi-ota committed Oct 7, 2024
1 parent 6400734 commit 6cb6b64
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 3 deletions.
22 changes: 19 additions & 3 deletions common/tier4_screen_capture_rviz_plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,25 @@ ament_auto_add_library(${PROJECT_NAME}_lib SHARED
src/screen_capture_panel.cpp
)

rosidl_get_typesupport_target(
cpp_typesupport_target ${PROJECT_NAME} "rosidl_typesupport_cpp")
target_link_libraries(${PROJECT_NAME}_lib "${cpp_typesupport_target}")
if(${rosidl_cmake_VERSION} VERSION_LESS 2.5.0)
rosidl_target_interfaces(${PROJECT_NAME}_lib
${PROJECT_NAME} "rosidl_typesupport_cpp")
else()
rosidl_get_typesupport_target(
cpp_typesupport_target ${PROJECT_NAME} "rosidl_typesupport_cpp")
target_link_libraries(${PROJECT_NAME}_lib "${cpp_typesupport_target}")
endif()

if(BUILD_TESTING)
ament_add_ros_isolated_gtest(test_${PROJECT_NAME}
test/test_screen_capture_panel.cpp
)
target_link_libraries(test_${PROJECT_NAME}
gtest_main
${PROJECT_NAME}_lib
)
target_include_directories(test_${PROJECT_NAME} PRIVATE src)
endif()

target_link_libraries(${PROJECT_NAME}_lib
${QT_LIBRARIES}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Copyright 2024 TIER IV, Inc.
//
// 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 "../src/screen_capture_panel.hpp"

#include <gtest/gtest.h>

TEST(AutowareScreenCapturePanelTest, foo)
{
}

0 comments on commit 6cb6b64

Please sign in to comment.