[Xfce4-commits] <midori:master> Setup Midori.App in all unit tests

Christian Dywan noreply at xfce.org
Tue Nov 20 01:36:03 CET 2012


Updating branch refs/heads/master
         to c037a00e238fb985d3b19d5371a0cbb876026615 (commit)
       from 9fca63ba56bd6007ba6dd4ebac5685603b48ed08 (commit)

commit c037a00e238fb985d3b19d5371a0cbb876026615
Author: Christian Dywan <christian at twotoasts.de>
Date:   Tue Nov 20 01:35:07 2012 +0100

    Setup Midori.App in all unit tests
    
    This is needed to ensure stdout goes to console.

 katze/katze.vapi        |    2 +-
 midori/midori.vapi      |    2 +-
 tests/completion.vala   |    1 +
 tests/download.vala     |    1 +
 tests/hsts.vala         |    1 +
 tests/searchaction.vala |    1 +
 tests/speeddial.vala    |    1 +
 7 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/katze/katze.vapi b/katze/katze.vapi
index 1627568..e2d92d9 100644
--- a/katze/katze.vapi
+++ b/katze/katze.vapi
@@ -3,7 +3,7 @@
 
 [CCode (cprefix = "Katze", lower_case_cprefix = "katze_")]
 namespace Katze {
-    static string assert_str_equal (string input, string result, string expected);
+    static void assert_str_equal (string input, string result, string expected);
 
     [CCode (cheader_filename = "katze/katze.h")]
     public class Array : Katze.Item {
diff --git a/midori/midori.vapi b/midori/midori.vapi
index 195d395..1c70e6d 100644
--- a/midori/midori.vapi
+++ b/midori/midori.vapi
@@ -8,7 +8,7 @@ namespace Midori {
     [CCode (cheader_filename = "midori/midori.h")]
     public class App : GLib.Object {
         public App ();
-        public static bool setup ([CCode (array_length_pos = 0.9)] ref unowned string[] args, [CCode (array_length = false)] GLib.OptionEntry[]? entries);
+        public static void setup ([CCode (array_length_pos = 0.9)] ref unowned string[] args, [CCode (array_length = false)] GLib.OptionEntry[]? entries);
         public Browser create_browser ();
         public GLib.List<weak Browser> get_browsers ();
 
diff --git a/tests/completion.vala b/tests/completion.vala
index e265128..0a6261d 100644
--- a/tests/completion.vala
+++ b/tests/completion.vala
@@ -124,6 +124,7 @@ void completion_history () {
 
 void main (string[] args) {
     Test.init (ref args);
+    Midori.App.setup (ref args, null);
     Test.add_func ("/completion/autocompleter", completion_autocompleter);
     Test.add_func ("/completion/history", completion_history);
     Test.run ();
diff --git a/tests/download.vala b/tests/download.vala
index b05d63c..6262772 100644
--- a/tests/download.vala
+++ b/tests/download.vala
@@ -65,6 +65,7 @@ static void download_unique () {
 
 void main (string[] args) {
     Test.init (ref args);
+    Midori.App.setup (ref args, null);
     Midori.Paths.init (Midori.RuntimeMode.NORMAL, null);
     Test.add_func ("/download/suggestion", download_suggestion);
     Test.add_func ("/download/extension", download_extension);
diff --git a/tests/hsts.vala b/tests/hsts.vala
index a71ec9d..7ba46b4 100644
--- a/tests/hsts.vala
+++ b/tests/hsts.vala
@@ -25,6 +25,7 @@ static void http_hsts () {
 
 void main (string[] args) {
     Test.init (ref args);
+    Midori.App.setup (ref args, null);
     Test.add_func ("/http/hsts", http_hsts);
     Test.run ();
 }
diff --git a/tests/searchaction.vala b/tests/searchaction.vala
index 60dc81a..eab9843 100644
--- a/tests/searchaction.vala
+++ b/tests/searchaction.vala
@@ -40,6 +40,7 @@ void searchaction_form () {
 
 void main (string[] args) {
     Test.init (ref args);
+    Midori.App.setup (ref args, null);
     Test.add_func ("/searchaction/form", searchaction_form);
     Test.run ();
 }
diff --git a/tests/speeddial.vala b/tests/speeddial.vala
index 487da66..1716b77 100644
--- a/tests/speeddial.vala
+++ b/tests/speeddial.vala
@@ -82,6 +82,7 @@ static void speeddial_load () {
 
 void main (string[] args) {
     Test.init (ref args);
+    Midori.App.setup (ref args, null);
     Midori.Paths.init (Midori.RuntimeMode.NORMAL, null);
     Test.add_func ("/speeddial/load", speeddial_load);
     Test.run ();


More information about the Xfce4-commits mailing list