gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] /srv/bzr/gnash/avm2 r9737: add geom test cases and Makefi


From: rob
Subject: [Gnash-commit] /srv/bzr/gnash/avm2 r9737: add geom test cases and Makefile fragment.
Date: Fri, 15 May 2009 17:57:40 -0600
User-agent: Bazaar (1.13.1)

------------------------------------------------------------
revno: 9737
committer: address@hidden
branch nick: avm2
timestamp: Fri 2009-05-15 17:57:40 -0600
message:
  add geom test cases and Makefile fragment.
modified:
  testsuite/as3/classes.all/Makefile.am
  testsuite/as3/classes.all/geom/ColorTransform_as3.hx
  testsuite/as3/classes.all/geom/Matrix_as3.hx
  testsuite/as3/classes.all/geom/Point_as3.hx
  testsuite/as3/classes.all/geom/Rectangle_as3.hx
  testsuite/as3/classes.all/geom/Transform_as3.hx
=== modified file 'testsuite/as3/classes.all/Makefile.am'
--- a/testsuite/as3/classes.all/Makefile.am     2009-05-15 23:43:50 +0000
+++ b/testsuite/as3/classes.all/Makefile.am     2009-05-15 23:57:40 +0000
@@ -52,7 +52,7 @@
 include $(srcdir)/external/external.am
 # include $(srcdir)/filesystem/filesystem.am
 # include $(srcdir)/filters/filters.am
-# include $(srcdir)/geom/geom.am
+include $(srcdir)/geom/geom.am
 # include $(srcdir)/html/html.am
 include $(srcdir)/media/media.am
 include $(srcdir)/net/net.am

=== modified file 'testsuite/as3/classes.all/geom/ColorTransform_as3.hx'
--- a/testsuite/as3/classes.all/geom/ColorTransform_as3.hx      2009-05-15 
23:28:45 +0000
+++ b/testsuite/as3/classes.all/geom/ColorTransform_as3.hx      2009-05-15 
23:57:40 +0000
@@ -70,7 +70,7 @@
        } else {
            DejaGnu.fail("ColorTransform.blueOffset property doesn't exist");
        }
