-- The greatest common divisor (GCD) of two numbers X and Y is, as the -- name suggests, the largest number which evenly divides both X and -- Y. Implement the function below to calculate this. -- -- Solution -------------------------------------------------------------------- function greatest_common_divisor(x, y) -- Your implementation here end -- Tests ----------------------------------------------------------------------- local luaunit = require("luaunit.luaunit") function test_greatest_common_divisor_of_1386_and_3213_is_63() luaunit.assertEquals(greatest_common_divisor(1386, 3213), 63) end function test_greatest_common_divisor_of_1470_and_3234_is_294() luaunit.assertEquals(greatest_common_divisor(1470, 3234), 294) end function test_greatest_common_divisor_of_931_and_399_is_133() luaunit.assertEquals(greatest_common_divisor(931, 399), 133) end os.exit(luaunit.LuaUnit.run())