-
Notifications
You must be signed in to change notification settings - Fork 110
/
testfacts.cljc
25 lines (21 loc) · 946 Bytes
/
testfacts.cljc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
(ns clara.rules.testfacts
"This namespace exists primary for testing purposes, working around the fact that we cannot AOT compile test classes. This should be moved to the tests once a workaround for this is solved.")
;; Reflection against records requires them to be compiled AOT, so we temporarily
;; place them here as leiningen won't AOT compile test resources.
(defrecord Temperature [temperature location])
(defrecord WindSpeed [windspeed location])
(defrecord Cold [temperature])
(defrecord Hot [temperature])
(defrecord ColdAndWindy [temperature windspeed])
(defrecord LousyWeather [])
(defrecord TemperatureHistory [temperatures])
;; Test facts for chained rules.
(defrecord First [])
(defrecord Second [])
(defrecord Third [])
(defrecord Fourth [])
;; Record utilizing clj flexible field names.
(defrecord FlexibleFields [it-works?
a->b
x+y
bang!])