gnome-packagekit r274 - in trunk: . libselftest src
- From: rhughes svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-packagekit r274 - in trunk: . libselftest src
- Date: Thu, 4 Sep 2008 09:29:04 +0000 (UTC)
Author: rhughes
Date: Thu Sep 4 09:29:04 2008
New Revision: 274
URL: http://svn.gnome.org/viewvc/gnome-packagekit?rev=274&view=rev
Log:
rm libselftest
Removed:
trunk/libselftest/
Modified:
trunk/Makefile.am
trunk/configure.ac
trunk/src/Makefile.am
trunk/src/gpk-application-state.c
trunk/src/gpk-client-chooser.c
trunk/src/gpk-client-depends.c
trunk/src/gpk-client-eula.c
trunk/src/gpk-client-requires.c
trunk/src/gpk-client-resolve.c
trunk/src/gpk-client-run.c
trunk/src/gpk-client-signature.c
trunk/src/gpk-client-untrusted.c
trunk/src/gpk-common.c
trunk/src/gpk-common.h
trunk/src/gpk-dbus.c
trunk/src/gpk-self-test.c
trunk/src/gpk-watch.c
Modified: trunk/Makefile.am
==============================================================================
--- trunk/Makefile.am (original)
+++ trunk/Makefile.am Thu Sep 4 09:29:04 2008
@@ -1,5 +1,4 @@
SUBDIRS = \
- libselftest \
libunique \
docs \
man \
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Thu Sep 4 09:29:04 2008
@@ -209,7 +209,6 @@
dnl ---------------------------------------------------------------------------
AC_OUTPUT([
Makefile
-libselftest/Makefile
libunique/Makefile
src/Makefile
help/Makefile
Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am (original)
+++ trunk/src/Makefile.am Thu Sep 4 09:29:04 2008
@@ -23,11 +23,6 @@
-DPK_DATA=\"$(pkgdatadir)\" \
-DEGG_LOG_FILE=\"\" \
-I$(top_srcdir)/libunique \
- -I$(top_srcdir)/libselftest \
- $(NULL)
-
-SELFTEST_LIBS = \
- $(top_builddir)/libselftest/libselftest.la \
$(NULL)
LIBUNIQUE_LIBS = \
@@ -266,6 +261,8 @@
gpk_self_test_SOURCES = \
gpk-self-test.c \
+ egg-test.h \
+ egg-test.c \
$(shared_SOURCES) \
$(NULL)
@@ -274,7 +271,7 @@
$(SELFTEST_LIBS) \
$(NULL)
-gpk_self_test_CPPFLAGS = -DPK_BUILD_TESTS
+gpk_self_test_CFLAGS = -DEGG_TEST $(AM_CFLAGS)
TESTS = gpk-self-test
Modified: trunk/src/gpk-application-state.c
==============================================================================
--- trunk/src/gpk-application-state.c (original)
+++ trunk/src/gpk-application-state.c Thu Sep 4 09:29:04 2008
@@ -167,19 +167,19 @@
/***************************************************************************
*** MAKE CHECK TESTS ***
***************************************************************************/
-#ifdef PK_BUILD_TESTS
-#include <libselftest.h>
+#ifdef EGG_TEST
+#include "egg-test.h"
void
-gpk_common_self_test (gpointer data)
+gpk_common_test (gpointer data)
{
- LibSelfTest *test = (LibSelfTest *) data;
+ EggTest *test = (EggTest *) data;
- if (libst_start (test, "GpkCommon", CLASS_AUTO) == FALSE) {
+ if (egg_test_start (test, "GpkCommon") == FALSE) {
return;
}
- libst_end (test);
+ egg_test_end (test);
}
#endif
Modified: trunk/src/gpk-client-chooser.c
==============================================================================
--- trunk/src/gpk-client-chooser.c (original)
+++ trunk/src/gpk-client-chooser.c Thu Sep 4 09:29:04 2008
@@ -288,18 +288,18 @@
/***************************************************************************
*** MAKE CHECK TESTS ***
***************************************************************************/
-#ifdef PK_BUILD_TESTS
-#include <libselftest.h>
+#ifdef EGG_TEST
+#include "egg-test.h"
void
gpk_client_chooser_self_test (gpointer data)
{
- LibSelfTest *test = (LibSelfTest *) data;
+ EggTest *test = (EggTest *) data;
- if (libst_start (test, "GpkClientEula", CLASS_AUTO) == FALSE) {
+ if (egg_test_start (test, "GpkClientEula") == FALSE) {
return;
}
- libst_end (test);
+ egg_test_end (test);
}
#endif
Modified: trunk/src/gpk-client-depends.c
==============================================================================
--- trunk/src/gpk-client-depends.c (original)
+++ trunk/src/gpk-client-depends.c Thu Sep 4 09:29:04 2008
@@ -167,18 +167,18 @@
/***************************************************************************
*** MAKE CHECK TESTS ***
***************************************************************************/
-#ifdef PK_BUILD_TESTS
-#include <libselftest.h>
+#ifdef EGG_TEST
+#include "egg-test.h"
void
gpk_client_depends_self_test (gpointer data)
{
- LibSelfTest *test = (LibSelfTest *) data;
+ EggTest *test = (EggTest *) data;
- if (libst_start (test, "GpkClientDepends", CLASS_AUTO) == FALSE) {
+ if (egg_test_start (test, "GpkClientDepends") == FALSE) {
return;
}
- libst_end (test);
+ egg_test_end (test);
}
#endif
Modified: trunk/src/gpk-client-eula.c
==============================================================================
--- trunk/src/gpk-client-eula.c (original)
+++ trunk/src/gpk-client-eula.c Thu Sep 4 09:29:04 2008
@@ -135,18 +135,18 @@
/***************************************************************************
*** MAKE CHECK TESTS ***
***************************************************************************/
-#ifdef PK_BUILD_TESTS
-#include <libselftest.h>
+#ifdef EGG_TEST
+#include "egg-test.h"
void
gpk_client_eula_self_test (gpointer data)
{
- LibSelfTest *test = (LibSelfTest *) data;
+ EggTest *test = (EggTest *) data;
- if (libst_start (test, "GpkClientEula", CLASS_AUTO) == FALSE) {
+ if (egg_test_start (test, "GpkClientEula") == FALSE) {
return;
}
- libst_end (test);
+ egg_test_end (test);
}
#endif
Modified: trunk/src/gpk-client-requires.c
==============================================================================
--- trunk/src/gpk-client-requires.c (original)
+++ trunk/src/gpk-client-requires.c Thu Sep 4 09:29:04 2008
@@ -160,18 +160,18 @@
/***************************************************************************
*** MAKE CHECK TESTS ***
***************************************************************************/
-#ifdef PK_BUILD_TESTS
-#include <libselftest.h>
+#ifdef EGG_TEST
+#include "egg-test.h"
void
gpk_client_requires_self_test (gpointer data)
{
- LibSelfTest *test = (LibSelfTest *) data;
+ EggTest *test = (EggTest *) data;
- if (libst_start (test, "GpkClientRequires", CLASS_AUTO) == FALSE) {
+ if (egg_test_start (test, "GpkClientRequires") == FALSE) {
return;
}
- libst_end (test);
+ egg_test_end (test);
}
#endif
Modified: trunk/src/gpk-client-resolve.c
==============================================================================
--- trunk/src/gpk-client-resolve.c (original)
+++ trunk/src/gpk-client-resolve.c Thu Sep 4 09:29:04 2008
@@ -131,18 +131,18 @@
/***************************************************************************
*** MAKE CHECK TESTS ***
***************************************************************************/
-#ifdef PK_BUILD_TESTS
-#include <libselftest.h>
+#ifdef EGG_TEST
+#include "egg-test.h"
void
gpk_client_resolve_self_test (gpointer data)
{
- LibSelfTest *test = (LibSelfTest *) data;
+ EggTest *test = (EggTest *) data;
- if (libst_start (test, "GpkClientResolve", CLASS_AUTO) == FALSE) {
+ if (egg_test_start (test, "GpkClientResolve") == FALSE) {
return;
}
- libst_end (test);
+ egg_test_end (test);
}
#endif
Modified: trunk/src/gpk-client-run.c
==============================================================================
--- trunk/src/gpk-client-run.c (original)
+++ trunk/src/gpk-client-run.c Thu Sep 4 09:29:04 2008
@@ -355,18 +355,18 @@
/***************************************************************************
*** MAKE CHECK TESTS ***
***************************************************************************/
-#ifdef PK_BUILD_TESTS
-#include <libselftest.h>
+#ifdef EGG_TEST
+#include "egg-test.h"
void
gpk_client_run_self_test (gpointer data)
{
- LibSelfTest *test = (LibSelfTest *) data;
+ EggTest *test = (EggTest *) data;
- if (libst_start (test, "GpkClientRun", CLASS_AUTO) == FALSE) {
+ if (egg_test_start (test, "GpkClientRun") == FALSE) {
return;
}
- libst_end (test);
+ egg_test_end (test);
}
#endif
Modified: trunk/src/gpk-client-signature.c
==============================================================================
--- trunk/src/gpk-client-signature.c (original)
+++ trunk/src/gpk-client-signature.c Thu Sep 4 09:29:04 2008
@@ -117,18 +117,18 @@
/***************************************************************************
*** MAKE CHECK TESTS ***
***************************************************************************/
-#ifdef PK_BUILD_TESTS
-#include <libselftest.h>
+#ifdef EGG_TEST
+#include "egg-test.h"
void
gpk_client_signature_self_test (gpointer data)
{
- LibSelfTest *test = (LibSelfTest *) data;
+ EggTest *test = (EggTest *) data;
- if (libst_start (test, "GpkClientEula", CLASS_AUTO) == FALSE) {
+ if (egg_test_start (test, "GpkClientEula") == FALSE) {
return;
}
- libst_end (test);
+ egg_test_end (test);
}
#endif
Modified: trunk/src/gpk-client-untrusted.c
==============================================================================
--- trunk/src/gpk-client-untrusted.c (original)
+++ trunk/src/gpk-client-untrusted.c Thu Sep 4 09:29:04 2008
@@ -134,18 +134,18 @@
/***************************************************************************
*** MAKE CHECK TESTS ***
***************************************************************************/
-#ifdef PK_BUILD_TESTS
-#include <libselftest.h>
+#ifdef EGG_TEST
+#include "egg-test.h"
void
gpk_client_untrusted_self_test (gpointer data)
{
- LibSelfTest *test = (LibSelfTest *) data;
+ EggTest *test = (EggTest *) data;
- if (libst_start (test, "GpkClientUntrusted", CLASS_AUTO) == FALSE) {
+ if (egg_test_start (test, "GpkClientUntrusted") == FALSE) {
return;
}
- libst_end (test);
+ egg_test_end (test);
}
#endif
Modified: trunk/src/gpk-common.c
==============================================================================
--- trunk/src/gpk-common.c (original)
+++ trunk/src/gpk-common.c Thu Sep 4 09:29:04 2008
@@ -90,6 +90,7 @@
{PK_STATUS_ENUM_DOWNLOAD_GROUP, "pk-refresh-cache"},
{PK_STATUS_ENUM_DOWNLOAD_UPDATEINFO, "pk-refresh-cache"},
{PK_STATUS_ENUM_REPACKAGING, "pk-package-cleanup"},
+ {PK_STATUS_ENUM_LOADING_CACHE, "pk-refresh-cache"},
{0, NULL}
};
@@ -845,6 +846,9 @@
case PK_STATUS_ENUM_REPACKAGING:
text = _("Repackaging files");
break;
+ case PK_STATUS_ENUM_LOADING_CACHE:
+ text = _("Loading cache");
+ break;
default:
egg_warning ("status unrecognised: %s", pk_status_enum_to_text (status));
}
@@ -1445,6 +1449,7 @@
status == PK_STATUS_ENUM_DOWNLOAD_CHANGELOG ||
status == PK_STATUS_ENUM_DOWNLOAD_GROUP ||
status == PK_STATUS_ENUM_DOWNLOAD_UPDATEINFO ||
+ status == PK_STATUS_ENUM_LOADING_CACHE ||
status == PK_STATUS_ENUM_REPACKAGING) {
name = "pk-action-refresh-cache";
delay = 150;
@@ -1618,385 +1623,384 @@
/***************************************************************************
*** MAKE CHECK TESTS ***
***************************************************************************/
-#ifdef PK_BUILD_TESTS
-#include <libselftest.h>
+#ifdef EGG_TEST
+#include "egg-test.h"
void
-gpk_common_self_test (gpointer data)
+gpk_common_test (gpointer data)
{
gchar *text;
guint i;
const gchar *string;
PkPackageId *id;
- LibSelfTest *test = (LibSelfTest *) data;
+ EggTest *test = (EggTest *) data;
- if (libst_start (test, "GpkCommon", CLASS_AUTO) == FALSE) {
+ if (!egg_test_start (test, "GpkCommon")
return;
- }
/************************************************************
**************** time text **************
************************************************************/
- libst_title (test, "time zero");
+ egg_test_title (test, "time zero");
text = gpk_time_to_localised_string (0);
if (text != NULL && strcmp (text, _("Now")) == 0) {
- libst_success (test, NULL);
+ egg_test_success (test, NULL);
} else {
- libst_failed (test, "failed, got %s", text);
+ egg_test_failed (test, "failed, got %s", text);
}
g_free (text);
/************************************************************/
- libst_title (test, "time 1s");
+ egg_test_title (test, "time 1s");
text = gpk_time_to_localised_string (1);
if (text != NULL && strcmp (text, _("1 second")) == 0) {
- libst_success (test, NULL);
+ egg_test_success (test, NULL);
} else {
- libst_failed (test, "failed, got %s", text);
+ egg_test_failed (test, "failed, got %s", text);
}
g_free (text);
/************************************************************/
- libst_title (test, "time 1m");
+ egg_test_title (test, "time 1m");
text = gpk_time_to_localised_string (1*60);
if (text != NULL && strcmp (text, _("1 minute")) == 0) {
- libst_success (test, NULL);
+ egg_test_success (test, NULL);
} else {
- libst_failed (test, "failed, got %s", text);
+ egg_test_failed (test, "failed, got %s", text);
}
g_free (text);
/************************************************************/
- libst_title (test, "time 1h");
+ egg_test_title (test, "time 1h");
text = gpk_time_to_localised_string (1*60*60);
if (text != NULL && strcmp (text, _("1 hour")) == 0) {
- libst_success (test, NULL);
+ egg_test_success (test, NULL);
} else {
- libst_failed (test, "failed, got %s", text);
+ egg_test_failed (test, "failed, got %s", text);
}
g_free (text);
/************************************************************/
- libst_title (test, "time 30s");
+ egg_test_title (test, "time 30s");
text = gpk_time_to_localised_string (30);
if (text != NULL && strcmp (text, _("30 seconds")) == 0) {
- libst_success (test, NULL);
+ egg_test_success (test, NULL);
} else {
- libst_failed (test, "failed, got %s", text);
+ egg_test_failed (test, "failed, got %s", text);
}
g_free (text);
/************************************************************/
- libst_title (test, "time 30m");
+ egg_test_title (test, "time 30m");
text = gpk_time_to_localised_string (30*60);
if (text != NULL && strcmp (text, _("30 minutes")) == 0) {
- libst_success (test, NULL);
+ egg_test_success (test, NULL);
} else {
- libst_failed (test, "failed, got %s", text);
+ egg_test_failed (test, "failed, got %s", text);
}
g_free (text);
/************************************************************/
- libst_title (test, "time 30m1s");
+ egg_test_title (test, "time 30m1s");
text = gpk_time_to_localised_string (30*60+1);
if (text != NULL && strcmp (text, _("30 minutes 1 second")) == 0) {
- libst_success (test, NULL);
+ egg_test_success (test, NULL);
} else {
- libst_failed (test, "failed, got %s", text);
+ egg_test_failed (test, "failed, got %s", text);
}
g_free (text);
/************************************************************/
- libst_title (test, "time 30m10s");
+ egg_test_title (test, "time 30m10s");
text = gpk_time_to_localised_string (30*60+10);
if (text != NULL && strcmp (text, _("30 minutes 10 seconds")) == 0) {
- libst_success (test, NULL);
+ egg_test_success (test, NULL);
} else {
- libst_failed (test, "failed, got %s", text);
+ egg_test_failed (test, "failed, got %s", text);
}
g_free (text);
/************************************************************
**************** size text **************
************************************************************/
- libst_title (test, "size zero");
+ egg_test_title (test, "size zero");
text = gpk_size_to_si_size_text (0);
if (text != NULL && strcmp (text, _("0 bytes")) == 0) {
- libst_success (test, NULL);
+ egg_test_success (test, NULL);
} else {
- libst_failed (test, "failed, got %s", text);
+ egg_test_failed (test, "failed, got %s", text);
}
g_free (text);
/************************************************************/
- libst_title (test, "size 512 bytes");
+ egg_test_title (test, "size 512 bytes");
text = gpk_size_to_si_size_text (512);
if (text != NULL && strcmp (text, _("512 bytes")) == 0) {
- libst_success (test, NULL);
+ egg_test_success (test, NULL);
} else {
- libst_failed (test, "failed, got %s", text);
+ egg_test_failed (test, "failed, got %s", text);
}
g_free (text);
/************************************************************/
- libst_title (test, "size 256.2 MB");
+ egg_test_title (test, "size 256.2 MB");
text = gpk_size_to_si_size_text (256*1025*1024);
if (text != NULL && strcmp (text, _("256.2 MB")) == 0) {
- libst_success (test, NULL);
+ egg_test_success (test, NULL);
} else {
- libst_failed (test, "failed, got %s", text);
+ egg_test_failed (test, "failed, got %s", text);
}
g_free (text);
/************************************************************
**************** package name text **************
************************************************************/
- libst_title (test, "get name null");
+ egg_test_title (test, "get name null");
text = gpk_package_get_name (NULL);
if (text == NULL) {
- libst_success (test, NULL);
+ egg_test_success (test, NULL);
} else {
- libst_failed (test, "failed, got %s", text);
+ egg_test_failed (test, "failed, got %s", text);
}
/************************************************************/
- libst_title (test, "get name not id");
+ egg_test_title (test, "get name not id");
text = gpk_package_get_name ("ania");
if (text != NULL && strcmp (text, "ania") == 0) {
- libst_success (test, NULL);
+ egg_test_success (test, NULL);
} else {
- libst_failed (test, "failed, got %s", text);
+ egg_test_failed (test, "failed, got %s", text);
}
g_free (text);
/************************************************************/
- libst_title (test, "get name just id");
+ egg_test_title (test, "get name just id");
text = gpk_package_get_name ("simon;1.0.0;i386;moo");
if (text != NULL && strcmp (text, "simon") == 0) {
- libst_success (test, NULL);
+ egg_test_success (test, NULL);
} else {
- libst_failed (test, "failed, got %s", text);
+ egg_test_failed (test, "failed, got %s", text);
}
g_free (text);
/************************************************************
**************** package name text **************
************************************************************/
- libst_title (test, "package id pretty valid package id, no summary");
+ egg_test_title (test, "package id pretty valid package id, no summary");
id = pk_package_id_new_from_string ("simon;0.0.1;i386;data");
text = gpk_package_id_format_twoline (id, NULL);
pk_package_id_free (id);
if (text != NULL && strcmp (text, "simon-0.0.1 (i386)") == 0) {
- libst_success (test, NULL);
+ egg_test_success (test, NULL);
} else {
- libst_failed (test, "failed, got %s", text);
+ egg_test_failed (test, "failed, got %s", text);
}
g_free (text);
/************************************************************/
- libst_title (test, "package id pretty valid package id, no summary 2");
+ egg_test_title (test, "package id pretty valid package id, no summary 2");
id = pk_package_id_new_from_string ("simon;0.0.1;;data");
text = gpk_package_id_format_twoline (id, NULL);
pk_package_id_free (id);
if (text != NULL && strcmp (text, "simon-0.0.1") == 0) {
- libst_success (test, NULL);
+ egg_test_success (test, NULL);
} else {
- libst_failed (test, "failed, got %s", text);
+ egg_test_failed (test, "failed, got %s", text);
}
g_free (text);
/************************************************************/
- libst_title (test, "package id pretty valid package id, no summary 3");
+ egg_test_title (test, "package id pretty valid package id, no summary 3");
id = pk_package_id_new_from_string ("simon;;;data");
text = gpk_package_id_format_twoline (id, NULL);
pk_package_id_free (id);
if (text != NULL && strcmp (text, "simon") == 0) {
- libst_success (test, NULL);
+ egg_test_success (test, NULL);
} else {
- libst_failed (test, "failed, got %s", text);
+ egg_test_failed (test, "failed, got %s", text);
}
g_free (text);
/************************************************************/
- libst_title (test, "package id pretty valid package id, no summary 4");
+ egg_test_title (test, "package id pretty valid package id, no summary 4");
id = pk_package_id_new_from_string ("simon;0.0.1;;data");
text = gpk_package_id_format_twoline (id, "dude");
pk_package_id_free (id);
if (text != NULL && strcmp (text, "<b>dude</b>\nsimon-0.0.1") == 0) {
- libst_success (test, NULL);
+ egg_test_success (test, NULL);
} else {
- libst_failed (test, "failed, got %s", text);
+ egg_test_failed (test, "failed, got %s", text);
}
g_free (text);
/************************************************************
**************** localised enums **************
************************************************************/
- libst_title (test, "check we convert all the localised past role enums");
+ egg_test_title (test, "check we convert all the localised past role enums");
for (i=0; i<PK_ROLE_ENUM_UNKNOWN; i++) {
string = gpk_role_enum_to_localised_past (i);
if (string == NULL) {
- libst_failed (test, "failed to get %i", i);
+ egg_test_failed (test, "failed to get %i", i);
break;
}
}
- libst_success (test, NULL);
+ egg_test_success (test, NULL);
/************************************************************/
- libst_title (test, "check we convert all the localised present role enums");
+ egg_test_title (test, "check we convert all the localised present role enums");
for (i=0; i<PK_ROLE_ENUM_UNKNOWN; i++) {
string = gpk_role_enum_to_localised_present (i);
if (string == NULL) {
- libst_failed (test, "failed to get %i", i);
+ egg_test_failed (test, "failed to get %i", i);
break;
}
}
- libst_success (test, NULL);
+ egg_test_success (test, NULL);
/************************************************************/
- libst_title (test, "check we convert all the role icon name enums");
+ egg_test_title (test, "check we convert all the role icon name enums");
for (i=0; i<PK_ROLE_ENUM_UNKNOWN; i++) {
string = gpk_role_enum_to_icon_name (i);
if (string == NULL) {
- libst_failed (test, "failed to get %i", i);
+ egg_test_failed (test, "failed to get %i", i);
break;
}
}
- libst_success (test, NULL);
+ egg_test_success (test, NULL);
/************************************************************/
- libst_title (test, "check we convert all the info icon names enums");
+ egg_test_title (test, "check we convert all the info icon names enums");
for (i=0; i<PK_INFO_ENUM_UNKNOWN; i++) {
string = gpk_info_enum_to_icon_name (i);
if (string == NULL) {
- libst_failed (test, "failed to get %i", i);
+ egg_test_failed (test, "failed to get %i", i);
break;
}
}
- libst_success (test, NULL);
+ egg_test_success (test, NULL);
/************************************************************/
- libst_title (test, "check we convert all the localised status enums");
+ egg_test_title (test, "check we convert all the localised status enums");
for (i=0; i<PK_STATUS_ENUM_UNKNOWN; i++) {
string = gpk_status_enum_to_localised_text (i);
if (string == NULL) {
- libst_failed (test, "failed to get %i", i);
+ egg_test_failed (test, "failed to get %i", i);
break;
}
}
- libst_success (test, NULL);
+ egg_test_success (test, NULL);
/************************************************************/
- libst_title (test, "check we convert all the status icon names enums");
+ egg_test_title (test, "check we convert all the status icon names enums");
for (i=0; i<PK_STATUS_ENUM_UNKNOWN; i++) {
string = gpk_status_enum_to_icon_name (i);
if (string == NULL) {
- libst_failed (test, "failed to get %i", i);
+ egg_test_failed (test, "failed to get %i", i);
break;
}
}
- libst_success (test, NULL);
+ egg_test_success (test, NULL);
/************************************************************/
- libst_title (test, "check we convert all the restart icon names enums");
+ egg_test_title (test, "check we convert all the restart icon names enums");
for (i=0; i<PK_RESTART_ENUM_UNKNOWN; i++) {
string = gpk_restart_enum_to_icon_name (i);
if (string == NULL) {
- libst_failed (test, "failed to get %i", i);
+ egg_test_failed (test, "failed to get %i", i);
break;
}
}
- libst_success (test, NULL);
+ egg_test_success (test, NULL);
/************************************************************/
- libst_title (test, "check we convert all the localised error enums");
+ egg_test_title (test, "check we convert all the localised error enums");
for (i=0; i<PK_ERROR_ENUM_UNKNOWN; i++) {
string = gpk_error_enum_to_localised_text (i);
if (string == NULL) {
- libst_failed (test, "failed to get %s", pk_error_enum_to_text(i));
+ egg_test_failed (test, "failed to get %s", pk_error_enum_to_text(i));
break;
}
}
- libst_success (test, NULL);
+ egg_test_success (test, NULL);
/************************************************************/
- libst_title (test, "check we convert all the localised error messages");
+ egg_test_title (test, "check we convert all the localised error messages");
for (i=0; i<PK_ERROR_ENUM_UNKNOWN; i++) {
string = gpk_error_enum_to_localised_message (i);
if (string == NULL) {
- libst_failed (test, "failed to get %s", pk_error_enum_to_text(i));
+ egg_test_failed (test, "failed to get %s", pk_error_enum_to_text(i));
break;
}
}
- libst_success (test, NULL);
+ egg_test_success (test, NULL);
/************************************************************/
- libst_title (test, "check we convert all the localised restart enums");
+ egg_test_title (test, "check we convert all the localised restart enums");
for (i=0; i<PK_RESTART_ENUM_UNKNOWN; i++) {
string = gpk_restart_enum_to_localised_text (i);
if (string == NULL) {
- libst_failed (test, "failed to get %i", i);
+ egg_test_failed (test, "failed to get %i", i);
break;
}
}
- libst_success (test, NULL);
+ egg_test_success (test, NULL);
/************************************************************/
- libst_title (test, "check we convert all the message icon name enums");
+ egg_test_title (test, "check we convert all the message icon name enums");
for (i=0; i<PK_MESSAGE_ENUM_UNKNOWN; i++) {
string = gpk_message_enum_to_icon_name (i);
if (string == NULL) {
- libst_failed (test, "failed to get %i", i);
+ egg_test_failed (test, "failed to get %i", i);
break;
}
}
- libst_success (test, NULL);
+ egg_test_success (test, NULL);
/************************************************************/
- libst_title (test, "check we convert all the localised message enums");
+ egg_test_title (test, "check we convert all the localised message enums");
for (i=0; i<PK_MESSAGE_ENUM_UNKNOWN; i++) {
string = gpk_message_enum_to_localised_text (i);
if (string == NULL) {
- libst_failed (test, "failed to get %i", i);
+ egg_test_failed (test, "failed to get %i", i);
break;
}
}
- libst_success (test, NULL);
+ egg_test_success (test, NULL);
/************************************************************/
- libst_title (test, "check we convert all the localised restart future enums");
+ egg_test_title (test, "check we convert all the localised restart future enums");
for (i=0; i<PK_RESTART_ENUM_UNKNOWN; i++) {
string = gpk_restart_enum_to_localised_text_future (i);
if (string == NULL) {
- libst_failed (test, "failed to get %i", i);
+ egg_test_failed (test, "failed to get %i", i);
break;
}
}
- libst_success (test, NULL);
+ egg_test_success (test, NULL);
/************************************************************/
- libst_title (test, "check we convert all the localised group enums");
+ egg_test_title (test, "check we convert all the localised group enums");
for (i=0; i<PK_GROUP_ENUM_UNKNOWN; i++) {
string = gpk_group_enum_to_localised_text (i);
if (string == NULL) {
- libst_failed (test, "failed to get %i", i);
+ egg_test_failed (test, "failed to get %i", i);
break;
}
}
- libst_success (test, NULL);
+ egg_test_success (test, NULL);
/************************************************************/
- libst_title (test, "check we convert all the group icon name enums");
+ egg_test_title (test, "check we convert all the group icon name enums");
for (i=0; i<PK_GROUP_ENUM_UNKNOWN; i++) {
string = gpk_group_enum_to_icon_name (i);
if (string == NULL) {
- libst_failed (test, "failed to get %i", i);
+ egg_test_failed (test, "failed to get %i", i);
break;
}
}
- libst_success (test, NULL);
+ egg_test_success (test, NULL);
- libst_end (test);
+ egg_test_end (test);
}
#endif
Modified: trunk/src/gpk-common.h
==============================================================================
--- trunk/src/gpk-common.h (original)
+++ trunk/src/gpk-common.h Thu Sep 4 09:29:04 2008
@@ -63,7 +63,7 @@
#define GPK_ICON_SOFTWARE_UPDATE_PREFS "x-system-software-update-preferences"
#define GPK_ICON_SOFTWARE_UPDATE_AVAILABLE "software-update-available"
-void gpk_common_self_test (gpointer data);
+void gpk_common_test (gpointer data);
gchar *gpk_package_get_name (const gchar *package_id);
gchar *gpk_package_id_format_twoline (const PkPackageId *id,
const gchar *summary);
Modified: trunk/src/gpk-dbus.c
==============================================================================
--- trunk/src/gpk-dbus.c (original)
+++ trunk/src/gpk-dbus.c Thu Sep 4 09:29:04 2008
@@ -316,33 +316,33 @@
/***************************************************************************
*** MAKE CHECK TESTS ***
***************************************************************************/
-#ifdef PK_BUILD_TESTS
-#include <libselftest.h>
+#ifdef EGG_TEST
+#include "egg-test.h"
void
-libst_dbus (LibSelfTest *test)
+egg_test_dbus (EggTest *test)
{
GpkDbus *dbus = NULL;
gboolean ret;
const gchar *temp;
GError *error = NULL;
- if (libst_start (test, "GpkDbus", CLASS_AUTO) == FALSE) {
+ if (egg_test_start (test, "GpkDbus") == FALSE) {
return;
}
/************************************************************/
- libst_title (test, "get GpkDbus object");
+ egg_test_title (test, "get GpkDbus object");
dbus = gpk_dbus_new ();
if (dbus != NULL) {
- libst_success (test, NULL);
+ egg_test_success (test, NULL);
} else {
- libst_failed (test, NULL);
+ egg_test_failed (test, NULL);
}
g_object_unref (dbus);
- libst_end (test);
+ egg_test_end (test);
}
#endif
Modified: trunk/src/gpk-self-test.c
==============================================================================
--- trunk/src/gpk-self-test.c (original)
+++ trunk/src/gpk-self-test.c Thu Sep 4 09:29:04 2008
@@ -21,25 +21,24 @@
#include <glib.h>
#include <glib-object.h>
-#include <libselftest.h>
+#include "egg-test.h"
#include "egg-debug.h"
#include "gpk-common.h"
int
main (int argc, char **argv)
{
- LibSelfTest test;
+ EggTest *test;
- if (! g_thread_supported ()) {
+ if (! g_thread_supported ())
g_thread_init (NULL);
- }
g_type_init ();
- libst_init (&test);
+ test = egg_test_init ();
egg_debug_init (TRUE);
/* tests go here */
- gpk_common_self_test (&test);
+ gpk_common_test (test);
- return (libst_finish (&test));
+ return egg_test_finish (test);
}
Modified: trunk/src/gpk-watch.c
==============================================================================
--- trunk/src/gpk-watch.c (original)
+++ trunk/src/gpk-watch.c Thu Sep 4 09:29:04 2008
@@ -212,6 +212,7 @@
/* get the most important icon */
value = pk_bitfield_contain_priority (status,
PK_STATUS_ENUM_REFRESH_CACHE,
+ PK_STATUS_ENUM_LOADING_CACHE,
PK_STATUS_ENUM_CANCEL,
PK_STATUS_ENUM_INSTALL,
PK_STATUS_ENUM_REMOVE,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]