[glom/glom-1-20] test_document_load_and_change: Test print layout removal.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom/glom-1-20] test_document_load_and_change: Test print layout removal.
- Date: Mon, 5 Dec 2011 15:16:58 +0000 (UTC)
commit 69141ad1cd1b78c6434acf928ae737aefa2b96a4
Author: Murray Cumming <murrayc murrayc com>
Date: Wed Nov 30 10:52:24 2011 +0100
test_document_load_and_change: Test print layout removal.
* tests/test_document_load_and_change.cc:
ChangeLog | 6 ++++++
tests/test_document_load_and_change.cc | 21 ++++++++++++++++++++-
2 files changed, 26 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index f548ae5..c1670c1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2011-11-30 Murray Cumming <murrayc murrayc com>
+ test_document_load_and_change: Test print layout removal.
+
+ * tests/test_document_load_and_change.cc:
+
+2011-11-30 Murray Cumming <murrayc murrayc com>
+
Updated the Document DTD.
* glom/glom_document.dtd: This fixes make check with the new save of
diff --git a/tests/test_document_load_and_change.cc b/tests/test_document_load_and_change.cc
index a9c46e0..093de41 100644
--- a/tests/test_document_load_and_change.cc
+++ b/tests/test_document_load_and_change.cc
@@ -146,7 +146,26 @@ int main()
{
std::cerr << "Failure: The removed relationship still exists." << std::endl;
return false;
- }
+ }
+
+ //Remove a print layout:
+ Glom::sharedptr<const Glom::PrintLayout> print_layout =
+ document.get_print_layout("contacts", "contact_details");
+ if(!print_layout)
+ {
+ std::cerr << "Failure: Could not get an expected print layout." << std::endl;
+ return false;
+ }
+
+ document.remove_print_layout("contacts", "contact_details");
+ print_layout =
+ document.get_print_layout("contacts", "contact_details");
+ if(print_layout)
+ {
+ std::cerr << "Failure: The removed print layotu still exists." << std::endl;
+ return false;
+ }
+
Glom::libglom_deinit();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]