"Fossies" - the Fresh Open Source Software Archive

Member "gnash-0.8.10/testsuite/misc-haxe.all/classes.all/accessibility/AccessibilityProperties_as.hx" (19 Jan 2012, 5041 Bytes) of package /linux/www/old/gnash-0.8.10.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) haXe source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 // AccessibilityProperties_as.hx:  ActionScript 3 "AccessibilityProperties" class, for Gnash.
    2 //
    3 // Generated by gen-as3.sh on: 20090514 by "rob". Remove this
    4 // after any hand editing loosing changes.
    5 //
    6 //   Copyright (C) 2009, 2010 Free Software Foundation, Inc.
    7 //
    8 // This program is free software; you can redistribute it and/or modify
    9 // it under the terms of the GNU General Public License as published by
   10 // the Free Software Foundation; either version 3 of the License, or
   11 // (at your option) any later version.
   12 //
   13 // This program is distributed in the hope that it will be useful,
   14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
   15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   16 // GNU General Public License for more details.
   17 //
   18 // You should have received a copy of the GNU General Public License
   19 // along with this program; if not, write to the Free Software
   20 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
   21 //
   22 
   23 // This test case must be processed by CPP before compiling to include the
   24 //  DejaGnu.hx header file for the testing framework support.
   25 
   26 #if flash9
   27 import flash.accessibility.AccessibilityProperties;
   28 import flash.display.MovieClip;
   29 #end
   30 import flash.Lib;
   31 import Type;
   32 import Std;
   33 
   34 // import our testing API
   35 import DejaGnu;
   36 
   37 // Class must be named with the _as suffix, as that's the same name as the file.
   38 class AccessibilityProperties_as {
   39     static function main() {
   40         #if !flash9
   41         DejaGnu.note("this is not applicable to this test case. in earlier versions of flash you should call flash.accessibility.updateproperties().");
   42         #end
   43         
   44         #if flash9
   45         var x1:AccessibilityProperties = new AccessibilityProperties();
   46 
   47         // Make sure we actually get a valid class        
   48         if (x1 != null) {
   49             DejaGnu.pass("AccessibilityProperties class exists");
   50         } else {
   51             DejaGnu.fail("AccessibilityProperties class doesn't exist");
   52         }
   53     // Tests to see if all the properties exist. All these do is test for
   54     // existance of a property, and don't test the functionality at all. This
   55     // is primarily useful only to test completeness of the API implementation.
   56     if ( untyped x1.hasOwnProperty('description') ) {
   57         DejaGnu.pass("AccessibilityProperties::description property exists");
   58     } else {
   59         DejaGnu.fail("AccessibilityProperties::description property doesn't exist");
   60     }
   61     if ( untyped __typeof__(x1.description) == 'string') {
   62         DejaGnu.pass("AccessibilityProperties.description is a string");
   63     } else {
   64         DejaGnu.fail("AccessibilityProperties.description is not a string");
   65     }
   66     
   67     if ( untyped x1.hasOwnProperty('forceSimple')) {
   68         DejaGnu.pass("AccessibilityProperties::forceSimple property exists");
   69     } else {
   70         DejaGnu.fail("AccessibilityProperties::forceSimple property doesn't exist");
   71     }
   72     if ( untyped __typeof__(x1.forceSimple) == 'boolean') {
   73         DejaGnu.pass("AccessibilityProperties.forceSimple is a boolean");
   74     } else {
   75         DejaGnu.fail("AccessibilityProperties.forceSimple is not a boolean");
   76     }
   77     
   78     if ( untyped x1.hasOwnProperty('name')) {
   79         DejaGnu.pass("AccessibilityProperties::name property exists");
   80     } else {
   81         DejaGnu.fail("AccessibilityProperties::name property doesn't exist");
   82     }
   83     if ( untyped __typeof__(x1.name) == 'string') {
   84         DejaGnu.pass("AccessibilityProperties.name is a string");
   85     } else {
   86         DejaGnu.fail("AccessibilityProperties.name is not a string");
   87     }
   88     
   89     if (untyped x1.hasOwnProperty('noAutoLabeling')) {
   90         DejaGnu.pass("AccessibilityProperties::noAutoLabeling property exists");
   91     } else {
   92         DejaGnu.fail("AccessibilityProperties::noAutoLabeling property doesn't exist");
   93     }
   94     if ( untyped __typeof__(x1.noAutoLabeling) == 'boolean') {
   95         DejaGnu.pass("AccessibilityProperties.noAutoLabeling is a boolean");
   96     } else {
   97         DejaGnu.fail("AccessibilityProperties.noAutoLabeling is not a boolean");
   98     }
   99     
  100     if (untyped x1.hasOwnProperty('shortcut')) {
  101         DejaGnu.pass("AccessibilityProperties::shortcut property exists");
  102     } else {
  103         DejaGnu.fail("AccessibilityProperties::shortcut property doesn't exist");
  104     }
  105     if (untyped __typeof__(x1.shortcut) == 'string') {
  106         DejaGnu.pass("AccessibilityProperties.shortcut is a string");
  107     } else {
  108         DejaGnu.fail("AccessibilityProperties.shortcut is not a string");
  109     }
  110     
  111     if (untyped x1.hasOwnProperty('silent')) {
  112         DejaGnu.pass("AccessibilityProperties::silent property exists");
  113     } else {
  114         DejaGnu.fail("AccessibilityProperties::silent property doesn't exist");
  115     }
  116     if (untyped __typeof__(x1.silent) == 'boolean') {
  117         DejaGnu.pass("AccessibilityProperties.silent is a boolean");
  118     } else {
  119         DejaGnu.fail("AccessibilityProperties.silent is not a boolean");
  120     }
  121     #end
  122         // Call this after finishing all tests. It prints out the totals.
  123         DejaGnu.done();
  124     }
  125 }
  126 
  127 // local Variables:
  128 // mode: C++
  129 // indent-tabs-mode: t
  130 // End:
  131