Creating a new test for your fresh feature
Plenty of ideas related to Libgdx would have been raised in your head as you read this book. Now is the time to let your creativity loose and contribute, but first, you must check that your fresh idea really works.
Libgdx comes with its own testing environment that gives you several facilities to get your feature running sooner.
Getting ready
In this recipe, we will suppose that you want to add a new feature to the official Libgdx project, so it needs to be imported into your Eclipse workspace. If you do not know how to do it, please take a look at the Using source control on a Libgdx project with Git recipe of Chapter 1, Diving into Libgdx.
How to do it…
All the tests are gathered from the directory at https://github.com/libgdx/libgdx/tree/master/tests/gdx-tests/src/com/badlogic/gdx/tests.
If you play around with some of them, it will not take too much to realize that the common factor is to extend GdxTest
, which is placed within the utils
folder...