Boost logo

Boost Testing :

From: John Maddock (john_at_[hidden])
Date: 2005-05-10 05:30:05


>> However I'm still seeing the same errors in the report page, inspite of
>> the fixes being in place for 10 days now. I assume that these results
>> are run incrementally? If so any chance that the regex lib and tests
>> could be cleaned out to see if this fixes things?
>
> I've run the tests manually after doing a CVS update and the exact same
> errors are still present.

Darn, you picked up the correct update as well.

OK, back to square one, first off here's my test case that illustrates the
problem:

#include <cstring>
#include <iostream>
#include <cctype>

template <class charT>
inline charT global_lower(charT c)
{
   std::cout << "Invoking template global_lower for type " <<
typeid(charT).name
() << std::endl;
   return c;
}
template <class charT>
inline charT global_upper(charT c)
{
   return c;
}

extern char global_lower(char c);
extern char global_upper(char c);

int main()
{
   std::cout << "Checking case conversion for regex_replace formatting." <<
std:
:endl;
   std::cout << global_lower('A') << " " << global_upper('a') << std::endl;
   std::cout << (char)(std::tolower)('A') << " " <<
(char)(std::toupper)('a') <<
 std::endl;
}

char global_lower(char c)
{
   std::cout << "global_lower called with argument ";
   std::cout.put(c);
   char result = static_cast<char>((std::tolower)((unsigned char)c));
   std::cout << " returning ";
   std::cout.put(result);
   return result;
}

char global_upper(char c)
{
   return static_cast<char>((std::toupper)((unsigned char)c));
}

You should get a compiler error if you try and compile this (tru64 only,
it's perfectly legal code).

Now here's the test case that should reproduce the regression failure, it
should pass with current cvs: does for me with:

bash-2.05$ cxx -V
Compaq C++ V6.5-040 for Compaq Tru64 UNIX V5.1B (Rev. 2650)
Compiler Driver V6.5-040 (cxx) cxx Driver

#define BOOST_ALL_NO_LIB
#include <boost/regex.hpp>
int main()
{
assert(::boost::re_detail::global_lower('A') == 'a');
}
#include <libs/regex/src/regex_traits_defaults.cpp>

Finally, I've looked into my attempts to build the regression test program,
and note that as well as a linker out of memory problem, some of the test
source files did not build (compiler complains about std::collate), can you
check the log to verify that this is not a problem for you?

Many thanks,

John.


Boost-testing list run by mbergal at meta-comm.com