Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #2154 from Fice/stringutils_test_fix

Stringutils test fix
  • Loading branch information...
commit 1e7c4aeb6f1aa75923ce01761cca558185fc2288 2 parents 81fdfc9 + 6eeaf50
@jmarshallnz jmarshallnz authored
Showing with 0 additions and 35 deletions.
  1. +0 −33 xbmc/utils/StringUtils.cpp
  2. +0 −2  xbmc/utils/StringUtils.h
View
33 xbmc/utils/StringUtils.cpp
@@ -492,39 +492,6 @@ bool StringUtils::IsInteger(const CStdString& str)
return i == str.size() && n > 0;
}
-bool StringUtils::Test()
-{
- bool ret = true;
-
- ret |= IsNaturalNumber("10");
- ret |= IsNaturalNumber(" 10");
- ret |= IsNaturalNumber("0");
- ret |= !IsNaturalNumber(" 1 0");
- ret |= !IsNaturalNumber("1.0");
- ret |= !IsNaturalNumber("1.1");
- ret |= !IsNaturalNumber("0x1");
- ret |= !IsNaturalNumber("blah");
- ret |= !IsNaturalNumber("120 h");
- ret |= !IsNaturalNumber(" ");
- ret |= !IsNaturalNumber("");
- ret |= !IsNaturalNumber("ééèè");
-
- ret |= IsInteger("10");
- ret |= IsInteger(" -10");
- ret |= IsInteger("0");
- ret |= !IsInteger(" 1 0");
- ret |= !IsInteger("1.0");
- ret |= !IsInteger("1.1");
- ret |= !IsInteger("0x1");
- ret |= !IsInteger("blah");
- ret |= !IsInteger("120 h");
- ret |= !IsInteger(" ");
- ret |= !IsInteger("");
- ret |= !IsInteger("ééèè");
-
- return ret;
-}
-
void StringUtils::RemoveCRLF(CStdString& strLine)
{
while ( strLine.size() && (strLine.Right(1) == "\n" || strLine.Right(1) == "\r") )
View
2  xbmc/utils/StringUtils.h
@@ -114,8 +114,6 @@ class StringUtils
static bool ValidateUUID(const CStdString &uuid); // NB only validates syntax
static double CompareFuzzy(const CStdString &left, const CStdString &right);
static int FindBestMatch(const CStdString &str, const CStdStringArray &strings, double &matchscore);
-
- static bool Test();
private:
static CStdString m_lastUUID;
};
Please sign in to comment.
Something went wrong with that request. Please try again.