Skip to content

Commit

Permalink
✨ (BehaviorKit): Create new BehaviorKit
Browse files Browse the repository at this point in the history
  • Loading branch information
YannLocatelli committed Dec 15, 2023
1 parent 45bf26c commit b872fd7
Show file tree
Hide file tree
Showing 7 changed files with 77 additions and 0 deletions.
24 changes: 24 additions & 0 deletions libs/BehaviorKit/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Leka - LekaOS
# Copyright 2023 APF France handicap
# SPDX-License-Identifier: Apache-2.0

add_library(BehaviorKit STATIC)

target_include_directories(BehaviorKit
PUBLIC
include
)

target_sources(BehaviorKit
PRIVATE
source/BehaviorKit.cpp
)

target_link_libraries(BehaviorKit
)

if(${CMAKE_PROJECT_NAME} STREQUAL "LekaOSUnitTests")
leka_unit_tests_sources(
tests/BehaviorKit_test.cpp
)
endif()
17 changes: 17 additions & 0 deletions libs/BehaviorKit/include/BehaviorKit.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Leka - LekaOS
// Copyright 2023 APF France handicap
// SPDX-License-Identifier: Apache-2.0

#pragma once

namespace leka {

class BehaviorKit
{
public:
explicit BehaviorKit() = default;

private:
};

} // namespace leka
7 changes: 7 additions & 0 deletions libs/BehaviorKit/source/BehaviorKit.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Leka - LekaOS
// Copyright 2023 APF France handicap
// SPDX-License-Identifier: Apache-2.0

#include "BehaviorKit.h"

using namespace leka;
26 changes: 26 additions & 0 deletions libs/BehaviorKit/tests/BehaviorKit_test.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Leka - LekaOS
// Copyright 2023 APF France handicap
// SPDX-License-Identifier: Apache-2.0

#include "BehaviorKit.h"

#include "gmock/gmock.h"
#include "gtest/gtest.h"

using namespace leka;

class BehaviorKitTest : public ::testing::Test
{
protected:
BehaviorKitTest() : behaviorkit() {};

// void SetUp() override {}
// void TearDown() override {}

BehaviorKit behaviorkit;
};

TEST_F(BehaviorKitTest, initialization)
{
ASSERT_NE(&behaviorkit, nullptr);
}
1 change: 1 addition & 0 deletions libs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

add_subdirectory(${LIBS_DIR}/ActivityKit)
add_subdirectory(${LIBS_DIR}/BatteryKit)
add_subdirectory(${LIBS_DIR}/BehaviorKit)
add_subdirectory(${LIBS_DIR}/BehaviorKitDeprecated)
add_subdirectory(${LIBS_DIR}/BLEKit)
add_subdirectory(${LIBS_DIR}/ColorKit)
Expand Down
1 change: 1 addition & 0 deletions spikes/lk_behavior_kit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ target_sources(spike_lk_behavior_kit
)

target_link_libraries(spike_lk_behavior_kit
BehaviorKit
BehaviorKitDeprecated
CorePwm
EventLoopKit
Expand Down
1 change: 1 addition & 0 deletions tests/unit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ leka_register_unit_tests_for_driver(CoreVideo)
# Register libraries
leka_register_unit_tests_for_library(ActivityKit)
leka_register_unit_tests_for_library(BatteryKit)
leka_register_unit_tests_for_library(BehaviorKit)
leka_register_unit_tests_for_library(BehaviorKitDeprecated)
leka_register_unit_tests_for_library(BLEKit)
leka_register_unit_tests_for_library(ColorKit)
Expand Down

0 comments on commit b872fd7

Please sign in to comment.