Skip to content

create tests/ directory and rename test package #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions parse-float.asd
Copy link
Author

@adlai adlai Jan 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is not intuitive that the directory name follows the package name

Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
(:file "parse-float"
:depends-on ("package"))))

(asdf:defsystem #:parse-float-tests
:name "parse-float-tests"
(asdf:defsystem #:parse-float/tests
:name "parse-float/tests"
:description "Tests for parse-float."
:license "Public Domain"
:author "Sumant Oemrawsingh"
:depends-on (#:parse-float #:lisp-unit)
:components ((:file "parse-float-tests")))
:components ((:file "tests/parse-float")))
6 changes: 3 additions & 3 deletions parse-float-tests.lisp → tests/parse-float.lisp
Copy link
Author

@adlai adlai Jan 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

having the directory name follow the package name violates unwritten invariant where the order of words within one token retains significance across contexts.

Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
;;;; parse-float-tests.lisp
;;;; tests/parse-float.lisp

(defpackage :parse-float-tests
(defpackage :parse-float/tests
(:use :common-lisp :lisp-unit :parse-float))

(in-package :parse-float-tests)
(in-package :parse-float/tests)

(defvar *test-values*
'(0 1 -1 1/10 -1/10 10 -10 12 -12 1/8 -1/8 123 -123 1/800 -1/800 1234 -1234 1/1600 -1/1600 314159/100000 -314159/100000))
Expand Down