Question: Please fill in ToDo sections in an Inversion Counter Test Cases Text Version: # TODO - Make sure your code can handle these cases. run_test_args

Please fill in ToDo sections in an Inversion Counter Test Cases

Please fill in ToDo sections in an Inversion Counter Test Cases Text

Version: # TODO - Make sure your code can handle these cases.

Text Version:

# TODO - Make sure your code can handle these cases. run_test_args "" "x 1 2 3" "Enter sequence of integers, each followed by a space: Error: Non-integer value 'x' received at index 0." run_test_args "" "1 2 x 3" "Enter sequence of integers, each followed by a space: Error: Non-integer value 'x' received at index 2." run_test_args "lots of args" "" "Usage: ./inversioncounter [slow]" run_test_args "average" "" "Error: Unrecognized option 'average'." run_test_args "" "" "Enter sequence of integers, each followed by a space: Error: Sequence of integers not received." run_test_args "" " " "Enter sequence of integers, each followed by a space: Error: Sequence of integers not received."

# TODO - write some tests that use the 'slow' approach. Here is one example. # You are allowed up to 8 seconds to count inversions on up to 100,000 values. run_test_args "slow" "2 1" "Enter sequence of integers, each followed by a space: Number of inversions: 1"

# END slow tests

MAXTIME="1.250"

# TODO - write some tests that use the 'fast' approach. Here is one example. # You are allowed up to 1.25 seconds to count inversions on up to 100,000 values. run_test_args "" "2 1" "Enter sequence of integers, each followed by a space: Number of inversions: 1"

# END fast tests

Look for TODO in this template. Fill in each section [slow and fast] with test cases to ensure your algorithms are working correctly. Be sure to cover corner cases, such as having only one value having no inversions having the worst case number of inversions and anything else you can think of You may repeat the same test for 'slow' and fast, so write your cases carefully and thoroughly. You must write 10 solid test cases for each section. If you have somehow installed cygwin 32-bit, which I think no one did, LONG MAX will cap out at INT MAX, which is 2.1 billion. Some of my test cases go higher than that, so make sure you try things out in Linux Lab Look for TODO in this template. Fill in each section [slow and fast] with test cases to ensure your algorithms are working correctly. Be sure to cover corner cases, such as having only one value having no inversions having the worst case number of inversions and anything else you can think of You may repeat the same test for 'slow' and fast, so write your cases carefully and thoroughly. You must write 10 solid test cases for each section. If you have somehow installed cygwin 32-bit, which I think no one did, LONG MAX will cap out at INT MAX, which is 2.1 billion. Some of my test cases go higher than that, so make sure you try things out in Linux Lab

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!