Skip to content

Commit

Permalink
Change package names to avoid com.google
Browse files Browse the repository at this point in the history
  • Loading branch information
phoe committed May 9, 2020
1 parent 1df27b9 commit 225b75a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion contemplate.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@

#+quicklisp (ql:quickload :bordeaux-threads)

(com.google.lisp-koans:main)
(lisp-koans.core:main)
10 changes: 5 additions & 5 deletions lisp-koans.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
;;; See the License for the specific language governing permissions and
;;; limitations under the License.

(defpackage #:com.google.lisp-koans
(defpackage #:lisp-koans.core
(:use #:common-lisp
#:com.google.lisp-koans.test)
#:lisp-koans.test)
(:export #:main))

(in-package :com.google.lisp-koans)
(in-package :lisp-koans.core)

(defvar *all-koan-groups*
(with-open-file (in #p".koans")
Expand All @@ -28,15 +28,15 @@
;;; Functions for loading koans

(defun package-name-from-group-name (group-name)
(format nil "COM.GOOGLE.LISP-KOANS.KOANS.~A" group-name))
(format nil "LISP-KOANS.KOANS.~A" group-name))

(defun load-koan-group-named (dirname koan-group-name)
(let* ((koan-name (string-downcase (string koan-group-name)))
(koan-file-name (concatenate 'string koan-name ".lisp"))
(koan-package-name (package-name-from-group-name koan-group-name)))
(unless (find-package koan-package-name)
(make-package koan-package-name
:use '(#:common-lisp #:com.google.lisp-koans.test)))
:use '(#:common-lisp #:lisp-koans.test)))
(let ((*package* (find-package koan-package-name)))
(load (concatenate 'string dirname "/" koan-file-name)))))

Expand Down
4 changes: 2 additions & 2 deletions test-framework.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
;;; 4) Rename the system to not collide with the original LISP-UNIT.

;;; Packages
(defpackage #:com.google.lisp-koans.test
(defpackage #:lisp-koans.test
(:use #:common-lisp)
;; Assertions
(:export #:assert-eq #:assert-eql #:assert-equal #:assert-equalp #:true-or-false?
Expand All @@ -54,7 +54,7 @@
;; Test blank
(:export #:____))

(in-package #:com.google.lisp-koans.test)
(in-package #:lisp-koans.test)

;; The self-evaluating test blank allows many Lisp forms in the koans to compile
;; without errors.
Expand Down
2 changes: 1 addition & 1 deletion test.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@

#+quicklisp (ql:quickload :bordeaux-threads)

(com.google.lisp-koans:main "koans-solved")
(lisp-koans.core:main "koans-solved")

0 comments on commit 225b75a

Please sign in to comment.