# Testing Elixir - MapSet.new vs. Enum.sort in unit test example

**URL:** <https://forum.devtalk.com/t/testing-elixir-mapset-new-vs-enum-sort-in-unit-test-example/892>\
**Category:** PragProg Customers\
**Tags:** book-testing-elixir, errata\
**Created:** [22 June 2020 22:25 UTC](https://forum.devtalk.com/t/testing-elixir-mapset-new-vs-enum-sort-in-unit-test-example/892 "2020-06-22T22:25:53Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![hauleth](https://forum.devtalk.com/user_avatar/forum.devtalk.com/hauleth/32/599_2.png) [@hauleth](https://forum.devtalk.com/u/hauleth)\
**Post date:** [22 June 2020 22:47 UTC](https://forum.devtalk.com/t/testing-elixir-mapset-new-vs-enum-sort-in-unit-test-example/892/3 "2020-06-22T22:47:26Z")

</div>

Depends on what you want to test, as the behaviour of these is different in case of `actual_fields_with_types = [1,2,1]` and `@expected_fields_with_types == [2, 1]`

---

_[View the full topic](https://forum.devtalk.com/t/testing-elixir-mapset-new-vs-enum-sort-in-unit-test-example/892)._
