testSystemTools.cxx 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2011 Kitware, Inc., Insight Software Consortium
  4. Distributed under the OSI-approved BSD License (the "License");
  5. see accompanying file Copyright.txt for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even the
  7. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the License for more information.
  9. ============================================================================*/
  10. #include "cmSystemTools.h"
  11. #define cmPassed(m) std::cout << "Passed: " << m << "\n"
  12. #define cmFailed(m) std::cout << "FAILED: " << m << "\n"; failed=1
  13. int testSystemTools(int, char*[])
  14. {
  15. int failed = 0;
  16. // ----------------------------------------------------------------------
  17. // Test cmSystemTools::UpperCase
  18. std::string str = "abc";
  19. std::string strupper = "ABC";
  20. if(cmSystemTools::UpperCase(str) == strupper)
  21. {
  22. cmPassed("cmSystemTools::UpperCase is working");
  23. }
  24. else
  25. {
  26. cmFailed("cmSystemTools::UpperCase is working");
  27. }
  28. return failed;
  29. }