Blank Durations

- Instead of dispalying '-' for a zero-length duration, nothing is ('') is
  displayed instead.  This allows a completely empty duration column to be
  culled by the rc.print.empty.columns=no feature.
- Unit tests updated accordingly.
This commit is contained in:
Paul Beckingham 2013-02-24 14:26:52 -05:00
parent 089b3e7d66
commit 330761e997
4 changed files with 27 additions and 26 deletions

View file

@ -79,7 +79,7 @@ int main (int argc, char** argv)
d = Duration (365 * 86400 + 1); t.is (d.format (), "1.0 yrs", "365 days + 1 sec -> 1.0 yrs");
// std::string formatCompact ();
d = Duration (0), t.is (d.formatCompact (), "-", "0 -> -");
d = Duration (0), t.is (d.formatCompact (), "", "0 ->");
d = Duration (1), t.is (d.formatCompact (), "1s", "1 -> 1s");
d = Duration (2), t.is (d.formatCompact (), "2s", "2 -> 2s");
d = Duration (59), t.is (d.formatCompact (), "59s", "59 -> 59s");