I found that the test works incorrectly with some options like
--no-user_chars. The attached patch fixes the problem.

Here is the ChangeLog:

2006-03-17  Anton Pevtsov  <[EMAIL PROTECTED]>

        * 21.string.capacity.cpp (run_test): Fixed bug in options
        processing
        (main): Fixed bug with missed '#' sign in options.

Thanks,
Anton Pevtsov

-----Original Message-----
From: Martin Sebor [mailto:[EMAIL PROTECTED] Sent: Thursday, March 09, 2006 20:06
To: [email protected]
Subject: Re: test for 21.strings.capacity


Anton Pevtsov wrote:


I add the UserChar case into the test for 21.strings.capacity and
finally got the following linker error:

[...]


What do you think about this?

Looks like I forgot to define the function (or rather move
its definition from rw_char.h to char.cpp in rev 384082:
http://svn.apache.org/viewcvs.cgi?rev=384082&view=rev). Let me fix it.
Sorry again.

Martin




Index: 21.string.capacity.cpp
===================================================================
--- 21.string.capacity.cpp      (revision 386588)
+++ 21.string.capacity.cpp      (working copy)
@@ -776,11 +776,11 @@
         test_ ## function (pfid);                       \
     } (void)0
 
-    if (pfid->tname_ && rw_opt_no_user_traits) {
+    if (MemFun::UserTraits == pfid->tid_ && rw_opt_no_user_traits) {
         rw_note (1 < rw_opt_no_user_traits++, 0, 0,
                  "user defined traits test disabled");
     }
-    else if (!pfid->tname_ && rw_opt_no_char_traits) {
+    else if (MemFun::DefaultTraits == pfid->tid_ && rw_opt_no_char_traits) {
         rw_note (1 < rw_opt_no_char_traits++, 0, 0,
                  "char_traits test disabled");
     }
@@ -860,7 +860,7 @@
                     "|-no-empty# "
                     "|-no-exceptions# "
                     "|-no-char_traits# "
-                    "|-no-user_traits",
+                    "|-no-user_traits#",
                     &rw_opt_no_size,
                     &rw_opt_no_resize,
                     &rw_opt_no_length,

Reply via email to