// URLStream_as.hx:  ActionScript 3 "URLStream" class, for Gnash.
//
// Generated by gen-as3.sh on: 20090514 by "rob". Remove this
// after any hand editing loosing changes.
//
//   Copyright (C) 2009, 2010 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.net.URLStream;
import flash.display.MovieClip;
#end
import flash.Lib;
import Type;
import Std;

// import our testing API
import DejaGnu;

// Class must be named with the _as suffix, as that's the same name as the file.
class URLStream_as {
    static function main() {
        #if !flash9
			DejaGnu.note("this test is not valid for this version of flash");
		#end
		#if flash9
// 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.
	//	var x1:URLStream = new URLStream();
	
	//if (Std.is(x1.bytesAvailable, Float)) {
	//    DejaGnu.pass("URLStream.bytesAvailable property exists");
	//} else {
	//    DejaGnu.fail("URLStream.bytesAvailable property doesn't exist");
	//}
	//if (Type.typeof(x1.connected) == ValueType.TBool) {
	//    DejaGnu.pass("URLStream.connected property exists");
	//} else {
	//    DejaGnu.fail("URLStream.connected property doesn't exist");
	//}
	//if (Std.is(x1.endian, String)) {
	//    DejaGnu.pass("URLStream.endian property exists");
	//} else {
	//    DejaGnu.fail("URLStream.endian property doesn't exist");
	//}
	//if (Std.is(x1.objectEncoding, Float)) {
	//    DejaGnu.pass("URLStream.objectEncoding property exists");
	//} else {
	//    DejaGnu.fail("URLStream.objectEncoding property doesn't exist");
	//}
	#end
#if !flash
// 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 (URLStream.close == null) {
	    DejaGnu.pass("URLStream::close() method exists");
	} else {
	    DejaGnu.fail("URLStream::close() method doesn't exist");
	}
	if (URLStream.load == null) {
	    DejaGnu.pass("URLStream::load() method exists");
	} else {
	    DejaGnu.fail("URLStream::load() method doesn't exist");
	}
// FIXME: these all return void
// 	if (URLStream.readBoolean == false) {
// 	    DejaGnu.pass("URLStream::readBoolean() method exists");
// 	} else {
// 	    DejaGnu.fail("URLStream::readBoolean() method doesn't exist");
// 	}
// 	if (URLStream.readByte == 0) {
// 	    DejaGnu.pass("URLStream::readByte() method exists");
// 	} else {
// 	    DejaGnu.fail("URLStream::readByte() method doesn't exist");
// 	}
// 	if (URLStream.readBytes == null) {
// 	    DejaGnu.pass("URLStream::readBytes() method exists");
// 	} else {
// 	    DejaGnu.fail("URLStream::readBytes() method doesn't exist");
// 	}
// 	if (URLStream.readDouble == 0) {
// 	    DejaGnu.pass("URLStream::readDouble() method exists");
// 	} else {
// 	    DejaGnu.fail("URLStream::readDouble() method doesn't exist");
// 	}
// 	if (URLStream.readFloat == 0) {
// 	    DejaGnu.pass("URLStream::readFloat() method exists");
// 	} else {
// 	    DejaGnu.fail("URLStream::readFloat() method doesn't exist");
// 	}
// 	if (URLStream.readInt == 0) {
// 	    DejaGnu.pass("URLStream::readInt() method exists");
// 	} else {
// 	    DejaGnu.fail("URLStream::readInt() method doesn't exist");
// 	}
// 	if (URLStream.readMultiByte == null) {
// 	    DejaGnu.pass("URLStream::readMultiByte() method exists");
// 	} else {
// 	    DejaGnu.fail("URLStream::readMultiByte() method doesn't exist");
// 	}
// 	if (URLStream.readObject == 0) {
// 	    DejaGnu.pass("URLStream::readObject() method exists");
// 	} else {
// 	    DejaGnu.fail("URLStream::readObject() method doesn't exist");
// 	}
// 	if (URLStream.readShort == 0) {
// 	    DejaGnu.pass("URLStream::readShort() method exists");
// 	} else {
// 	    DejaGnu.fail("URLStream::readShort() method doesn't exist");
// 	}
// 	if (URLStream.readUnsignedByte == 0) {
// 	    DejaGnu.pass("URLStream::readUnsignedByte() method exists");
// 	} else {
// 	    DejaGnu.fail("URLStream::readUnsignedByte() method doesn't exist");
// 	}
// 	if (URLStream.readUnsignedInt == 0) {
// 	    DejaGnu.pass("URLStream::readUnsignedInt() method exists");
// 	} else {
// 	    DejaGnu.fail("URLStream::readUnsignedInt() method doesn't exist");
// 	}
// 	if (URLStream.readUnsignedShort == 0) {
// 	    DejaGnu.pass("URLStream::readUnsignedShort() method exists");
// 	} else {
// 	    DejaGnu.fail("URLStream::readUnsignedShort() method doesn't exist");
// 	}
	if (URLStream.readUTF == null) {
	    DejaGnu.pass("URLStream::readUTF() method exists");
	} else {
	    DejaGnu.fail("URLStream::readUTF() method doesn't exist");
	}
	if (URLStream.readUTFBytes == null) {
	    DejaGnu.pass("URLStream::readUTFBytes() method exists");
	} else {
	    DejaGnu.fail("URLStream::readUTFBytes() method doesn't exist");
	}
	#end
        // Call this after finishing all tests. It prints out the totals.
        DejaGnu.done();
    }
}

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

