Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/test state machine lib #1744

Merged
merged 66 commits into from
Jan 29, 2019
Merged

Feature/test state machine lib #1744

merged 66 commits into from
Jan 29, 2019

Conversation

sgermanserrano
Copy link

Status

DEVELOPMENT

Description

Added intial set of unit tests for state_machine_lib.

Related PRs

#1609

@sgermanserrano
Copy link
Author

@s-azumi can you please confirm you are fine with this PR? The tests pass following the changes in comment

@s-azumi s-azumi mentioned this pull request Nov 30, 2018
7 tasks
ASSERT_STREQ(state.getEnteredKey().c_str(), "") << "entered_key should be " << "";


std::ostringstream oss;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit fragile, why do you need to check std::cout? You could create a fixture that gets updated when a state transition or whatever the state machine does.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@esteve the tests have been updated, please have a look now. Thanks!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I'd go further and remove showStateName() from the State API, so as to separate the logic from the UI (in this case the console). It's only being used in one place https://github.com/sgermanserrano/Autoware/blob/feature/test_state_machine_lib/ros/src/common/libs/state_machine_lib/src/state_context.cpp#L142

ASSERT_STREQ(state.getEnteredKey().c_str(), "") << "entered_key should be " << "";


std::ostringstream oss;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I'd go further and remove showStateName() from the State API, so as to separate the logic from the UI (in this case the console). It's only being used in one place https://github.com/sgermanserrano/Autoware/blob/feature/test_state_machine_lib/ros/src/common/libs/state_machine_lib/src/state_context.cpp#L142

@sgermanserrano
Copy link
Author

@esteve I have removed showStateName
@s-azumi can you review the changes and merge if you approve them?

@kfunaoka
Copy link

kfunaoka commented Jan 25, 2019

@sgermanserrano I'd like to try GitLab CI of this pull request with the latest feature/rebuild_decision_maker #1609 . May I take over the target branch feature/test_PR_1609 and request review to @s-azumi ?

@esteve Were the requested changes solved?

@sgermanserrano
Copy link
Author

sgermanserrano commented Jan 25, 2019

@kfunaoka yes, I guess feature/test_PR_1609 needs to be updated with the latest changes. This is the pipeline for the latest commit on this PR https://gitlab.com/ServandoGS/Autoware/pipelines/40012712

@sgermanserrano
Copy link
Author

@kfunaoka the pipeline succeeded after the update https://gitlab.com/ServandoGS/Autoware/pipelines/44809073

Copy link
Contributor

@esteve esteve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only have two comments, @sgermanserrano could you address them? Thanks. I'm approving the pull request so it can be merged after you make the changes.

@sgermanserrano sgermanserrano merged commit 7be66ed into autowarefoundation:feature/test_PR_1609 Jan 29, 2019
@sgermanserrano sgermanserrano deleted the feature/test_state_machine_lib branch January 29, 2019 13:31
@mitsudome-r mitsudome-r added the version:autoware-ai Autoware.AI label Jun 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants