Skip to content

Commit

Permalink
Create gcd_test.py
Browse files Browse the repository at this point in the history
Unit test for GCD.py
  • Loading branch information
vedangmehta committed Aug 11, 2015
1 parent 91cae9b commit 26c5ae1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/gcd_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import unittest
import fractions
import GCD

class TestEuclideanGCD(unittest.TestCase):
def test_gcd(self):
self.assertEqual(fractions.gcd(30,50),GCD.greatest_common_divisor(30,50))
self.assertEqual(fractions.gcd(55555,123450),GCD.greatest_common_divisor(55555,123450))
self.assertEqual(fractions.gcd(-30,-50),GCD.greatest_common_divisor(-30,-50))
self.assertEqual(fractions.gcd(-1234,1234),GCD.greatest_common_divisor(-1234,1234))

if __name__ == "__main__":
unittest.main()

0 comments on commit 26c5ae1

Please sign in to comment.