Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sébastien Villemot
antik
Commits
f5bd85bb
Commit
f5bd85bb
authored
May 01, 2013
by
Liam M. Healy
Browse files
System-of-units tests
parent
808fed73
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/physical-quantities.lisp
View file @
f5bd85bb
;; Tests of physical quantities
;; Liam Healy 2011-01-09 17:38:41EST tests.lisp
;; Time-stamp: <201
1
-0
6-23 13
:41:
18
EDT physical-quantities.lisp>
;; Time-stamp: <201
3
-0
4-30 22
:41:
52
EDT physical-quantities.lisp>
;; Copyright 2011 Liam M. Healy
;; Copyright 2011
, 2013
Liam M. Healy
;; Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
...
...
@@ -47,6 +47,22 @@
(
lisp-unit:assert-numerical-equal
#
_0.45359237_kg
#
_1_pound
)
(
lisp-unit:assert-numerical-equal
#
_3600_s
#
_1_hour
))
(
lisp-unit:define-test
system-of-units
(
lisp-unit::assert-numerical-equal
10.0d0
(
with-system-of-units
(
degree
)
(
pqval
#
_10_degrees
)))
(
lisp-unit::assert-numerical-equal
0.3048d0
(
antik::pq-magnitude
(
with-system-of-units*
(
*englishu*
)
(
make-pq
1
'length
))))
(
lisp-unit::assert-numerical-equal
100000.0d0
(
let
((
sysunits
(
nf-option
:system-of-units
)))
(
set-default-system-of-units
*cgsu*
)
(
prog1
(
pqval
#
_1_km
)
(
set-nf-options
:system-of-units
sysunits
)))))
;;; These are all scalar units, i.e., the same units apply to each
;;; element of the array.
(
lisp-unit:define-test
grid-scalar-units
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment