nitlang / nit

Nit language
http://nitlanguage.org
Apache License 2.0
239 stars 65 forks source link

Introduce `test_frontend` #2769

Closed Morriar closed 5 years ago

Morriar commented 5 years ago

Sometimes we need to test things related to a model and it's not easy to do this with NitUnit since creating a model by hand is tedious.

With the TestModel abstract suite it's easier:

module my_test is test

import test_frontend

class MyTest
   super TestModel
   test

   redef var test_src = "path/to/files"

   fun my_test is test do
       assert test_model.mmodules.length == 1
   end
end