-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(kmod): unit test for AGNOCAST_PUBLISH_MSG_CMD (#449)
* Done Signed-off-by: Koichi Imai <koichi.imai.2@tier4.jp> * add some cases Signed-off-by: Koichi Imai <koichi.imai.2@tier4.jp> * apply cppcheck Signed-off-by: Koichi Imai <koichi.imai.2@tier4.jp> * make qos_depth global Signed-off-by: Koichi Imai <koichi.imai.2@tier4.jp> * fix Signed-off-by: Koichi Imai <koichi.imai.2@tier4.jp> * fix Signed-off-by: Koichi Imai <koichi.imai.2@tier4.jp> * fix Signed-off-by: Koichi Imai <koichi.imai.2@tier4.jp> * Update kmod/agnocast_kunit/agnocast_kunit_publish_msg.c Co-authored-by: atsushi yano <55824710+atsushi421@users.noreply.github.com> * fix Signed-off-by: Koichi Imai <koichi.imai.2@tier4.jp> * modify Makefile Signed-off-by: Koichi Imai <koichi.imai.2@tier4.jp> * add get_topic_entries_num Signed-off-by: Koichi Imai <koichi.imai.2@tier4.jp> * Update agnocast_kmod/agnocast.c Co-authored-by: Ryuta Kambe <ryuta.kambe@tier4.jp> * fix for release_msgs_to_meet_depth Signed-off-by: koichiimai <kotty.0704@gmail.com> * fix comments Signed-off-by: Koichi Imai <koichi.imai.2@tier4.jp> --------- Signed-off-by: Koichi Imai <koichi.imai.2@tier4.jp> Signed-off-by: koichiimai <kotty.0704@gmail.com> Co-authored-by: atsushi yano <55824710+atsushi421@users.noreply.github.com> Co-authored-by: Ryuta Kambe <ryuta.kambe@tier4.jp>
- Loading branch information
1 parent
7f488b7
commit b76a16d
Showing
4 changed files
with
308 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,20 @@ | ||
#pragma once | ||
#include <kunit/test.h> | ||
|
||
#define TEST_CASES_PUBLISH_MSG \ | ||
KUNIT_CASE(test_case_publish_msg_sample0), KUNIT_CASE(test_case_publish_msg_sample1) | ||
#define TEST_CASES_PUBLISH_MSG \ | ||
KUNIT_CASE(test_case_no_topic), KUNIT_CASE(test_case_no_publisher), \ | ||
KUNIT_CASE(test_case_simple_publish_without_any_release), \ | ||
KUNIT_CASE(test_case_different_publisher_no_release), \ | ||
KUNIT_CASE(test_case_referenced_node_not_released), \ | ||
KUNIT_CASE(test_case_single_release_return), KUNIT_CASE(test_case_excessive_release_count), \ | ||
KUNIT_CASE(test_case_ret_one_subscriber), KUNIT_CASE(test_case_ret_many_subscribers) | ||
|
||
void test_case_publish_msg_sample0(struct kunit * test); | ||
void test_case_publish_msg_sample1(struct kunit * test); | ||
void test_case_no_topic(struct kunit * test); | ||
void test_case_no_publisher(struct kunit * test); | ||
void test_case_simple_publish_without_any_release(struct kunit * test); | ||
void test_case_different_publisher_no_release(struct kunit * test); | ||
void test_case_referenced_node_not_released(struct kunit * test); | ||
void test_case_single_release_return(struct kunit * test); | ||
void test_case_excessive_release_count(struct kunit * test); | ||
void test_case_ret_one_subscriber(struct kunit * test); | ||
void test_case_ret_many_subscribers(struct kunit * test); |