diff --git a/scripts/regression_tests.pd b/scripts/regression_tests.pd index 097fcc19bdd84175e2b81246f24df265c1437dcb..3f2c6cc91b2f99305a79a621bfb1c2d151ace395 100644 --- a/scripts/regression_tests.pd +++ b/scripts/regression_tests.pd @@ -1,4 +1,4 @@ -#N canvas 340 157 750 572 12; +#N canvas 225 102 750 572 12; #X obj 465 281 r \$0-result; #X obj 212 239 bng 31 250 50 0 empty empty Run_all 39 13 0 12 -262144 -1 -1; @@ -59,6 +59,7 @@ is handy for some binbuf tests.; #X obj 198 2031 rtest type_hint_coverage; #X obj 198 2086 rtest route_reject_bang; #X obj 198 2141 rtest text_sort; +#X obj 198 2196 rtest pow~_negative_numbers; #X connect 0 0 27 0; #X connect 1 0 4 0; #X connect 2 0 42 0; @@ -103,3 +104,4 @@ is handy for some binbuf tests.; #X connect 50 0 51 0; #X connect 51 0 52 0; #X connect 52 0 53 0; +#X connect 53 0 54 0; diff --git a/scripts/regression_tests/pow~_negative_numbers.pd b/scripts/regression_tests/pow~_negative_numbers.pd new file mode 100644 index 0000000000000000000000000000000000000000..96bf34e6a42467c6b67a0bd9081f956c6449a1b9 --- /dev/null +++ b/scripts/regression_tests/pow~_negative_numbers.pd @@ -0,0 +1,27 @@ +#N canvas 320 117 911 463 12; +#X obj 41 28 inlet; +#X obj 41 404 outlet; +#X msg 41 56 bang; +#X msg 41 135 -2; +#X obj 41 164 ../utils/sigtofloat~ pow~ 2; +#X obj 41 193 == 4; +#X obj 41 222 list append pow~ should handle negative numbers correctly +for integer powers; +#X obj 41 85 trigger bang bang; +#X msg 461 135 -2; +#X obj 461 164 ../utils/sigtofloat~ pow~ 2.5; +#X obj 461 222 list append pow~ should output zero for negative numbers +when given a non-integer power; +#X obj 461 193 == 0; +#X connect 0 0 2 0; +#X connect 2 0 7 0; +#X connect 3 0 4 0; +#X connect 4 0 5 0; +#X connect 5 0 6 0; +#X connect 6 0 1 0; +#X connect 7 0 3 0; +#X connect 7 1 8 0; +#X connect 8 0 9 0; +#X connect 9 0 11 0; +#X connect 10 0 1 0; +#X connect 11 0 10 0; diff --git a/scripts/regression_tests/wrap~_compatibility_bug.pd b/scripts/regression_tests/wrap~_compatibility_bug.pd index d5fb2e3fb456e867e07cebe82b030d68879ac1ce..ceacda737e92670e2ec2b86ac83086eec6a5eda0 100644 --- a/scripts/regression_tests/wrap~_compatibility_bug.pd +++ b/scripts/regression_tests/wrap~_compatibility_bug.pd @@ -1,4 +1,4 @@ -#N canvas 78 98 647 470 12; +#N canvas 79 122 647 470 12; #X obj 18 15 inlet; #X obj 508 171 ../utils/sigtofloat~ wrap~; #X floatatom 508 200 5 0 0 0 - - -, f 5; diff --git a/scripts/utils/sigtofloat~.pd b/scripts/utils/sigtofloat~.pd index 91c1059ad76a855281b1e0e5b53749ed16a2c140..6fdc6302e30a8154bd9c29d1571eec33986ef475 100644 --- a/scripts/utils/sigtofloat~.pd +++ b/scripts/utils/sigtofloat~.pd @@ -1,6 +1,5 @@ -#N canvas 738 437 450 381 12; +#N canvas 739 461 450 381 12; #X obj 26 20 inlet; -#X obj 149 160 \$1; #X obj 149 134 sig~; #X obj 149 189 snapshot~; #X obj 26 76 t b b a b; @@ -14,15 +13,16 @@ float is converted to leftmost signal inlet. A single block is computed to generate the float output.; #X obj 149 218 outlet; -#X connect 0 0 4 0; -#X connect 1 0 3 0; -#X connect 2 0 1 0; -#X connect 3 0 12 0; -#X connect 4 0 8 0; -#X connect 4 1 7 0; -#X connect 4 2 2 0; -#X connect 4 3 5 0; -#X connect 5 0 6 0; +#X obj 149 160 \$@; +#X connect 0 0 3 0; +#X connect 1 0 12 0; +#X connect 2 0 11 0; +#X connect 3 0 7 0; +#X connect 3 1 6 0; +#X connect 3 2 1 0; +#X connect 3 3 4 0; +#X connect 4 0 5 0; +#X connect 7 0 8 0; +#X connect 7 1 2 0; #X connect 8 0 9 0; -#X connect 8 1 3 0; -#X connect 9 0 10 0; +#X connect 12 0 2 0;