diff options
author | chebizarro@gmail.com <chebizarro@gmail.com> | 2017-04-28 06:28:47 -0700 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2017-11-19 12:35:04 +0100 |
commit | e7d423d4d708c56bf5cee1720506861fa010ec97 (patch) | |
tree | 97b487d247696b864122cd7431742389db4a9586 /valadate | |
parent | fa18d8b28b247fb499acb4aa7ad3272dc576f56b (diff) | |
download | vala-e7d423d4d708c56bf5cee1720506861fa010ec97.tar.gz |
modified tests
Diffstat (limited to 'valadate')
-rw-r--r-- | valadate/testcase.vala | 3 | ||||
-rw-r--r-- | valadate/testconfig.vala | 6 | ||||
-rw-r--r-- | valadate/testoptions.vala | 6 | ||||
-rw-r--r-- | valadate/testreport.vala | 12 | ||||
-rw-r--r-- | valadate/testrunner.vala | 2 |
5 files changed, 14 insertions, 15 deletions
diff --git a/valadate/testcase.vala b/valadate/testcase.vala index fc2e52d9f..717d87988 100644 --- a/valadate/testcase.vala +++ b/valadate/testcase.vala @@ -2,7 +2,7 @@ * Valadate - Unit testing library for GObject-based libraries. * * testcase.vala - * Copyright (C) 2016 Chris Daley + * Copyright (C) 2016-2017 Chris Daley * Copyright (C) 2009-2012 Julien Peeters * * This library is free software; you can redistribute it and/or @@ -116,7 +116,6 @@ public abstract class Valadate.TestCase : Object, Test { public void skip(string message) { current_result.add_skip(current_test, message); - } public void fail(string? message = null) { diff --git a/valadate/testconfig.vala b/valadate/testconfig.vala index 6ed1d35f6..a7405dbd8 100644 --- a/valadate/testconfig.vala +++ b/valadate/testconfig.vala @@ -43,6 +43,12 @@ public class Valadate.TestConfig { } } + public string[] testpaths { + get { + return options.testpaths; + } + } + public string? running_test { get { return options.running_test; diff --git a/valadate/testoptions.vala b/valadate/testoptions.vala index c627c69b1..1cffd5413 100644 --- a/valadate/testoptions.vala +++ b/valadate/testoptions.vala @@ -112,6 +112,12 @@ public class Valadate.TestOptions { } } + public string[] testpaths { + get { + return _paths; + } + } + public TestOptions(string[] args) throws OptionError { _runtest = null; diff --git a/valadate/testreport.vala b/valadate/testreport.vala index 8e4dc734b..f5e58f6d9 100644 --- a/valadate/testreport.vala +++ b/valadate/testreport.vala @@ -84,18 +84,6 @@ public class Valadate.TestReport { root->set_prop("tests", test.count.to_string()); root->set_prop("name",test.label); xml = new XmlFile.from_doc(doc); - - if(test.parent != null && test.parent.name != "/") - return; - - var props = root->children; - - foreach(var key in Environment.list_variables()) { - Xml.Node* node = new Xml.Node(null, "property"); - node->set_prop("name", key); - node->set_prop("value", Markup.escape_text(Environment.get_variable(key))); - props->add_child(node); - } } private void new_testcase() throws Error { diff --git a/valadate/testrunner.vala b/valadate/testrunner.vala index 2576cc3d8..6635499de 100644 --- a/valadate/testrunner.vala +++ b/valadate/testrunner.vala @@ -28,7 +28,7 @@ public class Valadate.TestRunner { private uint _n_ongoing_tests = 0; private Queue<DelegateWrapper> _pending_tests = new Queue<DelegateWrapper> (); - private static uint _max_n_ongoing_tests = GLib.get_num_processors(); + private static uint _max_n_ongoing_tests = GLib.get_num_processors() * 2; private MainLoop loop; private TestPlan plan; |