Microsoft Interview Question
Software Engineer / DevelopersCountry: India
Interview Type: In-Person
OK, let me re-word a bit: You have to test for "is a number" and "is an anagram"
These two are independent and I don't think it is a good idea to come up with mixed test cases (like anagram but not number)
Plus you need to consider the special cases like empty, very long, etc.
You test for the BOTH conditions and then/or before for the special cases.
At least this sounds logical for me - I am not a tester just a developer...
But testing for "is a number" requires a lot more clarification of what a number is e.g. for an engineer a complex number _is_ a number ;) so 3+4i and 4+3i are nice anagrams and .31415E+1 and +1.3514E1.
Test Cases:
- Gopi December 31, 20111. Inserting empty inputs
2. Inputs of very large size
3. A number with non-numeric characters in between
4. A number with non-numeric characters in between, which is an Anagram
5. A completely non-numeric input with numbers at the ends
6. A completely non-numeric input which is an Anagram
7. Inputting a Program Code as input to check if something amiss does not happen
8. Performing the above tests in different environments