From: adam Date: Sat, 11 Mar 2006 10:26:41 +0000 (+0000) Subject: added some tests X-Git-Url: http://git.megacz.com/?p=org.ibex.core.git;a=commitdiff_plain;h=2c4578ad79d2717dd749b51d682b6f8bff5a4c54 added some tests darcs-hash:20060311102641-5007d-cc694c7700258791aafacb220345575e0276617d.gz --- diff --git a/tests/better.t b/tests/better.t new file mode 100644 index 0000000..2ce0f5e --- /dev/null +++ b/tests/better.t @@ -0,0 +1,17 @@ + + + ibex.ui.frame = thisbox; + + + + + + + + + + + + + + diff --git a/tests/goat.t b/tests/goat.t new file mode 100644 index 0000000..80f0c35 --- /dev/null +++ b/tests/goat.t @@ -0,0 +1,108 @@ + + + ibex.ui.frame = thisbox; + + + // this thread makes things spin. + var rot = 0; + ibex.thread = function(f) { while(true) { + ibex.thread.yield(); + $top.transform = "rotate(" + rot + ")"; + rot += 1; + //ibex.log.warn("rotate " + rot); + } } + + + + + + + + + + + + + + + + + +//ibex.log.error($yermom.path); + + + + + + + + + + + + + + + + + + diff --git a/tests/main.t b/tests/main.t new file mode 100644 index 0000000..c34797c --- /dev/null +++ b/tests/main.t @@ -0,0 +1,26 @@ + + + + // make this box a top-level window + ibex.ui.frame = thisbox; + + // this thread makes things spin. + var rot = 0; + ibex.thread = function(f) { + while(true) { + $lam.transform = "rotate(" + (-2 * rot) + ")"; + rot += 1; + ibex.thread.yield(); + } + } + + // an example of texturing a box; this also demonstrates a + // box that shrinks to the size of the path drawn inside it. + + + + + + + + diff --git a/tests/mux.t b/tests/mux.t new file mode 100644 index 0000000..2156f0f --- /dev/null +++ b/tests/mux.t @@ -0,0 +1,9 @@ + + + var waiter = function() { + if (width==0 || height==0) { ibex.log.warn("wait"); ibex.thread = waiter; return; } + path = "M0,"+height+"H"+width+"L"+(width-(2/3)*height)+",0H"+height*(2/3)+"z"; + } + ibex.thread = waiter; + + \ No newline at end of file diff --git a/tests/test2.t b/tests/test2.t new file mode 100644 index 0000000..3dcc5e3 --- /dev/null +++ b/tests/test2.t @@ -0,0 +1,43 @@ + + + ibex.ui.frame = thisbox; + + + + // this thread makes things spin. + var rot = 0; + ibex.thread = function(f) { while(true) { + ibex.thread.yield(); +// if (ibex.math.floor(rot / 90) == rot / 90) +// $top.transform = "rotate(" + rot + ")"; +// $bot.transform = "rotate(" + (-2 * rot) + ")"; + $red.fill = "red"; + ibex.thread.yield(); + $red.fill = "green"; + ibex.thread.yield(); + rot += 1; + } } + + + diff --git a/tests/test3.t b/tests/test3.t new file mode 100644 index 0000000..e69deb1 --- /dev/null +++ b/tests/test3.t @@ -0,0 +1,105 @@ + + + ibex.ui.frame = thisbox; + + + // this thread makes things spin. + var rot = 0; + ibex.thread = function(f) { while(true) { + ibex.thread.yield(); + $top.transform = "rotate(" + rot + ")"; + rot += 1; + } } + + + + + + + + + + + + + + + + +//ibex.log.error($yermom.path); + + + + + + + + + + + + + + + + +