import unittest
import io
import re
from unittest import mock
import math
import student_X as main #Replace student_X with your filename 
    
    
    
 

class AreaOfRectangleBetweenPointsTests(unittest.TestCase):

    def test_default_case(self):
        function = main.area_of_rectangle_between_points

        try:
            docstring = function.__doc__
            docstring = docstring.strip()
        except:
            docstring = ""
        correct = docstring != ""
        message = "No docstring."
        self.assertTrue(correct, message) 

        
        inputs = (1, 2, 2, 1)

        test = False
        try:
            correct = 1
            result = function(*inputs)
            test = correct == result
        except:
            pass
        message = "Doesn't return the correct area when the points form a small square."
        self.assertTrue(test, message)

        
        inputs = (3, 21, 23, 1)

        test = False
        try:
            correct = 400
            result = function(*inputs)
            test = correct == result
        except:
            pass
        message = "Doesn't return the correct area when the points form a large square."
        self.assertTrue(test, message)



        inputs = (1, 10, 3, 1)

        test = False
        try:
            correct = 18
            result = function(*inputs)
            test = correct == result
        except:
            pass
        message = "Doesn't return the correct area for a tall rectangle."
        self.assertTrue(test, message)

        
        inputs = (1, 2, 315, -1)

        test = False
        try:
            correct = 314 * 3
            result = function(*inputs)
            test = correct == result
        except:
            pass
        message = "Doesn't return the correct area for a wide, flat rectangle."
        self.assertTrue(test, message)
        
        
if __name__ == "__main__":
    tests = AreaOfRectangleBetweenPointsTests()
    tests.test_default_case()