Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Manga Guide To Databases

Authors: Mana Takahashi, Shoko Azuma, Co Ltd Trend

1st Edition

1593271905, 978-1593271909

More Books

Students also viewed these Databases questions

Question

What does Processing of an OLAP Cube accomplish?

Answered: 1 week ago