提交 1bfc774a 编写于 作者: D Damien George

tests/basics/string_compare.py: Add test with string that hashes to 0.

The string "Q+?" is special in that it hashes to zero with the djb2
algorithm (among other strings), and a zero hash should be incremented to a
hash of 1.
上级 22161acf
......@@ -53,3 +53,6 @@ print("1/" <= "1")
# that does have a hash, but the lengths of the two strings are different
import sys
print(sys.version == 'a long string that has a hash')
# this special string would have a hash of 0 but is incremented to 1
print('Q+?' == 'Q' + '+?')
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册