Summary
In this chapter, we introduced unit testing for languages implemented with Xtext. Being able to test most of the DSL aspects without having to start an Eclipse environment, really speeds up development.
TDD is an important programming methodology that helps you make your implementations more modular, more reliable, and resilient to changes of the libraries used by your code.
In the next chapter, we will implement a DSL based on expressions. In spite of the apparent simplicity, parsing and checking expressions is not that simple, since arithmetic and boolean expressions are inherently recursive, and dealing with recursion always requires some additional attention and effort. We will also implement a type system to check that expressions are well typed. Finally, we will implement an interpreter for these expressions.