|
|
|
|
@ -287,76 +287,6 @@ |
|
|
|
|
) |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
(deftest convertir-formato-impresion-04 |
|
|
|
|
(testing "Test 04 convertir-formato-impresion" |
|
|
|
|
(is (= |
|
|
|
|
(convertir-formato-impresion '("Hola, mundo {}!" 2.0)) |
|
|
|
|
'("Hola, mundo %.0f!" 2.0) |
|
|
|
|
) |
|
|
|
|
) |
|
|
|
|
) |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
(deftest convertir-formato-impresion-05 |
|
|
|
|
(testing "Test 05 convertir-formato-impresion" |
|
|
|
|
(is (= |
|
|
|
|
(convertir-formato-impresion '("Hola, mundo {}!" "2")) |
|
|
|
|
'("Hola, mundo %s!" "2") |
|
|
|
|
) |
|
|
|
|
) |
|
|
|
|
) |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
(deftest convertir-formato-impresion-06 |
|
|
|
|
(testing "Test 06 convertir-formato-impresion" |
|
|
|
|
(is (= |
|
|
|
|
(convertir-formato-impresion '("Hola, mundo {} {} {}!" 2 2.0 "2")) |
|
|
|
|
'("Hola, mundo %d %.0f %s!" 2 2.0 "2") |
|
|
|
|
) |
|
|
|
|
) |
|
|
|
|
) |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
(deftest convertir-formato-impresion-07 |
|
|
|
|
(testing "Test 07 convertir-formato-impresion" |
|
|
|
|
(is (= |
|
|
|
|
(convertir-formato-impresion '("Hola, mundo {:.8}!" 2.0)) |
|
|
|
|
'("Hola, mundo %.8f!" 2.0) |
|
|
|
|
) |
|
|
|
|
) |
|
|
|
|
) |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
(deftest convertir-formato-impresion-08 |
|
|
|
|
(testing "Test 08 convertir-formato-impresion" |
|
|
|
|
(is (= |
|
|
|
|
(convertir-formato-impresion '("- My name is {}, James {}.\n- Hello, {}{}{}!" "Bond" "Bond" 0 0 7)) |
|
|
|
|
'("- My name is %s, James %s.\n- Hello, %d%d%d!" "Bond" "Bond" 0 0 7) |
|
|
|
|
) |
|
|
|
|
) |
|
|
|
|
) |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
(deftest convertir-formato-impresion-09 |
|
|
|
|
(testing "Test 09 convertir-formato-impresion" |
|
|
|
|
(is (= |
|
|
|
|
(convertir-formato-impresion '("{} elevado a la {} es\t{}" 2.0 2 4.0)) |
|
|
|
|
'("%.0f elevado a la %d es\t%.0f" 2.0 2 4.0) |
|
|
|
|
) |
|
|
|
|
) |
|
|
|
|
) |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
(deftest convertir-formato-impresion-10 |
|
|
|
|
(testing "Test 10 convertir-formato-impresion" |
|
|
|
|
(is (= |
|
|
|
|
(convertir-formato-impresion '("Las raices cuadradas de {} son +{:.8} y -{:.8}" 4.0 1.999999999985448 1.999999999985448)) |
|
|
|
|
'("Las raices cuadradas de %.0f son +%.8f y -%.8f" 4.0 1.999999999985448 1.999999999985448) |
|
|
|
|
) |
|
|
|
|
) |
|
|
|
|
) |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
(deftest get-rust-formatters-01 |
|
|
|
|
(testing "Test 01 get-rust-formatters" |
|
|
|
|
(is (= |
|
|
|
|
|