Please provide code for a unit test program to test the following functions: def addition(x, y): return
Fantastic news! We've Found the answer you've been seeking!
Question:
Please provide code for a unit test program to test the following functions:
def addition(x, y):
return x + y
def subtraction(x, y):
return x - y
def multiplication(x, y):
return x * y
def division(x, y):
return x / y
For each function, should test:
- When given two positive numbers, whether the function returns correct value
- When given negative numbers, whether the function returns correct value
- When given one positive number and one negative number , whether the function returns correct value
Related Book For
Computer Organization And Design The Hardware Software Interface
ISBN: 9780123747501
4th Revised Edition
Authors: David A. Patterson, John L. Hennessy
Posted Date: