[gnome-contacts/wip/nielsdg/vcard-import: 261/263] WIP
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-contacts/wip/nielsdg/vcard-import: 261/263] WIP
- Date: Thu, 31 Mar 2022 07:31:12 +0000 (UTC)
commit 889a6e5ae5a959476c817e49f92fa424ad46028b
Author: Niels De Graef <nielsdegraef gmail com>
Date: Sat Feb 6 13:50:06 2021 +0100
WIP
tests/io/internal/test-serialise-birthday.vala | 14 ++++++++++++++
1 file changed, 14 insertions(+)
---
diff --git a/tests/io/internal/test-serialise-birthday.vala b/tests/io/internal/test-serialise-birthday.vala
index 091006fc..46beef2e 100644
--- a/tests/io/internal/test-serialise-birthday.vala
+++ b/tests/io/internal/test-serialise-birthday.vala
@@ -21,6 +21,8 @@ void main (string[] args) {
Test.init (ref args);
Test.add_func ("/io/serialize_birthday",
Contacts.Tests.Io.test_serialize_birthday);
+ Test.add_func ("/io/serialize_birthday_pre_epoch",
+ Contacts.Tests.Io.test_serialize_birthday_pre_epoch);
Test.run ();
}
@@ -37,4 +39,16 @@ namespace Contacts.Tests.Io {
assert_true (new_bd_val.type () == typeof (DateTime));
assert_true (old_bd.equal ((DateTime) new_bd_val.get_boxed ()));
}
+
+ private void test_serialize_birthday_pre_epoch () {
+ unowned var bd_key = PersonaStore.detail_key (PersonaDetail.BIRTHDAY);
+
+ DateTime old_bd = new GLib.DateTime.utc (1961, 7, 3, 0, 0, 0);
+ var old_bd_val = Value (typeof (DateTime));
+ old_bd_val.set_boxed (old_bd);
+
+ var new_bd_val = _transform_single_value (bd_key, old_bd_val);
+ assert_true (new_bd_val.type () == typeof (DateTime));
+ assert_true (old_bd.equal ((DateTime) new_bd_val.get_boxed ()));
+ }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]