Click here to Skip to main content
Rate this: bad
good
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 2:16am
Comments
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
good
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.
Cheers
Andi
  Permalink  
v2

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

  Print Answers RSS
0 Maciej Los 225
1 OriginalGriff 140
2 Sergey Alexandrovich Kryukov 137
3 _Amy 115
4 manoj kumar choubey 115
0 OriginalGriff 7,320
1 Sergey Alexandrovich Kryukov 6,043
2 Maciej Los 3,749
3 Peter Leow 3,408
4 DamithSL 2,555


Advertise | Privacy | Mobile
Web03 | 2.8.140721.1 | Last Updated 16 Jan 2013
Copyright © CodeProject, 1999-2014
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