From: Jean Privat Date: Tue, 20 Jun 2017 17:35:17 +0000 (-0400) Subject: nitunit: introduce `is_compiled` to see if a unit file is compiled X-Git-Url: http://nitlanguage.org?ds=sidebyside nitunit: introduce `is_compiled` to see if a unit file is compiled Signed-off-by: Jean Privat --- diff --git a/src/testing/testing_doc.nit b/src/testing/testing_doc.nit index a17c8ab..69259ea 100644 --- a/src/testing/testing_doc.nit +++ b/src/testing/testing_doc.nit @@ -119,7 +119,7 @@ class NitUnitExecutor for du in docunits do if du.error != null then # Nothing to execute. Conclude - else if du.test_file != null then + else if du.is_compiled then # Already compiled. Execute it. execute_simple_docunit(du) else @@ -186,6 +186,7 @@ class NitUnitExecutor i += 1 du.test_file = file du.test_arg = i + du.is_compiled = true end end @@ -403,6 +404,9 @@ class DocUnit # See `test_arg` that is used to distinguish them var test_file: nullable String = null + # Was `test_file` successfully compiled? + var is_compiled = false + # The command-line argument to use when executing the test, if any. var test_arg: nullable Int = null