/ File_as.hx:  ActionScript 3 "File" class, for Gnash.
//
// Generated by gen-as3.sh on: 20090515 by "rob". Remove this
// after any hand editing loosing changes.
//
//   Copyright (C) 2009 Free Software Foundation, Inc.
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
//

// This test case must be processed by CPP before compiling to include the
//  DejaGnu.hx header file for the testing framework support.

#if flash9
import flash.filesystem.File;
import flash.display.MovieClip;
#else
import flash.File;
import flash.MovieClip;
#end
import flash.Lib;
import Type;

// import our testing API
import DejaGnu;

// Class must be named with the _as suffix, as that's the same name as the file.
class File_as {
    static function main() {
        var x1:File = new File();

        // Make sure we actually get a valid class        
        if (x1 != null) {
            DejaGnu.pass("File class exists");
        } else {
            DejaGnu.fail("File 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.applicationDirectory == File) {
	    DejaGnu.pass("File.applicationDirectory property exists");
	} else {
	    DejaGnu.fail("File.applicationDirectory property doesn't exist");
	}
	if (x1.applicationStorageDirectory == File) {
	    DejaGnu.pass("File.applicationStorageDirectory property exists");
	} else {
	    DejaGnu.fail("File.applicationStorageDirectory property doesn't exist");
	}
	if (x1.desktopDirectory == File) {
	    DejaGnu.pass("File.desktopDirectory property exists");
	} else {
	    DejaGnu.fail("File.desktopDirectory property doesn't exist");
	}
	if (x1.documentsDirectory == File) {
	    DejaGnu.pass("File.documentsDirectory property exists");
	} else {
	    DejaGnu.fail("File.documentsDirectory property doesn't exist");
	}
	if (x1.exists == false) {
	    DejaGnu.pass("File.exists property exists");
	} else {
	    DejaGnu.fail("File.exists property doesn't exist");
	}
	if (x1.icon == Icon) {
	    DejaGnu.pass("File.icon property exists");
	} else {
	    DejaGnu.fail("File.icon property doesn't exist");
	}
	if (x1.isDirectory == false) {
	    DejaGnu.pass("File.isDirectory property exists");
	} else {
	    DejaGnu.fail("File.isDirectory property doesn't exist");
	}
	if (x1.isHidden == false) {
	    DejaGnu.pass("File.isHidden property exists");
	} else {
	    DejaGnu.fail("File.isHidden property doesn't exist");
	}
	if (x1.isPackage == false) {
	    DejaGnu.pass("File.isPackage property exists");
	} else {
	    DejaGnu.fail("File.isPackage property doesn't exist");
	}
	if (x1.isSymbolicLink == false) {
	    DejaGnu.pass("File.isSymbolicLink property exists");
	} else {
	    DejaGnu.fail("File.isSymbolicLink property doesn't exist");
	}
	if (x1.lineEnding == null) {
	    DejaGnu.pass("File.lineEnding property exists");
	} else {
	    DejaGnu.fail("File.lineEnding property doesn't exist");
	}
	if (x1.nativePath == null) {
	    DejaGnu.pass("File.nativePath property exists");
	} else {
	    DejaGnu.fail("File.nativePath property doesn't exist");
	}
	if (x1.parent == File) {
	    DejaGnu.pass("File.parent property exists");
	} else {
	    DejaGnu.fail("File.parent property doesn't exist");
	}
	if (x1.separator == null) {
	    DejaGnu.pass("File.separator property exists");
	} else {
	    DejaGnu.fail("File.separator property doesn't exist");
	}
	if (x1.spaceAvailable == 0) {
	    DejaGnu.pass("File.spaceAvailable property exists");
	} else {
	    DejaGnu.fail("File.spaceAvailable property doesn't exist");
	}
	if (x1.systemCharset == null) {
	    DejaGnu.pass("File.systemCharset property exists");
	} else {
	    DejaGnu.fail("File.systemCharset property doesn't exist");
	}
	if (x1.url == null) {
	    DejaGnu.pass("File.url property exists");
	} else {
	    DejaGnu.fail("File.url property doesn't exist");
	}
	if (x1.userDirectory == File) {
	    DejaGnu.pass("File.userDirectory property exists");
	} else {
	    DejaGnu.fail("File.userDirectory property doesn't exist");
	}

// 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.File == null) {
	    DejaGnu.pass("File::File() method exists");
	} else {
	    DejaGnu.fail("File::File() method doesn't exist");
	}
	if (x1.browseForDirectory == null) {
	    DejaGnu.pass("File::browseForDirectory() method exists");
	} else {
	    DejaGnu.fail("File::browseForDirectory() method doesn't exist");
	}
	if (x1.browseForOpen == null) {
	    DejaGnu.pass("File::browseForOpen() method exists");
	} else {
	    DejaGnu.fail("File::browseForOpen() method doesn't exist");
	}
	if (x1.browseForOpenMultiple == null) {
	    DejaGnu.pass("File::browseForOpenMultiple() method exists");
	} else {
	    DejaGnu.fail("File::browseForOpenMultiple() method doesn't exist");
	}
	if (x1.browseForSave == null) {
	    DejaGnu.pass("File::browseForSave() method exists");
	} else {
	    DejaGnu.fail("File::browseForSave() method doesn't exist");
	}
	if (x1.cancel == null) {
	    DejaGnu.pass("File::cancel() method exists");
	} else {
	    DejaGnu.fail("File::cancel() method doesn't exist");
	}
	if (x1.canonicalize == null) {
	    DejaGnu.pass("File::canonicalize() method exists");
	} else {
	    DejaGnu.fail("File::canonicalize() method doesn't exist");
	}
	if (x1.clone == File) {
	    DejaGnu.pass("File::clone() method exists");
	} else {
	    DejaGnu.fail("File::clone() method doesn't exist");
	}
	if (x1.copyTo == null) {
	    DejaGnu.pass("File::copyTo() method exists");
	} else {
	    DejaGnu.fail("File::copyTo() method doesn't exist");
	}
	if (x1.copyToAsync == null) {
	    DejaGnu.pass("File::copyToAsync() method exists");
	} else {
	    DejaGnu.fail("File::copyToAsync() method doesn't exist");
	}
	if (x1.createDirectory == null) {
	    DejaGnu.pass("File::createDirectory() method exists");
	} else {
	    DejaGnu.fail("File::createDirectory() method doesn't exist");
	}
	if (x1.createTempDirectory == File) {
	    DejaGnu.pass("File::createTempDirectory() method exists");
	} else {
	    DejaGnu.fail("File::createTempDirectory() method doesn't exist");
	}
	if (x1.createTempFile == File) {
	    DejaGnu.pass("File::createTempFile() method exists");
	} else {
	    DejaGnu.fail("File::createTempFile() method doesn't exist");
	}
	if (x1.deleteDirectory == null) {
	    DejaGnu.pass("File::deleteDirectory() method exists");
	} else {
	    DejaGnu.fail("File::deleteDirectory() method doesn't exist");
	}
	if (x1.deleteDirectoryAsync == null) {
	    DejaGnu.pass("File::deleteDirectoryAsync() method exists");
	} else {
	    DejaGnu.fail("File::deleteDirectoryAsync() method doesn't exist");
	}
	if (x1.deleteFile == null) {
	    DejaGnu.pass("File::deleteFile() method exists");
	} else {
	    DejaGnu.fail("File::deleteFile() method doesn't exist");
	}
	if (x1.deleteFileAsync == null) {
	    DejaGnu.pass("File::deleteFileAsync() method exists");
	} else {
	    DejaGnu.fail("File::deleteFileAsync() method doesn't exist");
	}
	if (x1.getDirectoryListing == 0) {
	    DejaGnu.pass("File::getDirectoryListing() method exists");
	} else {
	    DejaGnu.fail("File::getDirectoryListing() method doesn't exist");
	}
	if (x1.getDirectoryListingAsync == null) {
	    DejaGnu.pass("File::getDirectoryListingAsync() method exists");
	} else {
	    DejaGnu.fail("File::getDirectoryListingAsync() method doesn't exist");
	}
	if (x1.getRelativePath == null) {
	    DejaGnu.pass("File::getRelativePath() method exists");
	} else {
	    DejaGnu.fail("File::getRelativePath() method doesn't exist");
	}
	if (x1.getRootDirectories == 0) {
	    DejaGnu.pass("File::getRootDirectories() method exists");
	} else {
	    DejaGnu.fail("File::getRootDirectories() method doesn't exist");
	}
	if (x1.moveTo == null) {
	    DejaGnu.pass("File::moveTo() method exists");
	} else {
	    DejaGnu.fail("File::moveTo() method doesn't exist");
	}
	if (x1.moveToAsync == null) {
	    DejaGnu.pass("File::moveToAsync() method exists");
	} else {
	    DejaGnu.fail("File::moveToAsync() method doesn't exist");
	}
	if (x1.moveToTrash == null) {
	    DejaGnu.pass("File::moveToTrash() method exists");
	} else {
	    DejaGnu.fail("File::moveToTrash() method doesn't exist");
	}
	if (x1.moveToTrashAsync == null) {
	    DejaGnu.pass("File::moveToTrashAsync() method exists");
	} else {
	    DejaGnu.fail("File::moveToTrashAsync() method doesn't exist");
	}
	if (x1.resolvePath == File) {
	    DejaGnu.pass("File::resolvePath() method exists");
	} else {
	    DejaGnu.fail("File::resolvePath() method doesn't exist");
	}

        // Call this after finishing all tests. It prints out the totals.
        DejaGnu.done();
    }
}

// local Variables:
// mode: C++
// indent-tabs-mode: t
// End:

