src: cleanup importations
[nit.git] / src / testing / testing_base.nit
index 7e0c616..62cfb08 100644 (file)
@@ -15,8 +15,8 @@
 # Base options for testing tools.
 module testing_base
 
-import modelize_property
-import parser_util
+import modelize
+private import parser_util
 
 redef class ToolContext
        # opt --full
@@ -27,4 +27,11 @@ redef class ToolContext
        var opt_dir = new OptionString("Working directory (default is '.nitunit')", "--dir")
        # opt --no-act
        var opt_noact = new OptionBool("Does not compile and run tests", "--no-act")
+
+       # Working directory for testing.
+       fun test_dir: String do
+               var dir = opt_dir.value
+               if dir == null then return ".nitunit"
+               return dir
+       end
 end