Tidied up documentation. This is more or less ready for others to play with.

This commit is contained in:
Simon Brooke 2026-08-11 19:21:08 +01:00
parent 91343b9c10
commit 507a365682
15 changed files with 337 additions and 40 deletions

View 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))))