Add API for (de)serialising FolderPath and EmailIdentifier
Supports (de)serialising via GLib.Variant for use as GLib.Action targets transmission via DBus, etc.
This commit is contained in:
parent
f269e552ae
commit
dd3a7a1bc8
14 changed files with 251 additions and 13 deletions
|
|
@ -26,6 +26,7 @@ public class Geary.FolderPathTest : TestCase {
|
|||
add_test("path_compare", path_compare);
|
||||
add_test("path_compare_normalised", path_compare_normalised);
|
||||
add_test("distinct_roots_compare", distinct_roots_compare);
|
||||
add_test("variant_representation", variant_representation);
|
||||
}
|
||||
|
||||
public override void set_up() {
|
||||
|
|
@ -305,4 +306,12 @@ public class Geary.FolderPathTest : TestCase {
|
|||
|
||||
}
|
||||
|
||||
public void variant_representation() throws GLib.Error {
|
||||
FolderPath orig = this.root.get_child("test");
|
||||
GLib.Variant variant = orig.to_variant();
|
||||
FolderPath copy = this.root.from_variant(variant);
|
||||
|
||||
assert_true(orig.equal_to(copy));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue