summaryrefslogtreecommitdiffstats
path: root/src/xml/quote-test.h
diff options
context:
space:
mode:
authorJasper van de Gronde <jasper.vandegronde@gmail.com>2008-07-18 19:10:58 +0000
committerjaspervdg <jaspervdg@users.sourceforge.net>2008-07-18 19:10:58 +0000
commit50a6044bb4ab605004e5c82733f8f4fb7042f311 (patch)
treee35cb9f6b9cfc057f2493662c8dbecd0ddb56a0d /src/xml/quote-test.h
parentmake the resolution for create bitmap copy settable in ui (diff)
downloadinkscape-50a6044bb4ab605004e5c82733f8f4fb7042f311.tar.gz
inkscape-50a6044bb4ab605004e5c82733f8f4fb7042f311.zip
Fix for PathString to prevent it from getting into a very, very long copying run and make it use minimumexponent. Plus some extra tests.
(bzr r6355)
Diffstat (limited to 'src/xml/quote-test.h')
-rw-r--r--src/xml/quote-test.h14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/xml/quote-test.h b/src/xml/quote-test.h
index 7f5372844..cfcb3bef2 100644
--- a/src/xml/quote-test.h
+++ b/src/xml/quote-test.h
@@ -1,4 +1,5 @@
#include <cxxtest/TestSuite.h>
+#include "streq.h"
/* Initial author: Peter Moulder.
Hereby released into the Public Domain. */
@@ -11,15 +12,6 @@
#define's and `using' directives of the included file. */
#include "quote.cpp"
-struct streq_free2 {
- bool operator()(char const *exp, char *got) const
- {
- bool const ret = (strcmp(exp, got) == 0);
- g_free(got);
- return ret;
- }
-};
-
class XmlQuoteTest : public CxxTest::TestSuite
{
public:
@@ -71,7 +63,9 @@ public:
{"a\"b<c>d;!@#$%^*(\\)?", "a&quot;b&lt;c&gt;d;!@#$%^*(\\)?"}
};
for(size_t i=0; i<G_N_ELEMENTS(cases); i++) {
- TS_ASSERT_RELATION( streq_free2, cases[i].s2, xml_quote_strdup(cases[i].s1) );
+ char* str = xml_quote_strdup(cases[i].s1);
+ TS_ASSERT_RELATION( streq_rel, cases[i].s2, str );
+ g_free(str);
}
}
};