- Fixed #466, which gave the wrong error message when a custom report
  was missing a direction indicator for the sort order.
- Added unit tests.
This commit is contained in:
Paul Beckingham 2010-08-13 00:42:36 -04:00
parent c7cd2d2619
commit 63384abd14
3 changed files with 71 additions and 0 deletions

View file

@ -730,6 +730,12 @@ void validSortColumns (
std::vector <std::string>::const_iterator sc;
for (sc = sortColumns.begin (); sc != sortColumns.end (); ++sc)
{
char direction = (*sc)[sc->length () - 1];
if (direction != '-' && direction != '+')
throw std::string ("Sort column '") +
*sc +
"' does not have a +/- ascending/descending indicator.";
std::vector <std::string>::const_iterator co;
for (co = columns.begin (); co != columns.end (); ++co)
if (sc->substr (0, sc->length () - 1) == *co)