diff options
author | Jovina | 2011-07-19 16:25:20 +0530 |
---|---|---|
committer | Jovina | 2011-07-19 16:25:20 +0530 |
commit | 7115a52508ea7aa4373b6ddeadc7ea355b63c7ab (patch) | |
tree | 03fc472992681dc68d106c3bd42b22a0efa727d6 /testing_and_debugging | |
parent | c6205e5253a8baad6f54ad8b89acdbdd8f7d08b4 (diff) | |
download | st-scripts-7115a52508ea7aa4373b6ddeadc7ea355b63c7ab.tar.gz st-scripts-7115a52508ea7aa4373b6ddeadc7ea355b63c7ab.tar.bz2 st-scripts-7115a52508ea7aa4373b6ddeadc7ea355b63c7ab.zip |
3 files added to 'testing and debugging'.
Diffstat (limited to 'testing_and_debugging')
-rw-r--r-- | testing_and_debugging/gcd.py | 10 | ||||
-rw-r--r-- | testing_and_debugging/lcmtestcases.txt | 3 | ||||
-rw-r--r-- | testing_and_debugging/testcases.txt | 3 |
3 files changed, 16 insertions, 0 deletions
diff --git a/testing_and_debugging/gcd.py b/testing_and_debugging/gcd.py new file mode 100644 index 0000000..b8d1296 --- /dev/null +++ b/testing_and_debugging/gcd.py @@ -0,0 +1,10 @@ +def gcd(a, b): + if b == 0: + return a + return gcd(b, a%b) + +if __name__ == '__main__': + result = gcd(48, 64) + if result != 16: + print "Test failed" + print "Test Passed" diff --git a/testing_and_debugging/lcmtestcases.txt b/testing_and_debugging/lcmtestcases.txt new file mode 100644 index 0000000..9097077 --- /dev/null +++ b/testing_and_debugging/lcmtestcases.txt @@ -0,0 +1,3 @@ +12 28 84 +18 36 36 +4678 39763 79562 diff --git a/testing_and_debugging/testcases.txt b/testing_and_debugging/testcases.txt new file mode 100644 index 0000000..9144f6c --- /dev/null +++ b/testing_and_debugging/testcases.txt @@ -0,0 +1,3 @@ +12 28 4 +18 36 18 +4678 39763 2339 |