updated tests
authoradam <adam@megacz.com>
Sat, 11 Mar 2006 11:05:59 +0000 (11:05 +0000)
committeradam <adam@megacz.com>
Sat, 11 Mar 2006 11:05:59 +0000 (11:05 +0000)
darcs-hash:20060311110559-5007d-9f985229684e88d62e83efdcb654c204d3c68438.gz

tests/rotate.t [new file with mode: 0644]
tests/test.t [new file with mode: 0644]
tests/test2.t

diff --git a/tests/rotate.t b/tests/rotate.t
new file mode 100644 (file)
index 0000000..570edda
--- /dev/null
@@ -0,0 +1,40 @@
+<ibex xmlns:ui="ibex://ui">
+    <ui:box minwidth="300" minheight="300" fill="blue" align="center" cols="3">
+        ibex.log.warn("foog!");
+        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) + ")";
+             rot += 1;
+       } }
+
+        <ui:box fill="orange" colspan="2" minwidth="200" minheight="100" id="top"> 
+<ui:box fill="green" width="100" height="18">
+<!--
+            <ui:box stroke="black" strokecolor="black" height="18" width="100" text="booya"/>
+-->
+</ui:box>
+
+        </ui:box>
+        <ui:box fill="green" rowspan="2" minwidth="100" id="foo"/>
+        <ui:box fill="red" minwidth="50" minheight="80" />
+        <ui:box fill="pink" cols="5" height="80">
+            <ui:box height="10" colspan="5"/>
+            <ui:box width="10"/>
+            <ui:box height="10" fill="white" maxwidth="100"/>
+            <ui:box height="10" fill="black" colspan="2" minwidth="100"/>
+            <ui:box width="10"/>
+        </ui:box>
+        <ui:box fill="purple" minwidth="70" minheight="50">
+            <ui:box shrink="true" fill="yellow" align="center" id="top">
+                <ui:box width="100" height="50" fill="red" id="bot"/>
+            </ui:box>
+        </ui:box>
+        <ui:box fill="yellow" colspan="2"/>
+    </ui:box>
+</ibex>
diff --git a/tests/test.t b/tests/test.t
new file mode 100644 (file)
index 0000000..162aa96
--- /dev/null
@@ -0,0 +1,17 @@
+<ibex xmlns:ui="ibex://ui">
+    <ui:box width="300" height="300" fill="red" axis="z">
+        ibex.ui.frame = thisbox;
+
+        <ui:box fill="blue" width="50" height="50" x="100" y="100" id="blue" axis="z"/>
+
+        // this thread makes things spin.
+        var rot = 0;
+        ibex.thread = function(f) { while(true) {
+             ibex.thread.sleep(100);
+             $blue.transform = "rotate(" + rot + ")";
+             $blue.x = 100;
+             $blue.y = 100;
+             rot += 5;
+       } }
+    </ui:box>
+</ibex>
index 3dcc5e3..ce02efb 100644 (file)
@@ -1,23 +1,20 @@
 <ibex xmlns:ui="ibex://ui">
     <ui:box width="300" height="300" packed="false">
         ibex.ui.frame = thisbox;
-
+<!--
         <ui:box fill="red" width="50" height="50" id="red" x="100" y="100" packed="false"/>
+-->
 
         // 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;
+             ibex.thread.sleep(100);
+             if (ibex.math.floor(rot / 90) == rot / 90)
+               $top.transform = "rotate(" + rot + ")";
+             $bot.transform = "rotate(" + (-2 * rot) + ")";
+             rot += 5;
        } }
-<!--
+<ui:box fill="green" shrink="true" packed="false" align="center" x="150" y="150">
         <ui:box fill="orange" colspan="2" minwidth="200" minheight="100" id="top" x="200" y="200"> 
             <ui:box fill="green" width="100" height="18">
                 <ui:box stroke="black" strokecolor="black" height="18" width="100" text="booya"/>
@@ -38,6 +35,6 @@
             </ui:box>
         </ui:box>
         <ui:box fill="yellow" colspan="2"/>
--->
+</ui:box>
     </ui:box>
 </ibex>