[packages/zeitgeist] up to 1.0.4

atler atler at pld-linux.org
Fri Jan 14 12:00:16 CET 2022


commit 2ffa89231afbc732e9e0f2d4e6777081d12f1ffd
Author: Jan Palus <atler at pld-linux.org>
Date:   Fri Jan 14 11:58:57 2022 +0100

    up to 1.0.4

 0001-use-genericarray-api-only.patch         |  25 --
 0002-fix-syntax-of-namespace-docs.patch      |  24 --
 0003-sync-custom-g-assert-cmp-bindings.patch | 611 ---------------------------
 zeitgeist.spec                               |  16 +-
 4 files changed, 5 insertions(+), 671 deletions(-)
---
diff --git a/zeitgeist.spec b/zeitgeist.spec
index 9de3009..25e5a08 100644
--- a/zeitgeist.spec
+++ b/zeitgeist.spec
@@ -1,17 +1,14 @@
 Summary:	Framework providing Desktop activity awareness
 Summary(pl.UTF-8):	Szkielet zapewniający świadomość aktywności w środowisku graficznym
 Name:		zeitgeist
-Version:	1.0.3
-Release:	4
+Version:	1.0.4
+Release:	1
 License:	LGPL v2.1+
 Group:		Daemons
 Source0:	http://launchpad.net/zeitgeist/1.0/%{version}/+download/%{name}-%{version}.tar.xz
-# Source0-md5:	8258b5521d1f25d18f7ace3c974c5ab1
+# Source0-md5:	f02e8be3dc5f18a67be3b1272108d584
 Patch0:		%{name}-lt.patch
 Patch1:		%{name}-vala.patch
-Patch2:		0001-use-genericarray-api-only.patch
-Patch3:		0002-fix-syntax-of-namespace-docs.patch
-Patch4:		0003-sync-custom-g-assert-cmp-bindings.patch
 URL:		http://launchpad.net/zeitgeist
 BuildRequires:	autoconf >= 2.65
 BuildRequires:	automake >= 1:1.11
@@ -31,7 +28,7 @@ BuildRequires:	rpmbuild(macros) >= 1.682
 BuildRequires:	sqlite3-devel >= 3.7.11
 BuildRequires:	tar >= 1:1.22
 BuildRequires:	telepathy-glib-devel >= 0.18.0
-BuildRequires:	vala >= 2:0.22.0
+BuildRequires:	vala >= 2:0.32.1
 BuildRequires:	vala-telepathy-glib >= 0.18.0
 BuildRequires:	valadoc >= 0.2
 BuildRequires:	xapian-core-devel
@@ -106,7 +103,7 @@ Summary:	Zeitgeist API for Vala language
 Summary(pl.UTF-8):	API Zeitgeist dla języka Vala
 Group:		Development/Libraries
 Requires:	%{name}-devel = %{version}-%{release}
-Requires:	vala >= 2:0.18.0
+Requires:	vala >= 2:0.32.1
 BuildArch:	noarch
 
 %description -n vala-zeitgeist
@@ -132,9 +129,6 @@ Pakiet ten dostarcza bashowe uzupełnianie nazw dla Zeitgeist.
 %setup -q
 %patch0 -p1
 %patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
 
 %build
 %{__gettextize}
