diff options
author | bakaoh <tatattai@gmail.com> | 2018-08-10 18:31:19 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-08-15 16:23:08 +0800 |
commit | 3fa8829845bf55df812f81356a3ec43149836bb5 (patch) | |
tree | 16bb5707241fffa03f93513fffcaada49c083274 /test/libdevcore | |
parent | f82893450d36d1e2d136b0cbd4449ff955410fb5 (diff) | |
download | dexon-solidity-3fa8829845bf55df812f81356a3ec43149836bb5.tar dexon-solidity-3fa8829845bf55df812f81356a3ec43149836bb5.tar.gz dexon-solidity-3fa8829845bf55df812f81356a3ec43149836bb5.tar.bz2 dexon-solidity-3fa8829845bf55df812f81356a3ec43149836bb5.tar.lz dexon-solidity-3fa8829845bf55df812f81356a3ec43149836bb5.tar.xz dexon-solidity-3fa8829845bf55df812f81356a3ec43149836bb5.tar.zst dexon-solidity-3fa8829845bf55df812f81356a3ec43149836bb5.zip |
Fixes #4718: High CPU usage when using large variable names
Diffstat (limited to 'test/libdevcore')
-rw-r--r-- | test/libdevcore/StringUtils.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/libdevcore/StringUtils.cpp b/test/libdevcore/StringUtils.cpp index 94f1b753..76c11b82 100644 --- a/test/libdevcore/StringUtils.cpp +++ b/test/libdevcore/StringUtils.cpp @@ -48,6 +48,7 @@ BOOST_AUTO_TEST_CASE(test_similarity) BOOST_CHECK_EQUAL(stringWithinDistance("abc", "abcdef", 2), false); BOOST_CHECK_EQUAL(stringWithinDistance("abcd", "wxyz", 2), false); BOOST_CHECK_EQUAL(stringWithinDistance("", "", 2), true); + BOOST_CHECK_EQUAL(stringWithinDistance("YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY", "YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYZ", 2, 6400), false); } BOOST_AUTO_TEST_CASE(test_dldistance) |