ExUnit is Elixir’s unit testing library. ExUnit uses Elixir macros to provide error reports when a failure happens using the assert macro. The assert macro can look at the code, extract the current line, extract the operands and show a difference between the data structures alongside the stacktrace when the assertion fails.
However, for certain ‘bare’ assertions, ExUnit usually re-runs the tests, debugging or printing the values. In Elixir 1.7, now, whenever a “bare” assertion will fail, it will print the value of each argument individually.
E.g, For a simple example such as assert some_vars(1 + 2, 3 + 4), users will get this report:
Their build tool Mix has also received new updates.
ExDoc is a tool to generate documentation for user Elixir projects. It leverages metadata to provide better documentation for developers. These are the updates to ExDoc.
Elixir 1.7 fully integrates with the new :logger module available in Erlang/OTP 21. The Logger.Translator mechanism has also been improved to export metadata, allowing custom Logger backends to leverage information such as:
From Elixir 1.7 the Logger macros such as debug, info, will evaluate their arguments only when the message is logged. The Logger configuration system also accepts a new option: compile_time_purge_matching that allows users to remove log calls with specific compile-time metadata.
There are also certain developments in areas not directly related to the Elixir codebase. A new Development section has been added to the website, that outlines the Elixir team structure and goals. It also now has its own mini-documentary.
Read the Elixir-lang blog for the full list of Elixir 1.7 updates. You can also check the Install section to get Elixir installed and read the Getting Started guide to learn more.
Elixir Basics – Foundational Steps toward Functional Programming
5 Reasons to learn programming