]> granicus.if.org Git - libexpat/commitdiff
Make the organization slightly easier to discern.
authorFred L. Drake, Jr. <fdrake@users.sourceforge.net>
Thu, 25 Apr 2002 01:42:34 +0000 (01:42 +0000)
committerFred L. Drake, Jr. <fdrake@users.sourceforge.net>
Thu, 25 Apr 2002 01:42:34 +0000 (01:42 +0000)
expat/tests/runtests.c

index ba91f79c48ae6b4fbf6aaded6108ba6633e66cac..79e60e54c8d2a92c343d40f98a191436629ceb37 100644 (file)
@@ -44,6 +44,11 @@ _xml_failure(const char *file, int line)
 
 #define xml_failure() _xml_failure(__FILE__, __LINE__)
 
+
+/*
+ * Character & encoding tests.
+ */
+
 START_TEST(test_nul_byte)
 {
     char text[] = "<doc>\0</doc>";
@@ -69,24 +74,6 @@ START_TEST(test_u0000_char)
 }
 END_TEST
 
-
-START_TEST(test_xmldecl_misplaced)
-{
-    char *text =
-        "\n"
-        "<?xml version='1.0'?>\n"
-        "<a>&eee;</a>";
-
-    if (!XML_Parse(parser, text, strlen(text), 1)) {
-        if (XML_GetErrorCode(parser) != XML_ERROR_MISPLACED_XML_PI)
-            xml_failure();
-    }
-    else {
-        fail("expected XML_ERROR_MISPLACED_XML_PI with misplaced XML decl");
-    }
-}
-END_TEST
-
 START_TEST(test_bom_utf8)
 {
     /* This test is really just making sure we don't core on a UTF-8 BOM. */
@@ -311,6 +298,10 @@ START_TEST(test_latin1_umlauts)
 END_TEST
 
 
+/*
+ * Attribute tests.
+ */
+
 /* Helpers used by the following test; this checks any "attr" and "refs"
  * attributes to make sure whitespace has been normalized.
  */
@@ -420,6 +411,28 @@ START_TEST(test_attr_whitespace_normalization)
 END_TEST
 
 
+/*
+ * XML declaration tests.
+ */
+
+START_TEST(test_xmldecl_misplaced)
+{
+    char *text =
+        "\n"
+        "<?xml version='1.0'?>\n"
+        "<a>&eee;</a>";
+
+    if (!XML_Parse(parser, text, strlen(text), 1)) {
+        if (XML_GetErrorCode(parser) != XML_ERROR_MISPLACED_XML_PI)
+            xml_failure();
+    }
+    else {
+        fail("expected XML_ERROR_MISPLACED_XML_PI with misplaced XML decl");
+    }
+}
+END_TEST
+
+
 /*
  * Namespaces tests.
  */