nitunit: use `test` annotation for modules
authorAlexandre Terrasa <alexandre@moz-code.org>
Tue, 6 Jun 2017 00:23:45 +0000 (20:23 -0400)
committerAlexandre Terrasa <alexandre@moz-code.org>
Tue, 15 Aug 2017 18:12:16 +0000 (14:12 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

src/testing/testing_suite.nit

index 295598b..f29b8ef 100644 (file)
@@ -17,6 +17,7 @@ module testing_suite
 
 import testing_base
 import html
+private import parse_annotations
 private import annotation
 private import realtime
 
@@ -438,7 +439,7 @@ redef class ModelBuilder
        # Run NitUnit test suite for `mmodule` (if it is one).
        fun test_unit(mmodule: MModule): nullable HTMLTag do
                # is the module a test_suite?
-               if get_mmodule_annotation("test_suite", mmodule) == null then return null
+               if not mmodule.is_test then return null
                toolcontext.info("nitunit: test-suite {mmodule}", 2)
 
                var tester = new NitUnitTester(self)