Tidied up documentation. This is more or less ready for others to play with.
This commit is contained in:
parent
91343b9c10
commit
507a365682
15 changed files with 337 additions and 40 deletions
38
test/humidity/core_test.clj
Normal file
38
test/humidity/core_test.clj
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
(ns humidity.core-test
|
||||
(:require
|
||||
[clojure.test :refer [deftest is testing]]
|
||||
[humidity.core :refer [resolution]]))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;;
|
||||
;;; Copyright (C) 2026 Simon Brooke
|
||||
;;;
|
||||
;;; 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 2
|
||||
;;; 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, write to the Free Software
|
||||
;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
;;; USA.
|
||||
;;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(deftest resolution-test
|
||||
(testing "resolution")
|
||||
(let [expected {:relative-humidity 100,
|
||||
:temperature-celsius 35,
|
||||
:pressure-pascals 101325,
|
||||
:pressure-millibars 4053/4,
|
||||
:saturation-vapour-pressure 5622.488734516426,
|
||||
:temperature-kelvin 308.15,
|
||||
:absolute-humidity 3953.618101887827}
|
||||
packet {:relative-humidity 100 :temperature-celsius 35}
|
||||
actual (resolution packet)]
|
||||
(is (= actual expected))))
|
||||
Loading…
Add table
Add a link
Reference in a new issue