Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: C
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.
Posted 16-Jan-13 3:16am
Sandeep Mewara at 16-Jan-13 9:59am
It does not work like this here.
Here is what is expected of enquirers:
1. TRY first what you want to do! You may find that it's not that hard.
2. Formulate what was done by you that looks like an issue/not working.

Try them and tell if you face issues.
Members will be more than happy to help like this.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

How about a lot of tests of the form:
TestAssert(CountPalindromes("abc") == 0, "Should not find any palindrome");
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.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 7,442
1 OriginalGriff 5,996
2 Peter Leow 4,292
3 CHill60 2,858
4 Mika Wendelius 2,850

Advertise | Privacy | Mobile
Web03 | 2.8.150224.1 | Last Updated 16 Jan 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100