summaryrefslogtreecommitdiffstats
path: root/src/sp-style-elem-test.h
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2010-12-14 09:12:46 +0000
committerJon A. Cruz <jon@joncruz.org>2010-12-14 09:12:46 +0000
commit2bf40bb0445c8d53b581947626098d5e9117601f (patch)
tree4cd915cf114595ea63628ffeae61edd9123d88fe /src/sp-style-elem-test.h
parentAdd a warning to sp-object.h to not use some of the new methods (diff)
downloadinkscape-2bf40bb0445c8d53b581947626098d5e9117601f.tar.gz
inkscape-2bf40bb0445c8d53b581947626098d5e9117601f.zip
Unit test cleanup.
(bzr r9952)
Diffstat (limited to 'src/sp-style-elem-test.h')
-rw-r--r--src/sp-style-elem-test.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/sp-style-elem-test.h b/src/sp-style-elem-test.h
index 53362d3e3..7021be13d 100644
--- a/src/sp-style-elem-test.h
+++ b/src/sp-style-elem-test.h
@@ -73,8 +73,8 @@ public:
void testWrite()
{
TS_ASSERT( _doc );
- TS_ASSERT( sp_document_repr_doc(_doc) );
- if ( !sp_document_repr_doc(_doc) ) {
+ TS_ASSERT( _doc->getReprDoc() );
+ if ( !_doc->getReprDoc() ) {
return; // evil early return
}
@@ -82,8 +82,8 @@ public:
SP_OBJECT(style_elem)->document = _doc;
SP_OBJECT(style_elem)->setKeyValue( SP_ATTR_TYPE, "text/css");
- Inkscape::XML::Node *repr = sp_document_repr_doc(_doc)->createElement("svg:style");
- SP_OBJECT(style_elem)->updateRepr(sp_document_repr_doc(_doc), repr, SP_OBJECT_WRITE_ALL);
+ Inkscape::XML::Node *repr = _doc->getReprDoc()->createElement("svg:style");
+ SP_OBJECT(style_elem)->updateRepr(_doc->getReprDoc(), repr, SP_OBJECT_WRITE_ALL);
{
gchar const *typ = repr->attribute("type");
TS_ASSERT( typ != NULL );
@@ -99,13 +99,13 @@ public:
void testBuild()
{
TS_ASSERT( _doc );
- TS_ASSERT( sp_document_repr_doc(_doc) );
- if ( !sp_document_repr_doc(_doc) ) {
+ TS_ASSERT( _doc->getReprDoc() );
+ if ( !_doc->getReprDoc() ) {
return; // evil early return
}
SPStyleElem &style_elem = *SP_STYLE_ELEM(g_object_new(SP_TYPE_STYLE_ELEM, NULL));
- Inkscape::XML::Node *const repr = sp_document_repr_doc(_doc)->createElement("svg:style");
+ Inkscape::XML::Node *const repr = _doc->getReprDoc()->createElement("svg:style");
repr->setAttribute("type", "text/css");
(&style_elem)->invoke_build( _doc, repr, false);
TS_ASSERT( style_elem.is_css );
@@ -127,15 +127,15 @@ public:
void testReadContent()
{
TS_ASSERT( _doc );
- TS_ASSERT( sp_document_repr_doc(_doc) );
- if ( !sp_document_repr_doc(_doc) ) {
+ TS_ASSERT( _doc->getReprDoc() );
+ if ( !_doc->getReprDoc() ) {
return; // evil early return
}
SPStyleElem &style_elem = *SP_STYLE_ELEM(g_object_new(SP_TYPE_STYLE_ELEM, NULL));
- Inkscape::XML::Node *const repr = sp_document_repr_doc(_doc)->createElement("svg:style");
+ Inkscape::XML::Node *const repr = _doc->getReprDoc()->createElement("svg:style");
repr->setAttribute("type", "text/css");
- Inkscape::XML::Node *const content_repr = sp_document_repr_doc(_doc)->createTextNode(".myclass { }");
+ Inkscape::XML::Node *const content_repr = _doc->getReprDoc()->createTextNode(".myclass { }");
repr->addChild(content_repr, NULL);
(&style_elem)->invoke_build(_doc, repr, false);
TS_ASSERT( style_elem.is_css );