X-Git-Url: https://code.delx.au/gnu-emacs-elpa/blobdiff_plain/d4b5edf096766e9335a92180ff931823b006c556..5736e852fd48a0f1ba1c328dd4d03e3fa008a406:/packages/test-simple/example/gcd.el diff --git a/packages/test-simple/example/gcd.el b/packages/test-simple/example/gcd.el index 9a1ac20c1..ed587bef0 100644 --- a/packages/test-simple/example/gcd.el +++ b/packages/test-simple/example/gcd.el @@ -1,11 +1,32 @@ +;;; test-simple.el --- Simple Unit Test Framework for Emacs Lisp +;; Copyright (C) 2015 Free Software Foundation, Inc + +;; Author: Rocky Bernstein +;; URL: http://github.com/rocky/emacs-test-simple +;; Keywords: unit-test +;; Version: 1.0 + +;; This program is free software: you can redistribute it and/or +;; modify it under the terms of the GNU General Public License as +;; published by the Free Software Foundation, either version 3 of the +;; License, or (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see +;; . (defun gcd(a b) "Greatest Common Divisor of A and B" ;; Make a < b - (if (> a b) + (if (> a b) (let ((c a)) (setq a b) (setq b c))) - (cond + (cond ((< a 0) nil) ((or (= 0 (- b a)) (= a 1)) a) (t (gcd (- b a) a))