Code Cleanup
- Cmake was not updating HAVE_ST_BIRTHTIME.
- NIBBLER_FEATURE_DATE was not properly applied everywhere.
- FEATURE_COLOR was not properly set.
- Some source files failed to include cmake.h, and therefore were not properly
- Removed inefficient use of std::string::substr for guaranteed single character
strings.
- Integrated Directory::cd.
- Integrated File::ctime, ::btime.
- Integrated Path::operator+.
- Integrated Nibbler::getDigit{2,4,6}.
- Integrated HighResTimer.
enabling/disabling code.
- All Path objects now expanded internally to absolute form.
- Modified unit tests to accomodate absolute paths.
- Merged new nibbler.t.cpp tests.
- Made various methods const.
- Includes removed from some files, added to others.
This commit is contained in:
@@ -39,15 +39,15 @@ int main (int argc, char** argv)
|
||||
{
|
||||
#ifdef NIBBLER_FEATURE_DATE
|
||||
#ifdef NIBBLER_FEATURE_REGEX
|
||||
UnitTest t (396);
|
||||
UnitTest t (402);
|
||||
#else
|
||||
UnitTest t (372);
|
||||
UnitTest t (378);
|
||||
#endif
|
||||
#else
|
||||
#ifdef NIBBLER_FEATURE_REGEX
|
||||
UnitTest t (346);
|
||||
UnitTest t (338);
|
||||
#else
|
||||
UnitTest t (322);
|
||||
UnitTest t (314);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -258,6 +258,24 @@ int main (int argc, char** argv)
|
||||
t.is (i, 2, " '2x' : getDigit () -> 2");
|
||||
t.notok (n.getDigit (i), " 'x' : getDigit () -> false");
|
||||
|
||||
// bool getDigit6 (int&);
|
||||
t.diag ("Nibbler::getDigit6");
|
||||
n = Nibbler ("654321");
|
||||
t.ok (n.getDigit6 (i), " 654321 : getDigit6 () -> true");
|
||||
t.is (i, 654321, " 654321 : getDigit6 () -> 654321");
|
||||
|
||||
// bool getDigit4 (int&);
|
||||
t.diag ("Nibbler::getDigit4");
|
||||
n = Nibbler ("4321");
|
||||
t.ok (n.getDigit4 (i), " 4321 : getDigit4 () -> true");
|
||||
t.is (i, 4321, " 4321 : getDigit4 () -> 4321");
|
||||
|
||||
// bool getDigit2 (int&);
|
||||
t.diag ("Nibbler::getDigit2");
|
||||
n = Nibbler ("21");
|
||||
t.ok (n.getDigit2 (i), " 21 : getDigit2 () -> true");
|
||||
t.is (i, 21, " 21 : getDigit2 () -> 21");
|
||||
|
||||
// bool getInt (int&);
|
||||
t.diag ("Nibbler::getInt");
|
||||
n = Nibbler ("123 -4");
|
||||
|
||||
Reference in New Issue
Block a user