[epiphany] tests: test the creation of a EphyEncoding object
- From: Xan Lopez <xan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] tests: test the creation of a EphyEncoding object
- Date: Tue, 31 Jul 2012 13:35:20 +0000 (UTC)
commit a9b77ec4948dd2db2b3aef808e29c97aaa782589
Author: Xan Lopez <xan igalia com>
Date: Tue Jul 31 15:26:50 2012 +0200
tests: test the creation of a EphyEncoding object
We should make the test-elided and collation-key properties be
computed automatically from the other parameters.
tests/ephy-encodings-test.c | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/tests/ephy-encodings-test.c b/tests/ephy-encodings-test.c
index d89c7b9..791b990 100644
--- a/tests/ephy-encodings-test.c
+++ b/tests/ephy-encodings-test.c
@@ -33,6 +33,24 @@
#define NUM_ENCODINGS 78
static void
+test_ephy_encodings_create ()
+{
+ EphyEncoding *encoding;
+
+ encoding = ephy_encoding_new ("UTF-8", "Unicode (UTF-8)",
+ "0xDEADBEEF", "0xDEADBEEF",
+ LG_UNICODE);
+ g_assert (encoding);
+ g_assert_cmpstr (ephy_encoding_get_encoding (encoding), ==, "UTF-8");
+ g_assert_cmpstr (ephy_encoding_get_title (encoding), ==, "Unicode (UTF-8)");
+ g_assert_cmpstr (ephy_encoding_get_title_elided (encoding), ==, "0xDEADBEEF");
+ g_assert_cmpstr (ephy_encoding_get_collation_key (encoding), ==, "0xDEADBEEF");
+ g_assert_cmpint (ephy_encoding_get_language_groups (encoding), ==, LG_UNICODE);
+
+ g_object_unref (encoding);
+}
+
+static void
test_ephy_encodings_get ()
{
EphyEncodings *encodings;
@@ -74,6 +92,9 @@ main (int argc, char *argv[])
_ephy_shell_create_instance (EPHY_EMBED_SHELL_MODE_TEST);
g_assert (ephy_shell);
+ g_test_add_func ("/src/ephy-encodings/create",
+ test_ephy_encodings_create);
+
g_test_add_func ("/src/ephy-encodings/get",
test_ephy_encodings_get);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]