[gedit] Fix unit tests to use GFile instead of uris.
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] Fix unit tests to use GFile instead of uris.
- Date: Tue, 27 Apr 2010 11:38:27 +0000 (UTC)
commit b2c444d72c192ef115b0555fe931e374667b33c6
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Thu Apr 1 13:40:55 2010 +0200
Fix unit tests to use GFile instead of uris.
tests/document-loader.c | 6 +-----
tests/document-saver.c | 4 +---
2 files changed, 2 insertions(+), 8 deletions(-)
---
diff --git a/tests/document-loader.c b/tests/document-loader.c
index e63e778..27fb9e2 100644
--- a/tests/document-loader.c
+++ b/tests/document-loader.c
@@ -122,11 +122,7 @@ test_loader (const gchar *filename,
G_CALLBACK (on_document_loaded),
data);
- uri = g_file_get_uri (file);
-
- gedit_document_load (document, uri, gedit_encoding_get_utf8 (), 0, FALSE);
-
- g_free (uri);
+ gedit_document_load (document, file, gedit_encoding_get_utf8 (), 0, FALSE);
while (!test_completed)
{
diff --git a/tests/document-saver.c b/tests/document-saver.c
index 9f44d5a..7dda724 100644
--- a/tests/document-saver.c
+++ b/tests/document-saver.c
@@ -214,12 +214,11 @@ test_saver (const gchar *filename_or_uri,
test_completed = FALSE;
file = g_file_new_for_commandline_arg (filename_or_uri);
- uri = g_file_get_uri (file);
existed = g_file_query_exists (file, NULL);
ensure_mounted (file);
- gedit_document_save_as (document, uri, gedit_encoding_get_utf8 (), save_flags);
+ gedit_document_save_as (document, file, gedit_encoding_get_utf8 (), save_flags);
while (!test_completed)
{
@@ -231,7 +230,6 @@ test_saver (const gchar *filename_or_uri,
g_file_delete (file, NULL, NULL);
}
- g_free (uri);
g_object_unref (file);
saver_test_data_free (data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]