# Testing a function with guards

**URL:** <https://forum.elixirforum.com/t/testing-a-function-with-guards/32166>\
**Category:** Questions\
**Tags:** testing, guards, unit-testing\
**Created:** [June 7, 2020, 11:52am UTC](https://forum.elixirforum.com/t/testing-a-function-with-guards/32166 "2020-06-07T11:52:17Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![kokolegorille](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/kokolegorille/32/4784_2.png) [@kokolegorille](https://forum.elixirforum.com/u/kokolegorille)\
**Post date:** [June 7, 2020, 12:03pm UTC](https://forum.elixirforum.com/t/testing-a-function-with-guards/32166/4 "2020-06-07T12:03:40Z")

</div>

If You want to get warnings when your code use wrong type, You would need a tool like [dialyxir](https://hex.pm/packages/dialyxir) 🙂

---

_[View the full topic](https://forum.elixirforum.com/t/testing-a-function-with-guards/32166)._
