I hereby claim:
- I am chrishowejones on github.
- I am agile_geek (https://keybase.io/agile_geek) on keybase.
- I have a public key ASCUGREwtGPjzrgbEptRRKZFvpmu7pbh8YGzCxJSF5Hj7Ao
To claim this, I am signing this object:
(defmacro wrap-kerodon-test | |
[test_func] | |
"Wrap the kerodon test in a binding to that returns the test report counters that can be tested for :pass, :fail, etc." | |
`(binding [clojure.test/*report-counters* (ref clojure.test/*initial-report-counters*)] | |
~test_func | |
@*report-counters*)) | |
(defmacro successful-kerodon-expr? | |
"Return true if the kerodon test function passed as arg runs without reporting a test failure." | |
[test_func] |
;; Generates a range of numbers and returns "Fizz" if divisible only by 3, "Buzz" | |
;; if divisible only by 5 and "FizzBuzz" if divisible by 15 otherwise returns | |
;; the number as a string. | |
;; It does this by getting the modulus of 15 then using this as the index for a | |
;; map to look up the index of a second map where the index returned is the one | |
;; for "Fizz" for modulus result 3, 6 & 9 "Buzz" for 5 & 10 and "FizzBuzz" for | |
;; 0 (i.e. divisable by 15). Anything else will return nil from the first map | |
;; where nil is mapped to the value of the number in the second map. | |
;; Finally str is called to ensure that when the number is returned unchanged | |
;; it is transformed into a string to match "Fizz", "Buzz" & "FizzBuzz". |
I hereby claim:
To claim this, I am signing this object:
$ sudo apt-get install software-properties-common | |
Reading package lists... Done | |
Building dependency tree | |
Reading state information... Done | |
software-properties-common is already the newest version (0.96.24.32.9). | |
0 to upgrade, 0 to newly install, 0 to remove and 65 not to upgrade. | |
sudo apt-get install software-properties-common | |
Reading package lists... Done | |
Building dependency tree | |
Reading state information... Done |
;; Functions added to clash.api.postgres/video-comment | |
(defn get-all-by-user | |
[postgres user-id] | |
(postgres/execute! postgres | |
{:select [:*] | |
:from :video-comments | |
:where [:and | |
[:= :deleted-at nil] | |
[:= :creator-id user-id]]})) |