Compare commits

...

4 Commits

  1. 7
      src/rustint/core.clj
  2. 18
      test/rustint/core_test.clj

@ -2582,10 +2582,9 @@
; 0.5
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defn dividir [arg1 arg2]
(
cond
(and (float? arg2) (int? arg1)) (/ arg1 arg2)
:else (quot arg1 arg2)
(if (and (int? arg1) (int? arg2))
(quot arg1 arg2)
(/ arg1 arg2)
)
)

@ -164,6 +164,24 @@
)
)
(deftest dividir-test07
(testing "Test 07 dividir"
(is (= (dividir 1.4 0.7) 2.0))
)
)
(deftest dividir-test08
(testing "Test 08 dividir"
(is (= (dividir 1.75 1.25) 1.4))
)
)
(deftest dividir-test09
(testing "Test 09 dividir"
(is (= (dividir 17.0 8.0) 2.125))
)
)
(deftest identificador-test01
(testing "Test 01 identificador"
(is (= (identificador? 'boolean) true))

Loading…
Cancel
Save