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

add Rclex unit tests #136

Merged
merged 2 commits into from
Jul 9, 2022
Merged

add Rclex unit tests #136

merged 2 commits into from
Jul 9, 2022

Conversation

pojiro
Copy link
Contributor

@pojiro pojiro commented Jul 8, 2022

タイトルままです。

@pojiro pojiro force-pushed the feat-add_rclex_unit_tests-pojiro branch from eeb9321 to 7e822d9 Compare July 8, 2022 05:49
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
Copy link
Contributor Author

@pojiro pojiro Jul 8, 2022

Choose a reason for hiding this comment

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

ResourceServerの起動なしに初期化済みの context を取得できると、他のGenServerの単体テストで便利になると考えられるので関数に切り出しました。

@pojiro pojiro changed the title add Rcles unit tests add Rclex unit tests Jul 8, 2022
@pojiro pojiro marked this pull request as ready for review July 8, 2022 05:53
@pojiro pojiro force-pushed the feat-add_rclex_unit_tests-pojiro branch from 7e822d9 to 9b38fd6 Compare July 9, 2022 03:31
@takasehideki takasehideki merged commit f43a509 into main Jul 9, 2022
@takasehideki takasehideki deleted the feat-add_rclex_unit_tests-pojiro branch July 9, 2022 07:45
@takasehideki takasehideki mentioned this pull request Sep 21, 2022
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
@takasehideki takasehideki mentioned this pull request Sep 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants