[test]unclear failures

Hi,, Here some Boost.Test failures I do not understand: 1) test_tools_test fails under CW 9.4/9.5
From what I gather it looks like that
BOOST_MESSAGE( std::hex << std::showbase << 20 ); prints something different from 0x14 Any ideas? 2) errors_handling_test Failes only under cw-9.5-darwin. Could somebody run this test with --save_pattern=yes option and collect the file generated? 3) basic_cstring_test Failes under como-4_3_3-vc7_1 with prelink errors (http://tinyurl.com/b6cpe) Any help/explanation apriciated. 4) token_iterator_test Failes at runtime (abort) under gcc- 3.4.4- linux and gcc- 4.0.0- linux. My guess it's compler bug. Could somebody confirm? 5) test_fp_comparisons Failes at runtime under borland- 5_6_4. All CHECK_NOT_CLOSE assertions failes for some reason. could somebody handy with this compiler figure out why? 6) token_iterator_test Failes under mingw (3.2.3) during linking with undefined reference to std::char_traits<wchar_t>. I know that mingw doesn't have wchar_t. But BOOST_NO_CWCHAR is not defined for some reason. 7) Also gcc- 4_0_0- linux- i686- release failes ifstream_line_iterator_test (looks like compiler crashed) and parameterized_test_test(runtime failures) for which I do not have any explanations. Gennadiy.

Gennadiy Rozental ha escrito:
Hi,,
Here some Boost.Test failures I do not understand:
4) token_iterator_test
Failes at runtime (abort) under gcc- 3.4.4- linux and gcc- 4.0.0- linux. My guess it's compler bug. Could somebody confirm?
It is not a compiler bug, but rather an overzealous stdlib implementation: singular iterators (vg. default initialized iterators from STL containers) are not required to be copyable, and this is precisely what the stdlib runtime is detecting. The problem pops up in line 135 of token_iterator_test.cpp: BOOST_CHECK_EQUAL_COLLECTIONS( tit, end, res, res + sizeof(res)/sizeof(char const*) ); the my_token_iterator named end holds two std::list<char>::iterator m_begin and m_end, which by default are singular, so they are not copyable, and neither is thus end. A possible workaround for this is: range_token_iterator(const range_token_iterator& other): base(other) { if(this->m_valid){ m_begin=other.m_begin; m_begin=other.m_end; } } This way, default initalized range_token_iterators can be copied around. There's also a potential problem with one of the range_token_iterator constructors: explicit range_token_iterator( Iter begin, Iter end = Iter() ) : m_begin( begin ), m_end( end ) { this->init(); } This implies that end is copyable, hence Iter() must produce a non-singular value: in many cases (for instance, iterators of STL containers) this is not true. If this constructor is meant to be used for other types iterators, like istream iterators, then everything's fine. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

Joaquín Mª López Muñoz ha escrito:
range_token_iterator(const range_token_iterator& other): base(other) { if(this->m_valid){ m_begin=other.m_begin; m_begin=other.m_end; } }
Sorry, I meant range_token_iterator(const range_token_iterator& other): base(other) { if(this->m_valid){ m_begin=other.m_begin; m_end=other.m_end; } } Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

Gennadiy Rozental wrote:
4) token_iterator_test
Failes at runtime (abort) under gcc- 3.4.4- linux and gcc- 4.0.0- linux. My guess it's compler bug. Could somebody confirm?
Joaquín answered that question.
7) Also gcc- 4_0_0- linux- i686- release failes ifstream_line_iterator_test (looks like compiler crashed) and parameterized_test_test(runtime failures) for which I do not have any explanations.
These tests pass now. Regards, m Send instant messages to your online friends http://au.messenger.yahoo.com

On Tue, Jun 14, 2005 at 02:55:57AM -0400, Gennadiy Rozental wrote:
Hi,,
Here some Boost.Test failures I do not understand: [snip] 4) token_iterator_test
Failes at runtime (abort) under gcc- 3.4.4- linux and gcc- 4.0.0- linux. My guess it's compler bug. Could somebody confirm?
As already explained, that fails with gcc in debug mode, because a singular iterator is copied. I think I first pointed that out months ago.
6) token_iterator_test
Failes under mingw (3.2.3) during linking with undefined reference to std::char_traits<wchar_t>. I know that mingw doesn't have wchar_t. But BOOST_NO_CWCHAR is not defined for some reason.
That macro says the platform has no wchar_t. MinGW _does_ have wchar_t, but libstdc++ does not support it. You should use another macro (something like BOOST_NO_WSTRING IIRC) jon -- "When I use a word, it means just what I choose it to mean -- neither more nor less." - Humpty Dumpty
participants (4)
-
Gennadiy Rozental
-
Joaquín Mª López Muñoz
-
Jonathan Wakely
-
Martin Wille