gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog testsuite/actionscript.all/Micr...


From: Benjamin Wolsey
Subject: [Gnash-commit] gnash ChangeLog testsuite/actionscript.all/Micr...
Date: Thu, 13 Mar 2008 17:25:39 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Benjamin Wolsey <bwy>   08/03/13 17:25:39

Modified files:
        .              : ChangeLog 
        testsuite/actionscript.all: Microphone.as 

Log message:
                * testsuite/actionscript.all/Microphone.as: more comprehensive 
tests
                  for the Microphone class.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.5905&r2=1.5906
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Microphone.as?cvsroot=gnash&r1=1.15&r2=1.16

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.5905
retrieving revision 1.5906
diff -u -b -r1.5905 -r1.5906
--- ChangeLog   13 Mar 2008 17:20:12 -0000      1.5905
+++ ChangeLog   13 Mar 2008 17:25:38 -0000      1.5906
@@ -1,3 +1,8 @@
+2008-03-13 Benjamin Wolsey <address@hidden>
+
+       * testsuite/actionscript.all/Microphone.as: more comprehensive tests
+         for the Microphone class.
+
 2008-03-13  Dossy Shiobara <address@hidden>
 
        * plugin/win32/: plugin.cpp (1.14), plugin.h (1.10): Use the

Index: testsuite/actionscript.all/Microphone.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/Microphone.as,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- testsuite/actionscript.all/Microphone.as    11 Mar 2008 19:31:47 -0000      
1.15
+++ testsuite/actionscript.all/Microphone.as    13 Mar 2008 17:25:39 -0000      
1.16
@@ -22,7 +22,7 @@
 // execute it like this gnash -1 -r 0 -v out.swf
 
 
-rcsid="$Id: Microphone.as,v 1.15 2008/03/11 19:31:47 strk Exp $";
+rcsid="$Id: Microphone.as,v 1.16 2008/03/13 17:25:39 bwy Exp $";
 #include "check.as"
 
 // There was no Microphone class in SWF5 or lower
@@ -35,6 +35,10 @@
 check_equals ( typeof(Microphone.prototype.setSilenceLevel), 'function' );
 check_equals ( typeof(Microphone.prototype.setUseEchoSuppression), 'function' 
);
 
+// Documented to be an array.
+xcheck ( Microphone.hasOwnProperty("names"));
+xcheck_equals (typeof (Microphone.names), 'object');
+
 // test the Microphone constuctor
 var microphoneObj = Microphone.get();
 xcheck_equals (typeof(microphoneObj), 'object');
@@ -57,8 +61,66 @@
 // test the Microphone::setUseEchoSuppression method
 xcheck_equals ( typeof(microphoneObj.setUseEchoSuppression), 'function' );
 
+/// Microphone properties
+
+xcheck_equals ( typeof(microphoneObj.activityLevel), 'number' );
+xcheck_equals ( typeof(microphoneObj.gain), 'number' );
+xcheck_equals ( typeof(microphoneObj.index), 'number' );
+xcheck_equals ( typeof(microphoneObj.muted), 'boolean' );
+xcheck_equals ( typeof(microphoneObj.name), 'string' );
+xcheck_equals ( typeof(microphoneObj.rate), 'number' );
+xcheck_equals ( typeof(microphoneObj.silenceTimeout), 'number' );
+// Documented to be boolean
+xcheck_equals ( typeof(microphoneObj.useEchoSuppression), 'number' );
+
+// Starting values // values before microphone is activated
+xcheck_equals ( microphoneObj.activityLevel, -1 );
+xcheck_equals ( microphoneObj.gain, 50 );
+xcheck_equals ( microphoneObj.index, 0 );
+xcheck_equals ( microphoneObj.muted, true );
+xcheck_equals ( microphoneObj.rate, 8 );
+xcheck_equals ( microphoneObj.silenceTimeout, 2000 );
+
+
+// Setting and getting
+
+microphoneObj.setGain(5);
+xcheck_equals (microphoneObj.gain, 5);
+
+microphoneObj.setSilenceLevel(16);
+xcheck_equals (microphoneObj.silenceLevel, 16);
+
+
+// 5, 8, 11, 22, or 44 documented...
+microphoneObj.setRate(1);
+xcheck_equals (microphoneObj.rate, 5);
+microphoneObj.setRate(7);
+xcheck_equals (microphoneObj.rate, 8);
+microphoneObj.setRate(10);
+xcheck_equals (microphoneObj.rate, 11);
+microphoneObj.setRate(15);
+xcheck_equals (microphoneObj.rate, 16);
+microphoneObj.setRate(17);
+xcheck_equals (microphoneObj.rate, 22);
+microphoneObj.setRate(27);
+xcheck_equals (microphoneObj.rate, 44);
+microphoneObj.setRate(34);
+xcheck_equals (microphoneObj.rate, 44);
+microphoneObj.setRate(1000000);
+xcheck_equals (microphoneObj.rate, 44);
+
+
+/// It's still a number, though.
+microphoneObj.setUseEchoSuppression(false);
+xcheck_equals (microphoneObj.useEchoSuppression, false);
+
+microphoneObj.setUseEchoSuppression(16);
+xcheck_equals (microphoneObj.useEchoSuppression, true);
+
 // listen to the microphone.
 _root.attachAudio(microphoneObj);
 
+
+
 #endif // OUTPUT_VERSION > 5
 totals();




reply via email to

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