nitunit: process failures (bad code) before leaving
authorJean Privat <jean@pryen.org>
Wed, 17 Jun 2015 15:11:42 +0000 (11:11 -0400)
committerJean Privat <jean@pryen.org>
Wed, 17 Jun 2015 15:11:42 +0000 (11:11 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

src/testing/testing_doc.nit

index 0f29d40..1d6096e 100644 (file)
@@ -68,7 +68,6 @@ class NitUnitExecutor
 
                # Populate `blocks` from the markdown decorator
                mdproc.process(mdoc.content.join("\n"))
-               if blocks.is_empty then return
 
                toolcontext.check_errors
 
@@ -82,6 +81,7 @@ class NitUnitExecutor
                        if blocks.is_empty then testsuite.add(tc)
                end
 
+               if blocks.is_empty then return
                for block in blocks do
                        docunits.add new DocUnit(mdoc, tc, block.write_to_string)
                end