Question: Write a C program in Code::Blocks to test your secondWord function from 3 (part 3 should be a function inside part 4s completed code) This

Write a C program in Code::Blocks to test your secondWord function from 3 (part 3 should be a function inside part 4s completed code)

This program should create at least 10 use cases for the function that tests its behavior under different input conditions. These use cases are hard coded (no user input). Your code should be able to test any version of the secondWord function (it should be able to test another students secondWord function to confirm it operates correctly).

Test cases must include inputs with only 1 word, 2 words, 3 words, use of tabs, use of spaces, uses of tabs and spaces, capital letters, numbers, punctuations, appropriate combinations of test input.

The program should have a known expected output for each example and test the output to see if the output matches this expected output.

The program will output to the terminal and a txt file

The program will output information about what is being tested (secondWord)

The program will output Function Test Case # followed by the number of the test case, then output Input: followed by the input, Expected Output: followed by the expected output, and Output: followed by the output for each case. The program will print out a PASS or a FAIL after each output line. Output can be formatted on separate lines as shown below to make things easy to read.

The program will print out a PASS or FAIL at the end of the output for the whole function test. A FAIL is outputted if any individual test fails.

An example output for the first couple lines of your program are:

Functional Test of secondWord function.

Tests multiple inputs to the secondWord function to confirm operation.

Function Test Case #1

Input: One Two Three

Expected Output: Two

Output: Two

Result: PASS

-------------------------------------------

Function Test Case #2

Input: ONE

Expected Output: NULL

Output: NULL

Result: PASS

-------------------------------------------

-------------------------------------------

OVERALL RESULT = PASS

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!