summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8ac5d37)
raw | patch | inline | side by side (parent: 8ac5d37)
author | ishmal <ishmal@users.sourceforge.net> | |
Thu, 1 May 2008 19:54:27 +0000 (19:54 +0000) | ||
committer | ishmal <ishmal@users.sourceforge.net> | |
Thu, 1 May 2008 19:54:27 +0000 (19:54 +0000) |
src/dom/cssreader.cpp | patch | blob | history |
diff --git a/src/dom/cssreader.cpp b/src/dom/cssreader.cpp
index 26588178112f69f1c76216d0cc611c3c42109ba0..4bbcefb984dd9dc44981a0b617b0773e087f83c0 100644 (file)
--- a/src/dom/cssreader.cpp
+++ b/src/dom/cssreader.cpp
} // namespace org
-#ifdef TEST
+#ifdef CSSTEST
-int main(int argc, char **argv)
+static const char *fileNames[] =
+ {
+ "001.css",
+ "acid.css",
+ "base.css",
+ "inkscape.css",
+ "meyerweb.css",
+ NULL
+ };
+
+bool doTests()
{
org::w3c::dom::css::CssReader parser;
- char *fileName;
- fileName = "001.css";
- //fileName = "acid.css";
- //fileName = "base.css";
- //fileName = "inkscape.css";
- //fileName = "meyerweb.css";
- if (!parser.parseFile(fileName))
- {
- printf("Test failed\n");
+ for (char **fname = (char **)fileNames ; *fname ; fname++)
+ {
+ DOMString fileName = *fname;
+ if (!parser.parseFile(fileName))
+ {
+ printf("Test failed\n");
+ return false;
+ }
+ }
+ return true;
+}
+
+int main(int argc, char **argv)
+{
+ if (!doTests())
return 1;
- }
return 0;
}
-#endif /* TEST */
+#endif /* CSSTEST */
//#########################################################################
//# E N D O F F I L E