-
Notifications
You must be signed in to change notification settings - Fork 11
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
add Rclex unit tests #136
Merged
Merged
add Rclex unit tests #136
Conversation
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
pojiro
force-pushed
the
feat-add_rclex_unit_tests-pojiro
branch
from
July 8, 2022 05:49
eeb9321
to
7e822d9
Compare
pojiro
commented
Jul 8, 2022
Comment on lines
+26
to
35
@spec get_initialized_context() :: rcl_context() | ||
def get_initialized_context() do | ||
init_op = Nifs.rcl_get_zero_initialized_init_options() | ||
context = Nifs.rcl_get_zero_initialized_context() | ||
Nifs.rcl_init_options_init(init_op) | ||
Nifs.rcl_init_with_null(init_op, context) | ||
Nifs.rcl_init_options_fini(init_op) | ||
|
||
children = [ | ||
Rclex.ResourceServer | ||
] | ||
|
||
opts = [strategy: :one_for_one, name: :resource_server] | ||
Supervisor.start_link(children, opts) | ||
context | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ResourceServerの起動なしに初期化済みの context を取得できると、他のGenServerの単体テストで便利になると考えられるので関数に切り出しました。
pojiro
force-pushed
the
feat-add_rclex_unit_tests-pojiro
branch
from
July 9, 2022 03:31
7e822d9
to
9b38fd6
Compare
takasehideki
approved these changes
Jul 9, 2022
Closed
takasehideki
added a commit
that referenced
this pull request
Sep 21, 2022
**Full Changelog**: v0.7.0...v0.7.1 * New Contributors: @pojiro 🎉 * New features: * Improve unit test environment on local dev machine by @pojiro in #131 * Code Improvements/Fixes: * Enrich doc and specs with the awesome contributions by @pojiro (e.g., in #121) * Enrich unit tests with the awesome contributions by @pojiro (e.g., in #136) * Improve credo config, .credo.exs by @pojiro in #120 * exclude auto-generated files format by @pojiro in #135 * refactor Rclex.ResourceServer.call_nifs_rcl_node_init/5 by @pojiro in #147 * fix node name bug, when it attributes a namespace (and also fix #142) by @pojiro in #149 * Remove KeepSub module which is unused (also fix dialyzer error) by @s-hosoai in #164 * Improve README by @takasehideki in #171 * Bumps: * `credo` from 1.6.4 to 1.6.5 in #162 * Known issues to be addressed in the near future: * Lock `git_hooks` to 0.6.5 due to its issue in #138 * Bump to Humble Hawksbill in #114 * Release rcl nif resources when GerServer terminates in #160 * Note in this release: * After long consideration, we have decided to end the support for Dashing as the target environment 6ae367d
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
タイトルままです。