Martin Sebor wrote: > I see a number of failed assertions when I compile the test with gcc 4.1.0 and run it on Solaris (also attached). Are those expected? I.e., is there actually a problem with the library? If so (i.e., if > you can reproduce the problem), could you put together a small test case and open an issue in Jira?
These assertions are not expected, but their cause is the problem with rw_widen function for char's. But I suspect another problem with insert (s.begin(), s.begin (), s.end ()) - I prepare a small test when I could reproduce the problem separately from the string.insert test. And this problem appears on Linux only. Martin Sebor wrote: > Could you please enhance the 0.char.cpp test to exercise this and commit both the enhanced test as well as your patch? Hm, this issue is not a bug and the 0.char.cpp test seems to be correct, but I'll update it to exercise rw_widen on arrays without '\0' at the end. Thanks, Anton Pevtsov -----Original Message----- From: Martin Sebor [mailto:[EMAIL PROTECTED] Sent: Friday, March 31, 2006 06:29 To: [email protected] Subject: Re: test for lib.string.insert Anton Pevtsov wrote: > The attached file contains new test version updated according your > notes. > > I used different array here, but may be it will be useful to create > another one using bitmaps and compare these versions. I made a simplifying change to get_insert_format (I used the %{+} directive to append directly to the buffer). See the attached diff. I also removed all trailing blanks (not shown in the diff). With these changes please go ahead and commit the test. I see a number of failed assertions when I compile the test with gcc 4.1.0 and run it on Solaris (also attached). Are those expected? I.e., is there actually a problem with the library? If so (i.e., if you can reproduce the problem), could you put together a small test case and open an issue in Jira? > > I found an issue in the rw_widen function implementation for chars: [...] > I corrected this by adding '\0' symbol to the end of the resulting > array (char.cpp, line 248) > > ... > // copy src into dst > memcpy (dst, src, len); > dst [len] = '\0'; > ... > > What do you think about it? Could you please enhance the 0.char.cpp test to exercise this and commit both the enhanced test as well as your patch? > > Also I split rw_assert's formatting parameters into three parts using > rw_asnprintf function. > > Current test version doesn't contain exception safety tests. I am > working on them. Sounds good. While I'm gone, please continue to work on the tests. You might as well commit your work (tests only) so you don't accidentally lose anything. I'll review it as I have time or when I get back. Thanks! Martin
