subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1406410 - /subversion/branches/wc-collate-path/subversion/tests/libsvn_subr/utf-test.c
Date Wed, 07 Nov 2012 00:31:37 GMT
Author: brane
Date: Wed Nov  7 00:31:37 2012
New Revision: 1406410

URL: http://svn.apache.org/viewvc?rev=1406410&view=rev
Log:
On the wc-collate-path branch:

* subversion/tests/libsvn_subr/utf-test.c
  (test_utf_decompose_normalized_ucs4cmp): More exhaustive tests.

Modified:
    subversion/branches/wc-collate-path/subversion/tests/libsvn_subr/utf-test.c

Modified: subversion/branches/wc-collate-path/subversion/tests/libsvn_subr/utf-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/wc-collate-path/subversion/tests/libsvn_subr/utf-test.c?rev=1406410&r1=1406409&r2=1406410&view=diff
==============================================================================
--- subversion/branches/wc-collate-path/subversion/tests/libsvn_subr/utf-test.c (original)
+++ subversion/branches/wc-collate-path/subversion/tests/libsvn_subr/utf-test.c Wed Nov  7
00:31:37 2012
@@ -425,19 +425,56 @@ test_utf_decompose_normalized_ucs4cmp(ap
   apr_int32_t *bufb = apr_palloc(pool, buflen * sizeof(apr_int32_t));
 
 
+  /* Empty key */
+  SVN_ERR(normalized_compare("", '=', "", TRUE, "empty", "empty",
+                             bufa, buflen, bufb, buflen));
+  SVN_ERR(normalized_compare("", '<', "a", TRUE, "empty", "nonempty",
+                             bufa, buflen, bufb, buflen));
+  SVN_ERR(normalized_compare("a", '>', "", TRUE, "nonempty", "empty",
+                             bufa, buflen, bufb, buflen));
+
+  /* Deterministic ordering */
+  SVN_ERR(normalized_compare("a", '<', "b", TRUE, "a", "b",
+                             bufa, buflen, bufb, buflen));
+  SVN_ERR(normalized_compare("b", '<', "c", TRUE, "b", "c",
+                             bufa, buflen, bufb, buflen));
+  SVN_ERR(normalized_compare("a", '<', "c", TRUE, "a", "c",
+                             bufa, buflen, bufb, buflen));
+
+  SVN_ERR(normalized_compare("b", '>', "a", FALSE, "b", "a",
+                             bufa, buflen, bufb, buflen));
+  SVN_ERR(normalized_compare("c", '>', "b", FALSE, "c", "b",
+                             bufa, buflen, bufb, buflen));
+  SVN_ERR(normalized_compare("c", '>', "a", FALSE, "c", "a",
+                             bufa, buflen, bufb, buflen));
+
+  /* Normalized equality */
   SVN_ERR(normalized_compare(nfc, '=', nfd, TRUE, "nfc", "nfd",
                              bufa, buflen, bufb, buflen));
+  SVN_ERR(normalized_compare(nfd, '=', nfc, TRUE, "nfd", "nfc",
+                             bufa, buflen, bufb, buflen));
   SVN_ERR(normalized_compare(nfc, '=', mixup, TRUE, "nfc", "mixup",
                              bufa, buflen, bufb, buflen));
+  SVN_ERR(normalized_compare(nfd, '=', mixup, TRUE, "nfd", "mixup",
+                             bufa, buflen, bufb, buflen));
   SVN_ERR(normalized_compare(mixup, '=', nfd, FALSE, "mixup", "nfd",
                              bufa, buflen, bufb, buflen));
+  SVN_ERR(normalized_compare(mixup, '=', nfc, FALSE, "mixup", "nfc",
+                             bufa, buflen, bufb, buflen));
 
+  /* Key length */
   SVN_ERR(normalized_compare(nfc, '<', longer, FALSE, "nfc", "longer",
                              bufa, buflen, bufb, buflen));
+  SVN_ERR(normalized_compare(longer, '>', nfc, FALSE, "longer","nfc",
+                             bufa, buflen, bufb, buflen));
   SVN_ERR(normalized_compare(nfd, '>', shorter, TRUE, "nfd", "shorter",
                              bufa, buflen, bufb, buflen));
+  SVN_ERR(normalized_compare(shorter, '<', nfd, TRUE, "shorter", "nfd",
+                             bufa, buflen, bufb, buflen));
   SVN_ERR(normalized_compare(mixup, '<', lowcase, FALSE, "mixup", "lowcase",
                              bufa, buflen, bufb, buflen));
+  SVN_ERR(normalized_compare(lowcase, '>', mixup, FALSE, "lowcase", "mixup",
+                             bufa, buflen, bufb, buflen));
 
   return SVN_NO_ERROR;
 }



Mime
View raw message