This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns maff-tests) | |
(use 'clojure.test) | |
;;; Functions | |
(defn maff-180-formula [age] | |
(- 180 age) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn golpe [golpista & golpistas] | |
(println (str golpista " é golpista")) | |
(println (for [x golpistas] x) " também são") | |
) | |
(golpe "Bububu" "Bababa" "Bebbe") | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns clojure.test.example | |
(:use clojure.test)) | |
; Documentation: http://philmaffetone.com/180-formula/ | |
(defn maffetone-formula-max [age] | |
"Returns 180-age" | |
(- 180 age)) | |
(deftest maffetone-formula-max-test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns clojure.test.adolfo | |
(:use clojure.test)) | |
; Documentation: http://philmaffetone.com/180-formula/ | |
(defn maffetone-formula-max [age] | |
"Returns 180-age" | |
(- 180 age)) | |
(deftest maffetone-formula-max-test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns clojure.test.cond | |
(:use clojure.set) | |
(:use clojure.test) | |
) | |
(defn tem-intersecao [conjunto vetor] | |
(> (count (intersection conjunto (set vetor))) 0) | |
) | |
(defn test-cond [age & args] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns t-and.core-test | |
(:require [clojure.test :refer :all] | |
[t-and.core :refer :all])) | |
(deftest t-and-test-1 | |
(is (= '([:t a] [:t b]) (t-and '[:t [:and a b]]))) | |
) | |
(deftest t-and-test-2 | |
(is (= '([:t [:or c d]] [:t [:or a b]]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns t-and.core) | |
(def empty-list '() ) | |
(defn t-and [signed-formula] | |
(let [[sign [connective left right]] signed-formula] | |
(if (and (= :t sign) (= :and connective)) | |
(list [sign left] [sign right]) | |
empty-list) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;Testes: | |
(ns fizzbuzz.core-test | |
(:require [clojure.test :refer :all] | |
[fizzbuzz.core :refer :all])) | |
(deftest fizz-buzz-007 | |
(is (= (fizzbuzz 1) 1))) | |
(deftest fizz-buzz-002 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 T (!Q | (R | P)) | |
2 T (!Q -> (Q & (R | R))) | |
3 F !((P & Q) | P) | |
4 T ((P & Q) | P) | |
5 T (P&Q) | |
7 T P | |
8 T Q | |
9 F ! Q | |
11 T Q | |
12 T !Q |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 T (!Q | (R | P)) | |
2 T (!Q -> (Q & (R | R))) | |
3 F !((P & Q) | P) | |
4 T ((P & Q) | P) | |
5 T (P&Q) | |
7 T P | |
8 T Q | |
9 F ! Q | |
11 T Q | |
12 T !Q |