diff --git a/0001-use-genericarray-api-only.patch b/0001-use-genericarray-api-only.patch
deleted file mode 100644
index 818df66..0000000
--- a/0001-use-genericarray-api-only.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 64ac3a6f94cd299e5e14945dc31b48f009dec152 Mon Sep 17 00:00:00 2001
-From: Rico Tzschichholz <ricotz at ubuntu.com>
-Date: Wed, 30 Dec 2020 16:50:32 +0100
-Subject: Use GenericArray API only
-
----
- libzeitgeist/where-clause.vala | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/libzeitgeist/where-clause.vala b/libzeitgeist/where-clause.vala
-index 204e9b1..c3e6fa6 100644
---- a/libzeitgeist/where-clause.vala
-+++ b/libzeitgeist/where-clause.vala
-@@ -216,7 +216,7 @@ namespace Zeitgeist
- #else
-             long[] pointers = new long[gptrarr.length + 1];
- #endif
--            Memory.copy(pointers, ((PtrArray *) gptrarr)->pdata,
-+            Memory.copy(pointers, (void*) gptrarr.data,
-                 gptrarr.length * sizeof (void *));
-             return (T[]) pointers;
-         }
--- 
-cgit v1.1
-
diff --git a/0002-fix-syntax-of-namespace-docs.patch b/0002-fix-syntax-of-namespace-docs.patch
deleted file mode 100644
index c0cf032..0000000
--- a/0002-fix-syntax-of-namespace-docs.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From 5d26650f0da9d47ce69cd9b739ad7a6990071f39 Mon Sep 17 00:00:00 2001
-From: Rico Tzschichholz <ricotz at ubuntu.com>
-Date: Wed, 30 Dec 2020 16:56:17 +0100
-Subject: Fix syntax of namespace documentation block
-
----
- libzeitgeist/log.vala | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/libzeitgeist/log.vala b/libzeitgeist/log.vala
-index 9b488af..53cd4f5 100644
---- a/libzeitgeist/log.vala
-+++ b/libzeitgeist/log.vala
-@@ -29,6 +29,7 @@
-  *
-  * Its main component is the Zeitgeist engine, a D-Bus service that logs
-  * any events other applications send to it. An event may be anything like:
-+ *
-  *  - The user opened/created/modified/closed a file, or visited a website.
-  *  - The user received an e-mail, a phone call or an IM notification.
-  *  - Someone modified a remote (eg. Google Drive) document owned by the user.
--- 
-cgit v1.1
-
diff --git a/0003-sync-custom-g-assert-cmp-bindings.patch b/0003-sync-custom-g-assert-cmp-bindings.patch
deleted file mode 100644
index 138f5a4..0000000
--- a/0003-sync-custom-g-assert-cmp-bindings.patch
+++ /dev/null
@@ -1,611 +0,0 @@
-From 702fdbac0e9174d9627813a267764c7448bc919f Mon Sep 17 00:00:00 2001
-From: Rico Tzschichholz <ricotz at ubuntu.com>
-Date: Wed, 30 Dec 2020 17:12:44 +0100
-Subject: Sync custom g_assert_cmp* bindings with vala 0.52 and use them as
- needed
-
----
- test/direct/assertions.vapi        |  32 +++++----
- test/direct/datamodel-test.vala    |   2 +-
- test/direct/datasource-test.vala   |  20 +++---
- test/direct/event-test.vala        | 142 ++++++++++++++++++-------------------
- test/direct/marshalling-test.vala  |   6 +-
- test/direct/mimetype-test.vala     |  16 ++---
- test/direct/symbol-test.vala       |  10 +--
- test/direct/table-lookup-test.vala |  14 ++--
- test/direct/where-clause-test.vala |  30 ++++----
- 9 files changed, 137 insertions(+), 135 deletions(-)
-
-diff --git a/test/direct/assertions.vapi b/test/direct/assertions.vapi
-index 5848434..f3aebb8 100644
---- a/test/direct/assertions.vapi
-+++ b/test/direct/assertions.vapi
-@@ -1,23 +1,25 @@
- [CCode (cprefix = "G", lower_case_cprefix = "g_", cheader_filename = "glib.h")]
- namespace Assertions {
--  public enum OperatorType {
-+#if !VALA_0_52
-+  public enum CompareOperator {
-     [CCode (cname = "==")]
--    EQUAL,
-+    EQ,
-     [CCode (cname = "!=")]
--    NOT_EQUAL,
--    [CCode (cname = "<")]
--    LESS_THAN,
--    [CCode (cname = ">")]
--    GREATER_THAN,
--    [CCode (cname = "<=")]
--    LESS_OR_EQUAL,
-+    NE,
-     [CCode (cname = ">=")]
--    GREATER_OR_EQUAL
-+    GE,
-+    [CCode (cname = "<=")]
-+    LE,
-+    [CCode (cname = ">")]
-+    GT,
-+    [CCode (cname = "<")]
-+    LT
-   }
- 
--  public void assert_cmpstr (string? s1, OperatorType op, string? s2);
--  public void assert_cmpint (int n1, OperatorType op, int n2);
--  public void assert_cmpuint (uint n1, OperatorType op, uint n2);
--  public void assert_cmphex (uint n1, OperatorType op, uint n2);
--  public void assert_cmpfloat (float n1, OperatorType op, float n2);
-+  public void assert_cmpstr (string? s1, CompareOperator op, string? s2);
-+  public void assert_cmpint (int n1, CompareOperator op, int n2);
-+  public void assert_cmpuint (uint n1, CompareOperator op, uint n2);
-+  public void assert_cmphex (uint n1, CompareOperator op, uint n2);
-+  public void assert_cmpfloat (double n1, CompareOperator op, double n2);
-+#endif
- }
-diff --git a/test/direct/datamodel-test.vala b/test/direct/datamodel-test.vala
-index 4fc0304..036e075 100644
---- a/test/direct/datamodel-test.vala
-+++ b/test/direct/datamodel-test.vala
-@@ -113,7 +113,7 @@ void foreach_test ()
-     int i = 0;
-     foreach (Event e in result_set)
-     {
--        assert_cmpint ((int) e.id, OperatorType.EQUAL, i);
-+        assert_cmpint ((int) e.id, CompareOperator.EQ, i);
-         i++;
-     }
- 
-diff --git a/test/direct/datasource-test.vala b/test/direct/datasource-test.vala
-index c9066f4..c15c92c 100644
---- a/test/direct/datasource-test.vala
-+++ b/test/direct/datasource-test.vala
-@@ -35,9 +35,9 @@ int main (string[] argv)
- void create_empty_test ()
- {
-     var src = new DataSource ();
--    assert_cmpstr (src.unique_id, OperatorType.EQUAL, null);
--    assert_cmpstr (src.name, OperatorType.EQUAL, null);
--    assert_cmpstr (src.description, OperatorType.EQUAL, null);
-+    assert_cmpstr (src.unique_id, CompareOperator.EQ, null);
-+    assert_cmpstr (src.name, CompareOperator.EQ, null);
-+    assert_cmpstr (src.description, CompareOperator.EQ, null);
-     assert (src.event_templates == null);
-     assert (src.running == false);
-     assert (src.timestamp == 0);
-@@ -48,9 +48,9 @@ void create_full_test ()
- {
-     var src = new DataSource.full ("my-id", "my-name", "my-desc", null);
- 
--    assert_cmpstr (src.unique_id, OperatorType.EQUAL, "my-id");
--    assert_cmpstr (src.name, OperatorType.EQUAL, "my-name");
--    assert_cmpstr (src.description, OperatorType.EQUAL, "my-desc");
-+    assert_cmpstr (src.unique_id, CompareOperator.EQ, "my-id");
-+    assert_cmpstr (src.name, CompareOperator.EQ, "my-name");
-+    assert_cmpstr (src.description, CompareOperator.EQ, "my-desc");
-     assert (src.event_templates == null);
-     assert (src.running == false);
-     assert (src.timestamp ==  0);
-@@ -81,16 +81,16 @@ void to_from_variant_test ()
-     orig.event_templates = event_templates;
- 
-     var src = new DataSource.from_variant (orig.to_variant ());
--    assert_cmpstr (src.unique_id, OperatorType.EQUAL, "my-id");
--    assert_cmpstr (src.name, OperatorType.EQUAL, "my-name");
--    assert_cmpstr (src.description, OperatorType.EQUAL, "my-desc");
-+    assert_cmpstr (src.unique_id, CompareOperator.EQ, "my-id");
-+    assert_cmpstr (src.name, CompareOperator.EQ, "my-name");
-+    assert_cmpstr (src.description, CompareOperator.EQ, "my-desc");
-     assert (src.event_templates != null);
-     assert (src.running == false);
-     assert (src.timestamp == now);
-     assert (src.enabled == true);
- 
-     event_templates = src.event_templates;
--    assert_cmpint (event_templates.length, OperatorType.EQUAL, 1);
-+    assert_cmpint (event_templates.length, CompareOperator.EQ, 1);
-     assert (event_templates.get (0) is Event);
- }
- 
-diff --git a/test/direct/event-test.vala b/test/direct/event-test.vala
-index 7189057..b47ddb8 100644
---- a/test/direct/event-test.vala
-+++ b/test/direct/event-test.vala
-@@ -46,11 +46,11 @@ void create_empty_test ()
- 
-     assert (ev.id == 0);
-     assert (ev.timestamp == 0);
--    assert_cmpstr (ev.interpretation, OperatorType.EQUAL, null);
--    assert_cmpstr (ev.manifestation, OperatorType.EQUAL, null);
--    assert_cmpstr (ev.actor, OperatorType.EQUAL, null);
--    assert_cmpstr (ev.origin, OperatorType.EQUAL, null);
--    assert_cmpint (ev.num_subjects (), OperatorType.EQUAL, 0);
-+    assert_cmpstr (ev.interpretation, CompareOperator.EQ, null);
-+    assert_cmpstr (ev.manifestation, CompareOperator.EQ, null);
-+    assert_cmpstr (ev.actor, CompareOperator.EQ, null);
-+    assert_cmpstr (ev.origin, CompareOperator.EQ, null);
-+    assert_cmpint (ev.num_subjects (), CompareOperator.EQ, 0);
-     assert (ev.payload == null);
- }
- 
-@@ -65,22 +65,22 @@ void create_full_test ()
- 
-     assert (ev.id == 0);
-     assert (ev.timestamp == 0);
--    assert_cmpstr (ev.interpretation, OperatorType.EQUAL, ZG.ACCESS_EVENT);
--    assert_cmpstr (ev.manifestation, OperatorType.EQUAL, ZG.USER_ACTIVITY);
--    assert_cmpstr (ev.actor, OperatorType.EQUAL, "application://firefox.desktop");
--    assert_cmpstr (ev.origin, OperatorType.EQUAL, null);
--    assert_cmpint (ev.num_subjects (), OperatorType.EQUAL, 2);
-+    assert_cmpstr (ev.interpretation, CompareOperator.EQ, ZG.ACCESS_EVENT);
-+    assert_cmpstr (ev.manifestation, CompareOperator.EQ, ZG.USER_ACTIVITY);
-+    assert_cmpstr (ev.actor, CompareOperator.EQ, "application://firefox.desktop");
-+    assert_cmpstr (ev.origin, CompareOperator.EQ, null);
-+    assert_cmpint (ev.num_subjects (), CompareOperator.EQ, 2);
-     assert (ev.payload == null);
- 
-     var su = ev.subjects[1];
--    assert_cmpstr (su.uri, OperatorType.EQUAL, null);
--    assert_cmpstr (su.interpretation, OperatorType.EQUAL, null);
--    assert_cmpstr (su.manifestation, OperatorType.EQUAL, null);
--    assert_cmpstr (su.mimetype, OperatorType.EQUAL, null);
--    assert_cmpstr (su.origin, OperatorType.EQUAL, null);
--    assert_cmpstr (su.text, OperatorType.EQUAL, null);
--    assert_cmpstr (su.storage, OperatorType.EQUAL, null);
--    assert_cmpstr (su.current_uri, OperatorType.EQUAL, null);
-+    assert_cmpstr (su.uri, CompareOperator.EQ, null);
-+    assert_cmpstr (su.interpretation, CompareOperator.EQ, null);
-+    assert_cmpstr (su.manifestation, CompareOperator.EQ, null);
-+    assert_cmpstr (su.mimetype, CompareOperator.EQ, null);
-+    assert_cmpstr (su.origin, CompareOperator.EQ, null);
-+    assert_cmpstr (su.text, CompareOperator.EQ, null);
-+    assert_cmpstr (su.storage, CompareOperator.EQ, null);
-+    assert_cmpstr (su.current_uri, CompareOperator.EQ, null);
- }
- 
- void actor_from_app_info_test ()
-@@ -90,7 +90,7 @@ void actor_from_app_info_test ()
- 
-     var ev = new Event ();
-     ev.set_actor_from_app_info (appinfo);
--    assert_cmpstr (ev.actor, OperatorType.EQUAL, "application://test.desktop");
-+    assert_cmpstr (ev.actor, CompareOperator.EQ, "application://test.desktop");
- }
- 
- void from_variant_test ()
-@@ -139,26 +139,26 @@ void from_variant_test ()
- 
-     assert (ev.id == 27);
-     assert (ev.timestamp == 68);
--    assert_cmpstr (ev.interpretation, OperatorType.EQUAL, ZG.ACCESS_EVENT);
--    assert_cmpstr (ev.manifestation, OperatorType.EQUAL, ZG.USER_ACTIVITY);
--    assert_cmpstr (ev.actor, OperatorType.EQUAL, "application://foo.desktop");
--    assert_cmpstr (ev.origin, OperatorType.EQUAL, null);
--    assert_cmpint (ev.num_subjects (), OperatorType.EQUAL, 1);
-+    assert_cmpstr (ev.interpretation, CompareOperator.EQ, ZG.ACCESS_EVENT);
-+    assert_cmpstr (ev.manifestation, CompareOperator.EQ, ZG.USER_ACTIVITY);
-+    assert_cmpstr (ev.actor, CompareOperator.EQ, "application://foo.desktop");
-+    assert_cmpstr (ev.origin, CompareOperator.EQ, null);
-+    assert_cmpint (ev.num_subjects (), CompareOperator.EQ, 1);
- 
-     var su = ev.subjects[0];
--    assert_cmpstr (su.uri, OperatorType.EQUAL, "file:///tmp/foo.txt");
--    assert_cmpstr (su.interpretation, OperatorType.EQUAL, NFO.DOCUMENT);
--    assert_cmpstr (su.manifestation, OperatorType.EQUAL, NFO.FILE_DATA_OBJECT);
--    assert_cmpstr (su.mimetype, OperatorType.EQUAL, "text/plain");
--    assert_cmpstr (su.origin, OperatorType.EQUAL, "file://tmp");
--    assert_cmpstr (su.storage, OperatorType.EQUAL, "36e5604e-7e1b-4ebd-bb6a-184c6ea99627");
-+    assert_cmpstr (su.uri, CompareOperator.EQ, "file:///tmp/foo.txt");
-+    assert_cmpstr (su.interpretation, CompareOperator.EQ, NFO.DOCUMENT);
-+    assert_cmpstr (su.manifestation, CompareOperator.EQ, NFO.FILE_DATA_OBJECT);
-+    assert_cmpstr (su.mimetype, CompareOperator.EQ, "text/plain");
-+    assert_cmpstr (su.origin, CompareOperator.EQ, "file://tmp");
-+    assert_cmpstr (su.storage, CompareOperator.EQ, "36e5604e-7e1b-4ebd-bb6a-184c6ea99627");
- 
-     var payload = ev.payload;
-     assert (payload != null);
--    assert_cmpuint (payload.len, OperatorType.EQUAL, 3);
--    assert_cmpint (payload.data[0], OperatorType.EQUAL, 1);
--    assert_cmpint (payload.data[1], OperatorType.EQUAL, 2);
--    assert_cmpint (payload.data[2], OperatorType.EQUAL, 3);
-+    assert_cmpuint (payload.len, CompareOperator.EQ, 3);
-+    assert_cmpint (payload.data[0], CompareOperator.EQ, 1);
-+    assert_cmpint (payload.data[1], CompareOperator.EQ, 2);
-+    assert_cmpint (payload.data[2], CompareOperator.EQ, 3);
- }
- 
- void from_variant_with_new_fields_test ()
-@@ -210,29 +210,29 @@ void from_variant_with_new_fields_test ()
- 
-     assert (ev.id == 27);
-     assert (ev.timestamp == 68);
--    assert_cmpstr (ev.interpretation, OperatorType.EQUAL, ZG.ACCESS_EVENT);
--    assert_cmpstr (ev.manifestation, OperatorType.EQUAL, ZG.USER_ACTIVITY);
--    assert_cmpstr (ev.actor, OperatorType.EQUAL, "application://foo.desktop");
--    assert_cmpstr (ev.origin, OperatorType.EQUAL, "origin");
--    assert_cmpint (ev.num_subjects (), OperatorType.EQUAL, 1);
-+    assert_cmpstr (ev.interpretation, CompareOperator.EQ, ZG.ACCESS_EVENT);
-+    assert_cmpstr (ev.manifestation, CompareOperator.EQ, ZG.USER_ACTIVITY);
-+    assert_cmpstr (ev.actor, CompareOperator.EQ, "application://foo.desktop");
-+    assert_cmpstr (ev.origin, CompareOperator.EQ, "origin");
-+    assert_cmpint (ev.num_subjects (), CompareOperator.EQ, 1);
- 
-     var su = ev.subjects[0];
--    assert_cmpstr (su.uri, OperatorType.EQUAL, "file:///tmp/foo.txt");
--    assert_cmpstr (su.interpretation, OperatorType.EQUAL, NFO.DOCUMENT);
--    assert_cmpstr (su.manifestation, OperatorType.EQUAL, NFO.FILE_DATA_OBJECT);
--    assert_cmpstr (su.mimetype, OperatorType.EQUAL, "text/plain");
--    assert_cmpstr (su.origin, OperatorType.EQUAL, "file:///tmp");
--    assert_cmpstr (su.text, OperatorType.EQUAL, "foo.text");
--    assert_cmpstr (su.storage, OperatorType.EQUAL, "36e5604e-7e1b-4ebd-bb6a-184c6ea99627");
--    assert_cmpstr (su.current_uri, OperatorType.EQUAL, "file:///tmp/current.txt");
--    assert_cmpstr (su.current_origin, OperatorType.EQUAL, "file:///tmp1");
-+    assert_cmpstr (su.uri, CompareOperator.EQ, "file:///tmp/foo.txt");
-+    assert_cmpstr (su.interpretation, CompareOperator.EQ, NFO.DOCUMENT);
-+    assert_cmpstr (su.manifestation, CompareOperator.EQ, NFO.FILE_DATA_OBJECT);
-+    assert_cmpstr (su.mimetype, CompareOperator.EQ, "text/plain");
-+    assert_cmpstr (su.origin, CompareOperator.EQ, "file:///tmp");
-+    assert_cmpstr (su.text, CompareOperator.EQ, "foo.text");
-+    assert_cmpstr (su.storage, CompareOperator.EQ, "36e5604e-7e1b-4ebd-bb6a-184c6ea99627");
-+    assert_cmpstr (su.current_uri, CompareOperator.EQ, "file:///tmp/current.txt");
-+    assert_cmpstr (su.current_origin, CompareOperator.EQ, "file:///tmp1");
- 
-     var payload = ev.payload;
-     assert (payload != null);
--    assert_cmpuint (payload.len, OperatorType.EQUAL, 3);
--    assert_cmpint (payload.data[0], OperatorType.EQUAL, 1);
--    assert_cmpint (payload.data[1], OperatorType.EQUAL, 2);
--    assert_cmpint (payload.data[2], OperatorType.EQUAL, 3);
-+    assert_cmpuint (payload.len, CompareOperator.EQ, 3);
-+    assert_cmpint (payload.data[0], CompareOperator.EQ, 1);
-+    assert_cmpint (payload.data[1], CompareOperator.EQ, 2);
-+    assert_cmpint (payload.data[2], CompareOperator.EQ, 3);
- 
- }
- 
-@@ -252,11 +252,11 @@ void empty_to_from_variant_test ()
- 
-     assert (marshalled.id == 0);
-     assert (marshalled.timestamp == orig.timestamp);
--    assert_cmpstr (marshalled.interpretation, OperatorType.EQUAL, null);
--    assert_cmpstr (marshalled.manifestation, OperatorType.EQUAL, null);
--    assert_cmpstr (marshalled.actor, OperatorType.EQUAL, null);
--    assert_cmpstr (marshalled.origin, OperatorType.EQUAL, null);
--    assert_cmpint (marshalled.num_subjects (), OperatorType.EQUAL, 0);
-+    assert_cmpstr (marshalled.interpretation, CompareOperator.EQ, null);
-+    assert_cmpstr (marshalled.manifestation, CompareOperator.EQ, null);
-+    assert_cmpstr (marshalled.actor, CompareOperator.EQ, null);
-+    assert_cmpstr (marshalled.origin, CompareOperator.EQ, null);
-+    assert_cmpint (marshalled.num_subjects (), CompareOperator.EQ, 0);
-     assert (marshalled.payload == null);
- }
- 
-@@ -278,11 +278,11 @@ void with_one_subject_to_from_variant_test ()
-     var marshalled = new Event.from_variant (orig.to_variant ());
- 
-     assert (marshalled.id == 0);
--    assert_cmpstr (marshalled.interpretation, OperatorType.EQUAL, ZG.ACCESS_EVENT);
--    assert_cmpstr (marshalled.manifestation, OperatorType.EQUAL, ZG.USER_ACTIVITY);
--    assert_cmpstr (marshalled.actor, OperatorType.EQUAL, "application://firefox.desktop");
--    assert_cmpstr (marshalled.origin, OperatorType.EQUAL, "origin");
--    assert_cmpint (marshalled.num_subjects (), OperatorType.EQUAL, 1);
-+    assert_cmpstr (marshalled.interpretation, CompareOperator.EQ, ZG.ACCESS_EVENT);
-+    assert_cmpstr (marshalled.manifestation, CompareOperator.EQ, ZG.USER_ACTIVITY);
-+    assert_cmpstr (marshalled.actor, CompareOperator.EQ, "application://firefox.desktop");
-+    assert_cmpstr (marshalled.origin, CompareOperator.EQ, "origin");
-+    assert_cmpint (marshalled.num_subjects (), CompareOperator.EQ, 1);
- 
-     payload = marshalled.payload;
-     assert (payload != null);
-@@ -290,14 +290,14 @@ void with_one_subject_to_from_variant_test ()
-     assert (payload.data[0] == 255);
- 
-     var su = marshalled.subjects[0];
--    assert_cmpstr (su.uri, OperatorType.EQUAL, "http://example.com");
--    assert_cmpstr (su.interpretation, OperatorType.EQUAL, NFO.WEBSITE);
--    assert_cmpstr (su.manifestation, OperatorType.EQUAL, NFO.REMOTE_DATA_OBJECT);
--    assert_cmpstr (su.mimetype, OperatorType.EQUAL, "text/html");
--    assert_cmpstr (su.origin, OperatorType.EQUAL, "http://example.com");
--    assert_cmpstr (su.text, OperatorType.EQUAL, "example.com");
--    assert_cmpstr (su.storage, OperatorType.EQUAL, "net");
--    assert_cmpstr (su.current_uri, OperatorType.EQUAL, "http://current-example.com");
-+    assert_cmpstr (su.uri, CompareOperator.EQ, "http://example.com");
-+    assert_cmpstr (su.interpretation, CompareOperator.EQ, NFO.WEBSITE);
-+    assert_cmpstr (su.manifestation, CompareOperator.EQ, NFO.REMOTE_DATA_OBJECT);
-+    assert_cmpstr (su.mimetype, CompareOperator.EQ, "text/html");
-+    assert_cmpstr (su.origin, CompareOperator.EQ, "http://example.com");
-+    assert_cmpstr (su.text, CompareOperator.EQ, "example.com");
-+    assert_cmpstr (su.storage, CompareOperator.EQ, "net");
-+    assert_cmpstr (su.current_uri, CompareOperator.EQ, "http://current-example.com");
- }
- 
- void three_events_to_from_variant_test ()
-@@ -324,7 +324,7 @@ void zero_events_to_from_variant_test ()
-     var vevents = Events.to_variant (events);
-     assert (vevents.n_children () == 0);
-     events = Events.from_variant (vevents);
--    assert_cmpint (events.length, OperatorType.EQUAL, 0);
-+    assert_cmpint (events.length, CompareOperator.EQ, 0);
- }
- 
- // vim:expandtab:ts=4:sw=4
-diff --git a/test/direct/marshalling-test.vala b/test/direct/marshalling-test.vala
-index befe39b..a611fe1 100644
---- a/test/direct/marshalling-test.vala
-+++ b/test/direct/marshalling-test.vala
-@@ -98,7 +98,7 @@ void events_test ()
-     Variant vevents = Events.to_variant (events);
- 
-     var demarshalled = Events.from_variant (vevents);
--    assert_cmpint (demarshalled.length, OperatorType.EQUAL, 1000);
-+    assert_cmpint (demarshalled.length, CompareOperator.EQ, 1000);
- }
- 
- void timerange_test ()
-@@ -107,8 +107,8 @@ void timerange_test ()
-     {
-         Variant v = new Variant("(xx)", i, i+42);
-         TimeRange timerange = new TimeRange.from_variant (v);
--        assert_cmpint ((int) timerange.start, OperatorType.EQUAL, (int)i);
--        assert_cmpint ((int) timerange.end, OperatorType.EQUAL, (int)i+42);
-+        assert_cmpint ((int) timerange.start, CompareOperator.EQ, (int)i);
-+        assert_cmpint ((int) timerange.end, CompareOperator.EQ, (int)i+42);
-     }
- }
- 
-diff --git a/test/direct/mimetype-test.vala b/test/direct/mimetype-test.vala
-index f0b1bf0..327e4f7 100644
---- a/test/direct/mimetype-test.vala
-+++ b/test/direct/mimetype-test.vala
-@@ -42,18 +42,18 @@ int main (string[] args)
- 
- public void mime_type_basic_test ()
- {
--    assert_cmpstr (NFO.TEXT_DOCUMENT, OperatorType.EQUAL,
-+    assert_cmpstr (NFO.TEXT_DOCUMENT, CompareOperator.EQ,
-         interpretation_for_mimetype ("text/plain"));
- }
- 
- public void mime_type_regex_test ()
- {
-     // We should have a fallack for application/x-applix-*
--    assert_cmpstr (NFO.DOCUMENT, OperatorType.EQUAL,
-+    assert_cmpstr (NFO.DOCUMENT, CompareOperator.EQ,
-         interpretation_for_mimetype ("application/x-applix-FOOBAR"));
- 
-     // Still application/x-applix-speadsheet should be a spreadsheet
--    assert_cmpstr (NFO.SPREADSHEET, OperatorType.EQUAL,
-+    assert_cmpstr (NFO.SPREADSHEET, CompareOperator.EQ,
-         interpretation_for_mimetype ("application/x-applix-spreadsheet"));
- }
- 
-@@ -81,17 +81,17 @@ public void mime_type_registration_test ()
-     mime_type_regex_test ();
-     mime_type_none_test ();
- 
--    assert_cmpstr ("Bluebird", OperatorType.EQUAL,
-+    assert_cmpstr ("Bluebird", CompareOperator.EQ,
-         interpretation_for_mimetype ("awesome/bird"));
--    assert_cmpstr ("is nothing", OperatorType.EQUAL,
-+    assert_cmpstr ("is nothing", CompareOperator.EQ,
-         interpretation_for_mimetype ("everything/everywhere"));
- }
- 
- public void uri_scheme_basic_test ()
- {
--    assert_cmpstr (NFO.FILE_DATA_OBJECT, OperatorType.EQUAL,
-+    assert_cmpstr (NFO.FILE_DATA_OBJECT, CompareOperator.EQ,
-         manifestation_for_uri ("file:///tmp/foo.txt"));
--    assert_cmpstr (NFO.REMOTE_DATA_OBJECT, OperatorType.EQUAL,
-+    assert_cmpstr (NFO.REMOTE_DATA_OBJECT, CompareOperator.EQ,
-         manifestation_for_uri ("ftp://ftp.example.com"));
- }
- 
-@@ -107,7 +107,7 @@ public void uri_scheme_registration_test ()
-     uri_scheme_basic_test ();
-     uri_scheme_none_test ();
- 
--    assert_cmpstr ("the answer", OperatorType.EQUAL,
-+    assert_cmpstr ("the answer", CompareOperator.EQ,
-         manifestation_for_uri ("42://what is it?"));
- }
- 
-diff --git a/test/direct/symbol-test.vala b/test/direct/symbol-test.vala
-index e47024d..0261fe8 100644
---- a/test/direct/symbol-test.vala
-+++ b/test/direct/symbol-test.vala
-@@ -100,7 +100,7 @@ void is_uri_valid (string uri)
- void media_children_test ()
- {
-     var children = Symbol.get_children (NFO.MEDIA);
--    assert_cmpuint (children.length (), OperatorType.GREATER_THAN, 0);
-+    assert_cmpuint (children.length (), CompareOperator.GT, 0);
-     foreach (string uri in children)
-         is_uri_valid (uri);
- }
-@@ -108,7 +108,7 @@ void media_children_test ()
- void media_all_children_test ()
- {
-     var children = Symbol.get_all_children (NFO.MEDIA);
--    assert_cmpuint (children.length (), OperatorType.GREATER_THAN, 0);
-+    assert_cmpuint (children.length (), CompareOperator.GT, 0);
-     foreach (string uri in children)
-         is_uri_valid (uri);
- }
-@@ -116,7 +116,7 @@ void media_all_children_test ()
- void vector_image_parents_test ()
- {
-     var parents = Symbol.get_all_parents (NFO.VECTOR_IMAGE);
--    assert_cmpuint (parents.length (), OperatorType.GREATER_THAN, 0);
-+    assert_cmpuint (parents.length (), CompareOperator.GT, 0);
-     foreach (string uri in parents)
-         is_uri_valid (uri);
- }
-@@ -126,8 +126,8 @@ void media_complex_test ()
-     var children = Symbol.get_children (NFO.MEDIA);
-     var all_ch = Symbol.get_all_children (NFO.MEDIA);
- 
--    assert_cmpuint (children.length (), OperatorType.GREATER_THAN, 0);
--    assert_cmpuint (all_ch.length (), OperatorType.GREATER_THAN, children.length ());
-+    assert_cmpuint (children.length (), CompareOperator.GT, 0);
-+    assert_cmpuint (all_ch.length (), CompareOperator.GT, children.length ());
- 
-     foreach (string uri in children)
-     {
-diff --git a/test/direct/table-lookup-test.vala b/test/direct/table-lookup-test.vala
-index 0ce51ef..a5e25e1 100644
---- a/test/direct/table-lookup-test.vala
-+++ b/test/direct/table-lookup-test.vala
-@@ -58,15 +58,15 @@ public void basic_test ()
-     TableLookup table_lookup = new TableLookup (database, "actor");
- 
-     int id = table_lookup.id_for_string ("1st-actor");
--    assert_cmpint (table_lookup.id_for_string ("2nd-actor"), OperatorType.EQUAL, id+1);
--    assert_cmpint (table_lookup.id_for_string ("1st-actor"), OperatorType.EQUAL, id);
-+    assert_cmpint (table_lookup.id_for_string ("2nd-actor"), CompareOperator.EQ, id+1);
-+    assert_cmpint (table_lookup.id_for_string ("1st-actor"), CompareOperator.EQ, id);
- 
-     int rc = db.exec ("DELETE FROM actor WHERE value='1st-actor'");
-     assert (rc == Sqlite.OK);
- 
-     table_lookup.remove (1);
--    assert_cmpint (table_lookup.id_for_string ("2nd-actor"), OperatorType.EQUAL, id+1);
--    assert_cmpint (table_lookup.id_for_string ("1st-actor"), OperatorType.EQUAL, id+2);
-+    assert_cmpint (table_lookup.id_for_string ("2nd-actor"), CompareOperator.EQ, id+1);
-+    assert_cmpint (table_lookup.id_for_string ("1st-actor"), CompareOperator.EQ, id+2);
- }
- 
- public void get_value_with_query_test ()
-@@ -78,7 +78,7 @@ public void get_value_with_query_test ()
-     int rc = db.exec ("INSERT INTO actor (id, value) VALUES (100, 'new-actor')");
-     assert (rc == Sqlite.OK);
- 
--    assert_cmpstr (table_lookup.get_value (100), OperatorType.EQUAL, "new-actor");
-+    assert_cmpstr (table_lookup.get_value (100), CompareOperator.EQ, "new-actor");
- }
- 
- public void engine_test ()
-@@ -88,14 +88,14 @@ public void engine_test ()
-     unowned Sqlite.Database db = database.database;
-     TableLookup table_lookup = engine.get_actors_table_lookup();
- 
--    assert_cmpint (table_lookup.id_for_string ("something"), OperatorType.EQUAL, 1);
-+    assert_cmpint (table_lookup.id_for_string ("something"), CompareOperator.EQ, 1);
- 
-     // Since we're running with Engine, this should trigger the deletion
-     // callback, which in turn should fix the cache (LP: #598666).
-     int rc = db.exec ("DELETE FROM actor WHERE value='something'");
-     assert (rc == Sqlite.OK);
- 
--    assert_cmpint (table_lookup.id_for_string ("something"), OperatorType.EQUAL, 2);
-+    assert_cmpint (table_lookup.id_for_string ("something"), CompareOperator.EQ, 2);
- }
- 
- // vim:expandtab:ts=4:sw=4
-diff --git a/test/direct/where-clause-test.vala b/test/direct/where-clause-test.vala
-index e746daf..831a8c1 100644
---- a/test/direct/where-clause-test.vala
-+++ b/test/direct/where-clause-test.vala
-@@ -59,16 +59,16 @@ public void basic_test ()
-     where = new WhereClause (WhereClause.Type.AND);
-     where.add ("1st condition");
-     where.add ("2nd condition");
--    assert_cmpstr (where.get_sql_conditions (), OperatorType.EQUAL, "(1st condition AND 2nd condition)");
-+    assert_cmpstr (where.get_sql_conditions (), CompareOperator.EQ, "(1st condition AND 2nd condition)");
- 
-     where = new WhereClause (WhereClause.Type.OR);
-     where.add ("1st condition");
-     where.add ("2nd condition");
--    assert_cmpstr (where.get_sql_conditions (), OperatorType.EQUAL, "(1st condition OR 2nd condition)");
-+    assert_cmpstr (where.get_sql_conditions (), CompareOperator.EQ, "(1st condition OR 2nd condition)");
- 
-     where = new WhereClause (WhereClause.Type.AND, true);
-     where.add ("some condition");
--    assert_cmpstr (where.get_sql_conditions (), OperatorType.EQUAL, "NOT some condition");
-+    assert_cmpstr (where.get_sql_conditions (), CompareOperator.EQ, "NOT some condition");
- }
- 
- public void nested_test ()
-@@ -88,16 +88,16 @@ public void nested_test ()
-     where.extend (subwhere);
-     where.add ("last condition");
- 
--    assert_cmpstr (where.get_sql_conditions (), OperatorType.EQUAL,
-+    assert_cmpstr (where.get_sql_conditions (), CompareOperator.EQ,
-         "(1st condition AND (2nd condition OR 3rd condition) AND " +
-         "last condition)");
- 
-     {
-         var args = where.get_bind_arguments ();
--        assert_cmpint (args.length, OperatorType.EQUAL, 3);
--        assert_cmpstr (args[0], OperatorType.EQUAL, "arg1");
--        assert_cmpstr (args[1], OperatorType.EQUAL, "arg2");
--        assert_cmpstr (args[2], OperatorType.EQUAL, "arg3");
-+        assert_cmpint (args.length, CompareOperator.EQ, 3);
-+        assert_cmpstr (args[0], CompareOperator.EQ, "arg1");
-+        assert_cmpstr (args[1], CompareOperator.EQ, "arg2");
-+        assert_cmpstr (args[2], CompareOperator.EQ, "arg3");
-     }
- }
- 
-@@ -112,7 +112,7 @@ public void nested_negation_test ()
-     where.extend (subwhere);
-     where.add ("cond3");
- 
--    assert_cmpstr (where.get_sql_conditions (), OperatorType.EQUAL,
-+    assert_cmpstr (where.get_sql_conditions (), CompareOperator.EQ,
-         "(cond1 OR NOT cond2 OR cond3)");
- }
- 
-@@ -123,14 +123,14 @@ public void match_condition_test ()
-     // Plain
-     where = new WhereClause (WhereClause.Type.AND);
-     where.add_match_condition ("field1", 5);
--    assert_cmpstr (where.get_sql_conditions (), OperatorType.EQUAL,
-+    assert_cmpstr (where.get_sql_conditions (), CompareOperator.EQ,
-         "field1 = 5");
--    assert_cmpint (where.get_bind_arguments ().length, OperatorType.EQUAL, 0);
-+    assert_cmpint (where.get_bind_arguments ().length, CompareOperator.EQ, 0);
- 
-     // Negation
-     where = new WhereClause (WhereClause.Type.AND);
-     where.add_match_condition ("f2", 3, true);
--    assert_cmpstr (where.get_sql_conditions (), OperatorType.EQUAL, "f2 != 3");
-+    assert_cmpstr (where.get_sql_conditions (), CompareOperator.EQ, "f2 != 3");
- 
-     // FIXME: test LIKE stuff...
- }
-@@ -138,9 +138,9 @@ public void match_condition_test ()
- public void right_boundary_test ()
- {
-     var clause = new PublicWhereClause (WhereClause.Type.AND);
--    assert_cmpstr (clause.get_right_boundary ("a"), OperatorType.EQUAL, "b");
--    assert_cmpstr (clause.get_right_boundary ("hello"), OperatorType.EQUAL, "hellp");
--    assert_cmpstr (clause.get_right_boundary ("a b"), OperatorType.EQUAL, "a c");
-+    assert_cmpstr (clause.get_right_boundary ("a"), CompareOperator.EQ, "b");
-+    assert_cmpstr (clause.get_right_boundary ("hello"), CompareOperator.EQ, "hellp");
-+    assert_cmpstr (clause.get_right_boundary ("a b"), CompareOperator.EQ, "a c");
- }
- 
- // vim:expandtab:ts=4:sw=4
--- 
-cgit v1.1
-
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/zeitgeist.git/commitdiff/e3da81023d464abfc96fb93c34faa58b950990ac



More information about the pld-cvs-commit mailing list