// FileStream_as.hx:  ActionScript 3 "FileStream" 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.FileStream;
import flash.display.MovieClip;
#else
import flash.FileStream;
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 FileStream_as {
    static function main() {
        var x1:FileStream = new FileStream();

        // Make sure we actually get a valid class        
        if (x1 != null) {
            DejaGnu.pass("FileStream class exists");
        } else {
            DejaGnu.fail("FileStream 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.bytesAvailable == uint) {
	    DejaGnu.pass("FileStream.bytesAvailable property exists");
	} else {
	    DejaGnu.fail("FileStream.bytesAvailable property doesn't exist");
	}
	if (x1.endian == null) {
	    DejaGnu.pass("FileStream.endian property exists");
	} else {
	    DejaGnu.fail("FileStream.endian property doesn't exist");
	}
	if (x1.objectEncoding == uint) {
	    DejaGnu.pass("FileStream.objectEncoding property exists");
	} else {
	    DejaGnu.fail("FileStream.objectEncoding property doesn't exist");
	}
	if (x1.position == 0) {
	    DejaGnu.pass("FileStream.position property exists");
	} else {
	    DejaGnu.fail("FileStream.position property doesn't exist");
	}
	if (x1.readAhead == 0) {
	    DejaGnu.pass("FileStream.readAhead property exists");
	} else {
	    DejaGnu.fail("FileStream.readAhead 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.FileStream == FileStream) {
	    DejaGnu.pass("FileStream::FileStream() method exists");
	} else {
	    DejaGnu.fail("FileStream::FileStream() method doesn't exist");
	}
	if (x1.close == null) {
	    DejaGnu.pass("FileStream::close() method exists");
	} else {
	    DejaGnu.fail("FileStream::close() method doesn't exist");
	}
	if (x1.open == null) {
	    DejaGnu.pass("FileStream::open() method exists");
	} else {
	    DejaGnu.fail("FileStream::open() method doesn't exist");
	}
	if (x1.openAsync == null) {
	    DejaGnu.pass("FileStream::openAsync() method exists");
	} else {
	    DejaGnu.fail("FileStream::openAsync() method doesn't exist");
	}
	if (x1.readBoolean == false) {
	    DejaGnu.pass("FileStream::readBoolean() method exists");
	} else {
	    DejaGnu.fail("FileStream::readBoolean() method doesn't exist");
	}
	if (x1.readByte == 0) {
	    DejaGnu.pass("FileStream::readByte() method exists");
	} else {
	    DejaGnu.fail("FileStream::readByte() method doesn't exist");
	}
	if (x1.readBytes == null) {
	    DejaGnu.pass("FileStream::readBytes() method exists");
	} else {
	    DejaGnu.fail("FileStream::readBytes() method doesn't exist");
	}
	if (x1.readDouble == 0) {
	    DejaGnu.pass("FileStream::readDouble() method exists");
	} else {
	    DejaGnu.fail("FileStream::readDouble() method doesn't exist");
	}
	if (x1.readFloat == 0) {
	    DejaGnu.pass("FileStream::readFloat() method exists");
	} else {
	    DejaGnu.fail("FileStream::readFloat() method doesn't exist");
	}
	if (x1.readInt == 0) {
	    DejaGnu.pass("FileStream::readInt() method exists");
	} else {
	    DejaGnu.fail("FileStream::readInt() method doesn't exist");
	}
	if (x1.readMultiByte == null) {
	    DejaGnu.pass("FileStream::readMultiByte() method exists");
	} else {
	    DejaGnu.fail("FileStream::readMultiByte() method doesn't exist");
	}
	if (x1.readObject == *) {
	    DejaGnu.pass("FileStream::readObject() method exists");
	} else {
	    DejaGnu.fail("FileStream::readObject() method doesn't exist");
	}
	if (x1.readShort == 0) {
	    DejaGnu.pass("FileStream::readShort() method exists");
	} else {
	    DejaGnu.fail("FileStream::readShort() method doesn't exist");
	}
	if (x1.readUnsignedByte == 0) {
	    DejaGnu.pass("FileStream::readUnsignedByte() method exists");
	} else {
	    DejaGnu.fail("FileStream::readUnsignedByte() method doesn't exist");
	}
	if (x1.readUnsignedInt == 0) {
	    DejaGnu.pass("FileStream::readUnsignedInt() method exists");
	} else {
	    DejaGnu.fail("FileStream::readUnsignedInt() method doesn't exist");
	}
	if (x1.readUnsignedShort == 0) {
	    DejaGnu.pass("FileStream::readUnsignedShort() method exists");
	} else {
	    DejaGnu.fail("FileStream::readUnsignedShort() method doesn't exist");
	}
	if (x1.readUTF == null) {
	    DejaGnu.pass("FileStream::readUTF() method exists");
	} else {
	    DejaGnu.fail("FileStream::readUTF() method doesn't exist");
	}
	if (x1.readUTFBytes == null) {
	    DejaGnu.pass("FileStream::readUTFBytes() method exists");
	} else {
	    DejaGnu.fail("FileStream::readUTFBytes() method doesn't exist");
	}
	if (x1.truncate == null) {
	    DejaGnu.pass("FileStream::truncate() method exists");
	} else {
	    DejaGnu.fail("FileStream::truncate() method doesn't exist");
	}
	if (x1.writeBoolean == null) {
	    DejaGnu.pass("FileStream::writeBoolean() method exists");
	} else {
	    DejaGnu.fail("FileStream::writeBoolean() method doesn't exist");
	}
	if (x1.writeByte == null) {
	    DejaGnu.pass("FileStream::writeByte() method exists");
	} else {
	    DejaGnu.fail("FileStream::writeByte() method doesn't exist");
	}
	if (x1.writeBytes == null) {
	    DejaGnu.pass("FileStream::writeBytes() method exists");
	} else {
	    DejaGnu.fail("FileStream::writeBytes() method doesn't exist");
	}
	if (x1.writeDouble == null) {
	    DejaGnu.pass("FileStream::writeDouble() method exists");
	} else {
	    DejaGnu.fail("FileStream::writeDouble() method doesn't exist");
	}
	if (x1.writeFloat == null) {
	    DejaGnu.pass("FileStream::writeFloat() method exists");
	} else {
	    DejaGnu.fail("FileStream::writeFloat() method doesn't exist");
	}
	if (x1.writeInt == null) {
	    DejaGnu.pass("FileStream::writeInt() method exists");
	} else {
	    DejaGnu.fail("FileStream::writeInt() method doesn't exist");
	}
	if (x1.writeMultiByte == null) {
	    DejaGnu.pass("FileStream::writeMultiByte() method exists");
	} else {
	    DejaGnu.fail("FileStream::writeMultiByte() method doesn't exist");
	}
	if (x1.writeObject == null) {
	    DejaGnu.pass("FileStream::writeObject() method exists");
	} else {
	    DejaGnu.fail("FileStream::writeObject() method doesn't exist");
	}
	if (x1.writeShort == null) {
	    DejaGnu.pass("FileStream::writeShort() method exists");
	} else {
	    DejaGnu.fail("FileStream::writeShort() method doesn't exist");
	}
	if (x1.writeUnsignedInt == null) {
	    DejaGnu.pass("FileStream::writeUnsignedInt() method exists");
	} else {
	    DejaGnu.fail("FileStream::writeUnsignedInt() method doesn't exist");
	}
	if (x1.writeUTF == null) {
	    DejaGnu.pass("FileStream::writeUTF() method exists");
	} else {
	    DejaGnu.fail("FileStream::writeUTF() method doesn't exist");
	}
	if (x1.writeUTFBytes == null) {
	    DejaGnu.pass("FileStream::writeUTFBytes() method exists");
	} else {
	    DejaGnu.fail("FileStream::writeUTFBytes() 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:

