aboutsummaryrefslogtreecommitdiff
path: root/generics
diff options
context:
space:
mode:
Diffstat (limited to 'generics')
-rw-r--r--generics/associative-test.pd30
-rw-r--r--generics/commutative-test.pd54
2 files changed, 54 insertions, 30 deletions
diff --git a/generics/associative-test.pd b/generics/associative-test.pd
new file mode 100644
index 0000000..14de122
--- /dev/null
+++ b/generics/associative-test.pd
@@ -0,0 +1,30 @@
+#N canvas 736 151 452 362 10;
+#X obj 40 15 inlet bang;
+#X obj 40 112 abs;
+#X obj 119 112 abs;
+#X obj 40 131 /;
+#X obj 40 150 t a a;
+#X obj 40 188 pack 0 0;
+#X obj 40 226 outlet;
+#X text 167 24 with tolerance 0;
+#X obj 40 169 <= 0;
+#X text 167 9 This test verifies that (1+2)+3=1+(2+3);
+#X msg 40 34 1 2 3;
+#X obj 40 93 associator +;
+#X obj 40 74 unpack 0 0 0;
+#X msg 40 207 list associative1 \$1 \$2 -;
+#X connect 0 0 10 0;
+#X connect 1 0 3 0;
+#X connect 2 0 3 1;
+#X connect 3 0 4 0;
+#X connect 4 0 8 0;
+#X connect 4 1 5 1;
+#X connect 5 0 13 0;
+#X connect 8 0 5 0;
+#X connect 10 0 12 0;
+#X connect 11 0 1 0;
+#X connect 11 1 2 0;
+#X connect 12 0 11 0;
+#X connect 12 1 11 1;
+#X connect 12 2 11 2;
+#X connect 13 0 6 0;
diff --git a/generics/commutative-test.pd b/generics/commutative-test.pd
index 54153e7..862bf82 100644
--- a/generics/commutative-test.pd
+++ b/generics/commutative-test.pd
@@ -1,35 +1,29 @@
-#N canvas 671 304 452 362 10;
+#N canvas 665 86 452 291 10;
#X obj 40 15 inlet bang;
-#X obj 40 129 unpack 0 0;
-#X obj 40 53 t a a;
-#X obj 70 72 +;
-#X obj 70 91 / 2;
-#X obj 33 172 abs;
-#X obj 70 110 abs;
-#X obj 33 191 /;
-#X obj 33 153 commutator +;
+#X obj 40 79 unpack 0 0;
+#X obj 33 122 abs;
+#X obj 33 151 /;
+#X obj 33 103 commutator +;
#X msg 40 34 1 3;
#X text 216 9 This test verifies that 1+3=3+1;
-#X obj 33 210 t a a;
-#X obj 33 248 pack 0 0;
-#X obj 33 286 outlet;
+#X obj 33 170 t a a;
+#X obj 33 208 pack 0 0;
+#X obj 33 246 outlet;
#X text 217 24 with tolerance 0;
-#X obj 33 229 <= 0;
-#X msg 33 267 list commutative1 \$1 \$2 -;
-#X connect 0 0 9 0;
-#X connect 1 0 8 0;
-#X connect 1 1 8 1;
-#X connect 2 0 1 0;
-#X connect 2 1 3 0;
-#X connect 3 0 4 0;
-#X connect 4 0 6 0;
-#X connect 5 0 7 0;
-#X connect 6 0 7 1;
+#X obj 33 189 <= 0;
+#X msg 33 227 list commutative1 \$1 \$2 -;
+#X obj 112 122 abs;
+#X connect 0 0 5 0;
+#X connect 1 0 4 0;
+#X connect 1 1 4 1;
+#X connect 2 0 3 0;
+#X connect 3 0 7 0;
+#X connect 4 0 2 0;
+#X connect 4 1 13 0;
+#X connect 5 0 1 0;
#X connect 7 0 11 0;
-#X connect 8 0 5 0;
-#X connect 9 0 2 0;
-#X connect 11 0 15 0;
-#X connect 11 1 12 1;
-#X connect 12 0 16 0;
-#X connect 15 0 12 0;
-#X connect 16 0 13 0;
+#X connect 7 1 8 1;
+#X connect 8 0 12 0;
+#X connect 11 0 8 0;
+#X connect 12 0 9 0;
+#X connect 13 0 3 1;