回忆录中的回文 [英] Palindrome in a sentance
本文介绍了回忆录中的回文的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这将是一个什么样的测试案例:
给一个句子,算一句话里的回文.Donot考虑回文里面的回文。写测试用例。
What will be the test case for this:
Give a Sentence, count the palindrome inside a sentence.Donot consider the palindrome inside a palindrome.Write test case.
推荐答案
对表格的大量测试怎么样:
How about a lot of tests of the form:
TestAssert(CountPalindromes("abc") == 0, "Should not find any palindrome");
您必须定义一个TestAssert函数,如果条件的计算结果为false,则会报告错误并发出错误消息。
将调用打包到一个或多个测试函数中,调用它们在测试程序的主要功能中。
干杯
Andi
You had to define a TestAssert function that reports an error if the condition evaluates to false and issues the error message.
Pack the calls into one or several test functions, call them in a main function of a test program.
Cheers
Andi
这篇关于回忆录中的回文的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文