Skip to content
This repository
Browse code

Merge pull request #2154 from Fice/stringutils_test_fix

Stringutils test fix
  • Loading branch information...
commit 1e7c4aeb6f1aa75923ce01761cca558185fc2288 2 parents 81fdfc9 + 6eeaf50
jmarshallnz authored
33  xbmc/utils/StringUtils.cpp
@@ -492,39 +492,6 @@ bool StringUtils::IsInteger(const CStdString& str)
492 492
   return i == str.size() && n > 0;
493 493
 }
494 494
 
495  
-bool StringUtils::Test()
496  
-{
497  
-  bool ret = true;
498  
-
499  
-  ret |= IsNaturalNumber("10");
500  
-  ret |= IsNaturalNumber(" 10");
501  
-  ret |= IsNaturalNumber("0");
502  
-  ret |= !IsNaturalNumber(" 1 0");
503  
-  ret |= !IsNaturalNumber("1.0");
504  
-  ret |= !IsNaturalNumber("1.1");
505  
-  ret |= !IsNaturalNumber("0x1");
506  
-  ret |= !IsNaturalNumber("blah");
507  
-  ret |= !IsNaturalNumber("120 h");
508  
-  ret |= !IsNaturalNumber(" ");
509  
-  ret |= !IsNaturalNumber("");
510  
-  ret |= !IsNaturalNumber("ééèè");
511  
-
512  
-  ret |= IsInteger("10");
513  
-  ret |= IsInteger(" -10");
514  
-  ret |= IsInteger("0");
515  
-  ret |= !IsInteger(" 1 0");
516  
-  ret |= !IsInteger("1.0");
517  
-  ret |= !IsInteger("1.1");
518  
-  ret |= !IsInteger("0x1");
519  
-  ret |= !IsInteger("blah");
520  
-  ret |= !IsInteger("120 h");
521  
-  ret |= !IsInteger(" ");
522  
-  ret |= !IsInteger("");
523  
-  ret |= !IsInteger("ééèè");
524  
-
525  
-  return ret;
526  
-}
527  
-
528 495
 void StringUtils::RemoveCRLF(CStdString& strLine)
529 496
 {
530 497
   while ( strLine.size() && (strLine.Right(1) == "\n" || strLine.Right(1) == "\r") )
2  xbmc/utils/StringUtils.h
@@ -114,8 +114,6 @@ class StringUtils
114 114
   static bool ValidateUUID(const CStdString &uuid); // NB only validates syntax
115 115
   static double CompareFuzzy(const CStdString &left, const CStdString &right);
116 116
   static int FindBestMatch(const CStdString &str, const CStdStringArray &strings, double &matchscore);
117  
-
118  
-  static bool Test();
119 117
 private:
120 118
   static CStdString m_lastUUID;
121 119
 };

0 notes on commit 1e7c4ae

Please sign in to comment.
Something went wrong with that request. Please try again.