aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorN.N. <matju@users.sourceforge.net>2005-12-31 18:44:54 +0000
committerN.N. <matju@users.sourceforge.net>2005-12-31 18:44:54 +0000
commitffbfad84037271db59e3253446e3889addfbbe6c (patch)
treebd660bd13a3039c7579f2c42059df0d295d4c38a
parent202b487520c16bf9c1c51b47fab158323f6fe016 (diff)
.
svn path=/trunk/abstractions/pureunity/; revision=4331
-rw-r--r--ChangeLog7
-rw-r--r--Makefile4
-rw-r--r--README10
-rw-r--r--TODO8
-rw-r--r--generics/associative-test.pd20
-rw-r--r--generics/commutative-test.pd31
-rw-r--r--generics/distributive-test.pd30
-rw-r--r--generics/invertible-test.pd15
-rw-r--r--main.pd2
-rw-r--r--specifics/arith-test.pd63
10 files changed, 146 insertions, 44 deletions
diff --git a/ChangeLog b/ChangeLog
index ed3454d..ccf3d3b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,8 +1,9 @@
-$Id: ChangeLog,v 1.1 2005-12-31 17:01:26 matju Exp $
+$Id: ChangeLog,v 1.2 2005-12-31 18:44:54 matju Exp $
version 0.1:
* LICENSE is GPL
* README
- * [commutator], [commutative-test]
- * [associator], [associative-test]
+ * [commutator], [commutative-test]
+ * [associator], [associative-test]
+ * [invertor], [invertible-test]
* [distributor], [distributive-test]
diff --git a/Makefile b/Makefile
index 7eccd76..5045335 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
-# PD = /home/matju/pd_0_38_4/bin/pd -noaudio
-PD = pd
+PD = /home/matju/pd_0_38_4/bin/pd -noaudio
+#PD = pd
PDFLAGS = -noaudio -path generics -path specifics
test::
diff --git a/README b/README
index 284d77d..56b4e2f 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-$Id: README,v 1.4 2005-12-31 02:50:12 matju Exp $
+$Id: README,v 1.5 2005-12-31 18:44:54 matju Exp $
PureUnity
@@ -50,8 +50,6 @@ TEST PROTOCOL
outlet 0:
test results. a sequence of lists like:
list $name $passed? $accuracy $elapsed
- for example:
- list
where:
$name is a symbol
@@ -61,6 +59,12 @@ TEST PROTOCOL
$elapsed is a float, the time elapsed in milliseconds
or it is the symbol "-" if not measured.
+ for example:
+ list commutative1 1 0 -
+
+ Which means that the 1st test about commutativity passed ($2=1) because it
+ was perfectly accurate ($3==0) and that we didn't measure the time ($4=-).
+
+-+-+--+---+-----+--------+-------------+---------------------+
SEVERITIES (in decreasing order)
diff --git a/TODO b/TODO
index 1fd8ed7..6986cdd 100644
--- a/TODO
+++ b/TODO
@@ -1,5 +1,7 @@
-$Id: TODO,v 1.1 2005-12-31 17:01:26 matju Exp $
+$Id: TODO,v 1.2 2005-12-31 18:44:54 matju Exp $
TODO:
- * [invertor], [invertible-test]
- * \ No newline at end of file
+ * benchmark
+ * signals
+ * grids
+ * norms \ No newline at end of file
diff --git a/generics/associative-test.pd b/generics/associative-test.pd
index 14de122..71d6852 100644
--- a/generics/associative-test.pd
+++ b/generics/associative-test.pd
@@ -1,7 +1,7 @@
#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 126 112 abs;
#X obj 40 131 /;
#X obj 40 150 t a a;
#X obj 40 188 pack 0 0;
@@ -10,21 +10,21 @@
#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 obj 40 93 associator \$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 5 0 12 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;
+#X connect 10 0 11 0;
+#X connect 11 0 13 0;
+#X connect 11 1 13 1;
+#X connect 11 2 13 2;
+#X connect 12 0 6 0;
+#X connect 13 0 1 0;
+#X connect 13 1 2 0;
diff --git a/generics/commutative-test.pd b/generics/commutative-test.pd
index 862bf82..559b3bf 100644
--- a/generics/commutative-test.pd
+++ b/generics/commutative-test.pd
@@ -1,29 +1,30 @@
-#N canvas 665 86 452 291 10;
+#N canvas 380 66 452 291 10;
#X obj 40 15 inlet bang;
#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 170 t a a;
#X obj 33 208 pack 0 0;
#X obj 33 246 outlet;
-#X text 217 24 with tolerance 0;
+#X text 217 44 with tolerance 0;
#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 obj 119 122 abs;
+#X text 218 23 and 1*3=3*1 and...;
+#X obj 33 103 commutator \$2;
+#X connect 0 0 4 0;
+#X connect 1 0 14 0;
+#X connect 1 1 14 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 3 0 6 0;
+#X connect 4 0 1 0;
+#X connect 6 0 10 0;
+#X connect 6 1 7 1;
#X connect 7 0 11 0;
-#X connect 7 1 8 1;
-#X connect 8 0 12 0;
+#X connect 10 0 7 0;
#X connect 11 0 8 0;
-#X connect 12 0 9 0;
-#X connect 13 0 3 1;
+#X connect 12 0 3 1;
+#X connect 14 0 2 0;
+#X connect 14 1 12 0;
diff --git a/generics/distributive-test.pd b/generics/distributive-test.pd
new file mode 100644
index 0000000..202e1aa
--- /dev/null
+++ b/generics/distributive-test.pd
@@ -0,0 +1,30 @@
+#N canvas 665 86 452 291 10;
+#X obj 40 15 inlet bang;
+#X obj 37 122 abs;
+#X obj 37 151 /;
+#X obj 37 170 t a a;
+#X obj 37 208 pack 0 0;
+#X obj 37 246 outlet;
+#X text 157 24 with tolerance 0;
+#X obj 37 189 <= 0;
+#X obj 130 122 abs;
+#X text 156 9 This test verifies that 3*(4+5)=3*4+3*5;
+#X msg 40 34 3 4 5;
+#X obj 40 82 unpack 0 0 0;
+#X msg 37 227 list distributive1 \$1 \$2 -;
+#X obj 37 103 distributor \$2;
+#X connect 0 0 10 0;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 3 0 7 0;
+#X connect 3 1 4 1;
+#X connect 4 0 12 0;
+#X connect 7 0 4 0;
+#X connect 8 0 2 1;
+#X connect 10 0 11 0;
+#X connect 11 0 13 0;
+#X connect 11 1 13 1;
+#X connect 11 2 13 2;
+#X connect 12 0 5 0;
+#X connect 13 0 1 0;
+#X connect 13 1 8 0;
diff --git a/generics/invertible-test.pd b/generics/invertible-test.pd
index c488895..2253ff4 100644
--- a/generics/invertible-test.pd
+++ b/generics/invertible-test.pd
@@ -9,20 +9,21 @@
#X obj 33 246 outlet;
#X text 217 24 with tolerance 0;
#X obj 33 189 <= 0;
-#X obj 112 122 abs;
-#X obj 33 103 invertor + -;
+#X obj 126 122 abs;
#X text 215 9 This test verifies that 1+3-3=1;
#X msg 33 227 list invertible1 \$1 \$2 -;
+#X obj 33 103 invertor \$2 \$3;
#X connect 0 0 4 0;
-#X connect 1 0 11 0;
-#X connect 1 1 11 1;
+#X connect 1 0 13 0;
+#X connect 1 1 13 1;
#X connect 2 0 3 0;
#X connect 3 0 5 0;
#X connect 4 0 1 0;
#X connect 5 0 9 0;
#X connect 5 1 6 1;
-#X connect 6 0 13 0;
+#X connect 6 0 12 0;
#X connect 9 0 6 0;
#X connect 10 0 3 1;
-#X connect 11 0 2 0;
-#X connect 13 0 7 0;
+#X connect 12 0 7 0;
+#X connect 13 0 2 0;
+#X connect 13 1 10 0;
diff --git a/main.pd b/main.pd
index 8ec44d5..2c9f9c6 100644
--- a/main.pd
+++ b/main.pd
@@ -1,2 +1,2 @@
#N canvas 173 216 450 300 10;
-#X obj 30 20 arith-test;
+#X obj 30 20 arith-test f;
diff --git a/specifics/arith-test.pd b/specifics/arith-test.pd
new file mode 100644
index 0000000..3136228
--- /dev/null
+++ b/specifics/arith-test.pd
@@ -0,0 +1,63 @@
+#N canvas 365 120 687 494 10;
+#X text 18 12 This is the testclass for + \, - \, * \, / \, % \, mod
+\, ^ \, & \, |;
+#X text 78 136 Abelian Groups:;
+#X text 80 229 Abelian Monoids:;
+#X text 79 299 Rings (incl Fields):;
+#X obj 134 87 r \$0-b;
+#X obj 299 87 r \$0-b;
+#X obj 450 87 r \$0-b;
+#X obj 16 59 s \$0-b;
+#X obj 16 40 inlet bang;
+#X obj 14 414 r \$0-r;
+#X obj 14 433 outlet reports;
+#X obj 134 406 s \$0-r;
+#X obj 299 406 s \$0-r;
+#X obj 450 406 s \$0-r;
+#X obj 134 157 commutative-test \$1 +;
+#X obj 134 177 commutative-test \$1 *;
+#X obj 134 197 commutative-test \$1 ^;
+#X obj 134 247 commutative-test \$1 &;
+#X obj 134 267 commutative-test \$1 |;
+#X obj 134 317 distributive-test \$1 + *;
+#X obj 134 337 distributive-test \$1 ^ &;
+#X obj 299 247 associative-test \$1 &;
+#X obj 299 267 associative-test \$1 |;
+#X obj 299 157 associative-test \$1 +;
+#X obj 299 177 associative-test \$1 *;
+#X obj 299 197 associative-test \$1 ^;
+#X obj 450 197 invertible-test \$1 ^ ^;
+#X obj 450 177 invertible-test \$1 * /;
+#X obj 450 157 invertible-test \$1 + -;
+#X connect 4 0 14 0;
+#X connect 4 0 15 0;
+#X connect 4 0 16 0;
+#X connect 4 0 17 0;
+#X connect 4 0 18 0;
+#X connect 4 0 19 0;
+#X connect 4 0 20 0;
+#X connect 5 0 21 0;
+#X connect 5 0 22 0;
+#X connect 5 0 23 0;
+#X connect 5 0 24 0;
+#X connect 5 0 25 0;
+#X connect 6 0 26 0;
+#X connect 6 0 27 0;
+#X connect 6 0 28 0;
+#X connect 8 0 7 0;
+#X connect 9 0 10 0;
+#X connect 14 0 11 0;
+#X connect 15 0 11 0;
+#X connect 16 0 11 0;
+#X connect 17 0 11 0;
+#X connect 18 0 11 0;
+#X connect 19 0 11 0;
+#X connect 20 0 11 0;
+#X connect 21 0 12 0;
+#X connect 22 0 12 0;
+#X connect 23 0 12 0;
+#X connect 24 0 12 0;
+#X connect 25 0 12 0;
+#X connect 26 0 13 0;
+#X connect 27 0 13 0;
+#X connect 28 0 13 0;