tests for gcd functions