-       if (x1.color == uint) {
+       if (x1.color == 0) {
            DejaGnu.pass("ColorTransform.color property exists");
        } else {
            DejaGnu.fail("ColorTransform.color property doesn't exist");
@@ -99,11 +99,6 @@
 // Tests to see if all the methods exist. All these do is test for
 // existance of a method, and don't test the functionality at all. This
 // is primarily useful only to test completeness of the API implementation.
-       if (x1.ColorTransform == 0) {
-           DejaGnu.pass("ColorTransform::ColorTransform() method exists");
-       } else {
-           DejaGnu.fail("ColorTransform::ColorTransform() method doesn't 
exist");
-       }
        if (x1.concat == null) {
            DejaGnu.pass("ColorTransform::concat() method exists");
        } else {

=== modified file 'testsuite/as3/classes.all/geom/Matrix_as3.hx'
--- a/testsuite/as3/classes.all/geom/Matrix_as3.hx      2009-05-15 23:28:45 
+0000
+++ b/testsuite/as3/classes.all/geom/Matrix_as3.hx      2009-05-15 23:57:40 
+0000
@@ -84,16 +84,11 @@
 // Tests to see if all the methods exist. All these do is test for
 // existance of a method, and don't test the functionality at all. This
 // is primarily useful only to test completeness of the API implementation.
-       if (x1.Matrix == 0) {
-           DejaGnu.pass("Matrix::Matrix() method exists");
-       } else {
-           DejaGnu.fail("Matrix::Matrix() method doesn't exist");
-       }
-       if (x1.clone == Matrix) {
-           DejaGnu.pass("Matrix::clone() method exists");
-       } else {
-           DejaGnu.fail("Matrix::clone() method doesn't exist");
-       }
+//     if (x1.clone == Matrix) {
+//         DejaGnu.pass("Matrix::clone() method exists");
+//     } else {
+//         DejaGnu.fail("Matrix::clone() method doesn't exist");
+//     }
        if (x1.concat == null) {
            DejaGnu.pass("Matrix::concat() method exists");
        } else {
@@ -109,11 +104,11 @@
        } else {
            DejaGnu.fail("Matrix::createGradientBox() method doesn't exist");
        }
-       if (x1.deltaTransformPoint == Point) {
-           DejaGnu.pass("Matrix::deltaTransformPoint() method exists");
-       } else {
-           DejaGnu.fail("Matrix::deltaTransformPoint() method doesn't exist");
-       }
+//     if (x1.deltaTransformPoint == Point) {
+//         DejaGnu.pass("Matrix::deltaTransformPoint() method exists");
+//     } else {
+//         DejaGnu.fail("Matrix::deltaTransformPoint() method doesn't exist");
+//     }
        if (x1.identity == null) {
            DejaGnu.pass("Matrix::identity() method exists");
        } else {
@@ -139,11 +134,11 @@
        } else {
            DejaGnu.fail("Matrix::toString() method doesn't exist");
        }
-       if (x1.transformPoint == Point) {
-           DejaGnu.pass("Matrix::transformPoint() method exists");
-       } else {
-           DejaGnu.fail("Matrix::transformPoint() method doesn't exist");
-       }
+//     if (x1.transformPoint == Point) {
+//         DejaGnu.pass("Matrix::transformPoint() method exists");
+//     } else {
+//         DejaGnu.fail("Matrix::transformPoint() method doesn't exist");
+//     }
        if (x1.translate == null) {
            DejaGnu.pass("Matrix::translate() method exists");
        } else {

=== modified file 'testsuite/as3/classes.all/geom/Point_as3.hx'
--- a/testsuite/as3/classes.all/geom/Point_as3.hx       2009-05-15 23:28:45 
+0000
+++ b/testsuite/as3/classes.all/geom/Point_as3.hx       2009-05-15 23:57:40 
+0000
@@ -69,36 +69,31 @@
 // Tests to see if all the methods exist. All these do is test for
 // existance of a method, and don't test the functionality at all. This
 // is primarily useful only to test completeness of the API implementation.
-       if (x1.Point == 0) {
-           DejaGnu.pass("Point::Point() method exists");
-       } else {
-           DejaGnu.fail("Point::Point() method doesn't exist");
-       }
-       if (x1.add == Point) {
-           DejaGnu.pass("Point::add() method exists");
-       } else {
-           DejaGnu.fail("Point::add() method doesn't exist");
-       }
-       if (x1.clone == Point) {
-           DejaGnu.pass("Point::clone() method exists");
-       } else {
-           DejaGnu.fail("Point::clone() method doesn't exist");
-       }
-       if (x1.distance == 0) {
-           DejaGnu.pass("Point::distance() method exists");
-       } else {
-           DejaGnu.fail("Point::distance() method doesn't exist");
-       }
-       if (x1.equals == false) {
-           DejaGnu.pass("Point::equals() method exists");
-       } else {
-           DejaGnu.fail("Point::equals() method doesn't exist");
-       }
-       if (x1.interpolate == Point) {
-           DejaGnu.pass("Point::interpolate() method exists");
-       } else {
-           DejaGnu.fail("Point::interpolate() method doesn't exist");
-       }
+//     if (x1.add == Point) {
+//         DejaGnu.pass("Point::add() method exists");
+//     } else {
+//         DejaGnu.fail("Point::add() method doesn't exist");
+//     }
+//     if (x1.clone == Point) {
+//         DejaGnu.pass("Point::clone() method exists");
+//     } else {
+//         DejaGnu.fail("Point::clone() method doesn't exist");
+//     }
+//     if (Point.distance == 0) {
+//         DejaGnu.pass("Point::distance() method exists");
+//     } else {
+//         DejaGnu.fail("Point::distance() method doesn't exist");
+//     }
+//     if (x1.equals == Point) {
+//         DejaGnu.pass("Point::equals() method exists");
+//     } else {
+//         DejaGnu.fail("Point::equals() method doesn't exist");
+//     }
+//     if (x1.interpolate == Point) {
+//         DejaGnu.pass("Point::interpolate() method exists");
+//     } else {
+//         DejaGnu.fail("Point::interpolate() method doesn't exist");
+//     }
        if (x1.normalize == null) {
            DejaGnu.pass("Point::normalize() method exists");
        } else {
@@ -109,16 +104,16 @@
        } else {
            DejaGnu.fail("Point::offset() method doesn't exist");
        }
-       if (x1.polar == Point) {
-           DejaGnu.pass("Point::polar() method exists");
-       } else {
-           DejaGnu.fail("Point::polar() method doesn't exist");
-       }
-       if (x1.subtract == Point) {
-           DejaGnu.pass("Point::subtract() method exists");
-       } else {
-           DejaGnu.fail("Point::subtract() method doesn't exist");
-       }
+//     if (x1.polar == Point) {
+//         DejaGnu.pass("Point::polar() method exists");
+//     } else {
+//         DejaGnu.fail("Point::polar() method doesn't exist");
+//     }
+//     if (x1.subtract == Point) {
+//         DejaGnu.pass("Point::subtract() method exists");
+//     } else {
+//         DejaGnu.fail("Point::subtract() method doesn't exist");
+//     }
        if (x1.toString == null) {
            DejaGnu.pass("Point::toString() method exists");
        } else {

=== modified file 'testsuite/as3/classes.all/geom/Rectangle_as3.hx'
--- a/testsuite/as3/classes.all/geom/Rectangle_as3.hx   2009-05-15 23:28:45 
+0000
+++ b/testsuite/as3/classes.all/geom/Rectangle_as3.hx   2009-05-15 23:57:40 
+0000
@@ -25,6 +25,7 @@
 
 #if flash9
 import flash.geom.Rectangle;
+import flash.geom.Point;
 import flash.display.MovieClip;
 #else
 import flash.Rectangle;
@@ -40,6 +41,7 @@
 class Rectangle_as3 {
     static function main() {
         var x1:Rectangle = new Rectangle();
+        var p1:Point = new Point();
 
         // Make sure we actually get a valid class        
         if (x1 != null) {
@@ -55,11 +57,11 @@
        } else {
            DejaGnu.fail("Rectangle.bottom property doesn't exist");
        }
-       if (x1.bottomRight == Point) {
-           DejaGnu.pass("Rectangle.bottomRight property exists");
-       } else {
-           DejaGnu.fail("Rectangle.bottomRight property doesn't exist");
-       }
+//     if (x1.bottomRight == Point) {
+//         DejaGnu.pass("Rectangle.bottomRight property exists");
+//     } else {
+//         DejaGnu.fail("Rectangle.bottomRight property doesn't exist");
+//     }
        if (x1.height == 0) {
            DejaGnu.pass("Rectangle.height property exists");
        } else {
@@ -75,21 +77,21 @@
        } else {
            DejaGnu.fail("Rectangle.right property doesn't exist");
        }
-       if (x1.size == Point) {
-           DejaGnu.pass("Rectangle.size property exists");
-       } else {
-           DejaGnu.fail("Rectangle.size property doesn't exist");
-       }
+//     if (x1.size == Point) {
+//         DejaGnu.pass("Rectangle.size property exists");
+//     } else {
+//         DejaGnu.fail("Rectangle.size property doesn't exist");
+//     }
        if (x1.top == 0) {
            DejaGnu.pass("Rectangle.top property exists");
        } else {
            DejaGnu.fail("Rectangle.top property doesn't exist");
        }
-       if (x1.topLeft == Point) {
-           DejaGnu.pass("Rectangle.topLeft property exists");
-       } else {
-           DejaGnu.fail("Rectangle.topLeft property doesn't exist");
-       }
+//     if (x1.topLeft == Point) {
+//         DejaGnu.pass("Rectangle.topLeft property exists");
+//     } else {
+//         DejaGnu.fail("Rectangle.topLeft property doesn't exist");
+//     }
        if (x1.width == 0) {
            DejaGnu.pass("Rectangle.width property exists");
        } else {
@@ -109,36 +111,37 @@
 // Tests to see if all the methods exist. All these do is test for
 // existance of a method, and don't test the functionality at all. This
 // is primarily useful only to test completeness of the API implementation.
-       if (x1.Rectangle == 0) {
-           DejaGnu.pass("Rectangle::Rectangle() method exists");
-       } else {
-           DejaGnu.fail("Rectangle::Rectangle() method doesn't exist");
-       }
-       if (x1.clone == Rectangle) {
-           DejaGnu.pass("Rectangle::clone() method exists");
-       } else {
-           DejaGnu.fail("Rectangle::clone() method doesn't exist");
-       }
-       if (x1.contains == false) {
+//     if (x1.Rectangle == 0) {
+//         DejaGnu.pass("Rectangle::Rectangle() method exists");
+//     } else {
+//         DejaGnu.fail("Rectangle::Rectangle() method doesn't exist");
+//     }
+//     if (x1.clone == Rectangle) {
+//         DejaGnu.pass("Rectangle::clone() method exists");
+//     } else {
+//         DejaGnu.fail("Rectangle::clone() method doesn't exist");
+//     }
+       if (x1.contains(1,0) == false) {
            DejaGnu.pass("Rectangle::contains() method exists");
        } else {
            DejaGnu.fail("Rectangle::contains() method doesn't exist");
        }
-       if (x1.containsPoint == false) {
+       
+       if (x1.containsPoint(p1) == false) {
            DejaGnu.pass("Rectangle::containsPoint() method exists");
        } else {
            DejaGnu.fail("Rectangle::containsPoint() method doesn't exist");
        }
-       if (x1.containsRect == false) {
+       if (x1.containsRect(x1) == false) {
            DejaGnu.pass("Rectangle::containsRect() method exists");
        } else {
            DejaGnu.fail("Rectangle::containsRect() method doesn't exist");
        }
-       if (x1.equals == false) {
-           DejaGnu.pass("Rectangle::equals() method exists");
-       } else {
-           DejaGnu.fail("Rectangle::equals() method doesn't exist");
-       }
+//     if (x1.equals == false) {
+//         DejaGnu.pass("Rectangle::equals() method exists");
+//     } else {
+//         DejaGnu.fail("Rectangle::equals() method doesn't exist");
+//     }
        if (x1.inflate == null) {
            DejaGnu.pass("Rectangle::inflate() method exists");
        } else {
@@ -149,17 +152,17 @@
        } else {
            DejaGnu.fail("Rectangle::inflatePoint() method doesn't exist");
        }
-       if (x1.intersection == Rectangle) {
-           DejaGnu.pass("Rectangle::intersection() method exists");
-       } else {
-           DejaGnu.fail("Rectangle::intersection() method doesn't exist");
-       }
-       if (x1.intersects == false) {
+//     if (x1.intersection == Rectangle) {
+//         DejaGnu.pass("Rectangle::intersection() method exists");
+//     } else {
+//         DejaGnu.fail("Rectangle::intersection() method doesn't exist");
+//     }
+       if (x1.intersects(x1) == false) {
            DejaGnu.pass("Rectangle::intersects() method exists");
        } else {
            DejaGnu.fail("Rectangle::intersects() method doesn't exist");
        }
-       if (x1.isEmpty == false) {
+       if (x1.isEmpty() == false) {
            DejaGnu.pass("Rectangle::isEmpty() method exists");
        } else {
            DejaGnu.fail("Rectangle::isEmpty() method doesn't exist");
@@ -184,11 +187,11 @@
        } else {
            DejaGnu.fail("Rectangle::toString() method doesn't exist");
        }
-       if (x1.union == Rectangle) {
-           DejaGnu.pass("Rectangle::union() method exists");
-       } else {
-           DejaGnu.fail("Rectangle::union() method doesn't exist");
-       }
+//     if (x1.union == Rectangle) {
+//         DejaGnu.pass("Rectangle::union() method exists");
+//     } else {
+//         DejaGnu.fail("Rectangle::union() method doesn't exist");
+//     }
 
         // Call this after finishing all tests. It prints out the totals.
         DejaGnu.done();

=== modified file 'testsuite/as3/classes.all/geom/Transform_as3.hx'
--- a/testsuite/as3/classes.all/geom/Transform_as3.hx   2009-05-15 23:28:45 
+0000
+++ b/testsuite/as3/classes.all/geom/Transform_as3.hx   2009-05-15 23:57:40 
+0000
@@ -24,6 +24,7 @@
 //  DejaGnu.hx header file for the testing framework support.
 
 #if flash9
+import flash.geom.ColorTransform;
 import flash.geom.Transform;
 import flash.display.MovieClip;
 #else
@@ -39,44 +40,43 @@
 // Class must be named with the _as3 suffix, as that's the same name as the 
file.
 class Transform_as3 {
     static function main() {
-        var x1:Transform = new Transform();
+//         var x1:Transform = new Transform();
 
-        // Make sure we actually get a valid class        
-        if (x1 != null) {
-            DejaGnu.pass("Transform class exists");
-        } else {
-            DejaGnu.fail("Transform class doesn't exist");
-        }
+//         // Make sure we actually get a valid class        
+//         if (x1 != null) {
+//             DejaGnu.pass("Transform class exists");
+//         } else {
+//             DejaGnu.fail("Transform class doesn't exist");
+//         }
 // Tests to see if all the properties exist. All these do is test for
 // existance of a property, and don't test the functionality at all. This
 // is primarily useful only to test completeness of the API implementation.
-       if (x1.colorTransform == colorTransform) {
-           DejaGnu.pass("Transform.colorTransform property exists");
-       } else {
-           DejaGnu.fail("Transform.colorTransform property doesn't exist");
-       }
-       if (x1.concatenatedColorTransform == concatenatedColorTransform) {
-           DejaGnu.pass("Transform.concatenatedColorTransform property 
exists");
-       } else {
-           DejaGnu.fail("Transform.concatenatedColorTransform property doesn't 
exist");
-       }
-       if (x1.concatenatedMatrix == Matrix) {
-           DejaGnu.pass("Transform.concatenatedMatrix property exists");
-       } else {
-           DejaGnu.fail("Transform.concatenatedMatrix property doesn't exist");
-       }
-       if (x1.matrix == Matrix) {
-           DejaGnu.pass("Transform.matrix property exists");
-       } else {
-           DejaGnu.fail("Transform.matrix property doesn't exist");
-       }
-       if (x1.pixelBounds == Rectangle) {
-           DejaGnu.pass("Transform.pixelBounds property exists");
-       } else {
-           DejaGnu.fail("Transform.pixelBounds property doesn't exist");
-       }
+//     if (x1.colorTransform == colorTransform) {
+//         DejaGnu.pass("Transform.colorTransform property exists");
+//     } else {
+//         DejaGnu.fail("Transform.colorTransform property doesn't exist");
+//     }
+//     if (x1.concatenatedColorTransform == concatenatedColorTransform) {
+//         DejaGnu.pass("Transform.concatenatedColorTransform property 
exists");
+//     } else {
+//         DejaGnu.fail("Transform.concatenatedColorTransform property doesn't 
exist");
+//     }
+//     if (x1.concatenatedMatrix == Matrix) {
+//         DejaGnu.pass("Transform.concatenatedMatrix property exists");
+//     } else {
+//         DejaGnu.fail("Transform.concatenatedMatrix property doesn't exist");
+//     }
+//     if (x1.matrix == Matrix) {
+//         DejaGnu.pass("Transform.matrix property exists");
+//     } else {
+//         DejaGnu.fail("Transform.matrix property doesn't exist");
+//     }
+//     if (x1.pixelBounds == Rectangle) {
+//         DejaGnu.pass("Transform.pixelBounds property exists");
+//     } else {
+//         DejaGnu.fail("Transform.pixelBounds property doesn't exist");
+//     }
 
-       if (x1.colorTransform == colorTransform) {
         // Call this after finishing all tests. It prints out the totals.
         DejaGnu.done();
     }


reply via email to

[Prev in Thread] Current Thread [Next in Thread]