[vala/wip/valadate: 749/749] Minor API cleaning



commit 8bfc88fecc8076061d640da4de80dd7e721c303b
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Mon May 1 22:06:39 2017 +0200

    Minor API cleaning

 valadate/testconfig.vala           |   18 +++++++++---------
 valadate/testreportprinter.vala    |    2 +-
 valadate/xmltestreportprinter.vala |    1 -
 3 files changed, 10 insertions(+), 11 deletions(-)
---
diff --git a/valadate/testconfig.vala b/valadate/testconfig.vala
index d6dcadc..22da8d6 100644
--- a/valadate/testconfig.vala
+++ b/valadate/testconfig.vala
@@ -45,7 +45,7 @@ public class Valadate.TestConfig {
        private static bool _version;
        private static string _path = null;
 
-       public const OptionEntry[] options = {
+       private const OptionEntry[] options = {
                { "format", 'f', 0, OptionArg.STRING, ref _format, "Output test results using format", 
"FORMAT" },
                { "", 'k', 0, OptionArg.NONE, ref _keepgoing, "Skip failed tests and continue running", null 
},
                { "list", 'l', 0, OptionArg.NONE, ref _list, "List test cases available in a test 
executable", null },
@@ -57,15 +57,13 @@ public class Valadate.TestConfig {
                { null }
        };
 
-       public OptionContext opt_context;
-
-       public virtual string format {
+       public string format {
                get {
                        return _format;
                }
        }
 
-       public virtual string seed {
+       public string seed {
                get {
                        return _seed;
                }
@@ -89,30 +87,32 @@ public class Valadate.TestConfig {
                }
        }
 
-       public virtual bool list_only {
+       public bool list_only {
                get {
                        return _list;
                }
        }
 
-       public virtual bool keep_going {
+       public bool keep_going {
                get {
                        return _keepgoing;
                }
        }
 
-       public virtual int timeout {
+       public int timeout {
                get {
                        return _timeout;
                }
        }
 
-       public virtual bool timed {
+       public bool timed {
                get {
                        return _timed;
                }
        }
 
+       private OptionContext opt_context;
+
        public TestConfig (string[] args) {
                _running_test = null;
 
diff --git a/valadate/testreportprinter.vala b/valadate/testreportprinter.vala
index da58a95..8e0b399 100644
--- a/valadate/testreportprinter.vala
+++ b/valadate/testreportprinter.vala
@@ -36,7 +36,7 @@ public abstract class Valadate.TestReportPrinter {
                }
        }
 
-       public TestConfig config {get; set;}
+       public TestConfig config { get; private set; }
 
        internal TestReportPrinter (TestConfig config) throws Error {
                this.config = config;
diff --git a/valadate/xmltestreportprinter.vala b/valadate/xmltestreportprinter.vala
index 9a023c9..bdb634c 100644
--- a/valadate/xmltestreportprinter.vala
+++ b/valadate/xmltestreportprinter.vala
@@ -37,7 +37,6 @@ internal class Valadate.XmlTestReportPrinter : TestReportPrinter {
 
        public XmlTestReportPrinter (TestConfig config) throws Error {
                base (config);
-               this.config = config;
                xml = new XmlFile.from_string (XML_DECL + TESTSUITES_XML);
        }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]