You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by jb...@apache.org on 2010/08/17 18:46:16 UTC
svn commit: r986387 - in /commons/sandbox/gsoc/2010/scxml-js/trunk/test:
conditional_transition/scripts/ event_system_properties/scripts/
in_predicate/scripts/ kitchen_sink/scripts/ parallel/scripts/
prefix_events/scripts/
Author: jbeard
Date: Tue Aug 17 16:46:16 2010
New Revision: 986387
URL: http://svn.apache.org/viewvc?rev=986387&view=rev
Log:
Updated unit tests not to use Array.map internally.
Modified:
commons/sandbox/gsoc/2010/scxml-js/trunk/test/conditional_transition/scripts/unitTest.js
commons/sandbox/gsoc/2010/scxml-js/trunk/test/event_system_properties/scripts/unitTest.js
commons/sandbox/gsoc/2010/scxml-js/trunk/test/in_predicate/scripts/unitTest.js
commons/sandbox/gsoc/2010/scxml-js/trunk/test/kitchen_sink/scripts/unitTest.js
commons/sandbox/gsoc/2010/scxml-js/trunk/test/parallel/scripts/unitTest.js
commons/sandbox/gsoc/2010/scxml-js/trunk/test/prefix_events/scripts/unitTest.js
Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/test/conditional_transition/scripts/unitTest.js
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/test/conditional_transition/scripts/unitTest.js?rev=986387&r1=986386&r2=986387&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/test/conditional_transition/scripts/unitTest.js (original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/test/conditional_transition/scripts/unitTest.js Tue Aug 17 16:46:16 2010
@@ -35,7 +35,14 @@ require.def( "test/conditional_transitio
sc.initialize();
},
runTest:function(){
- var $ = function(conf){return conf.map(function(s){return s.toString()})};
+ var $ = function(conf){
+ var toReturn = [];
+ for(var i=0; i<conf.length;i++){
+ var s = conf[i];
+ toReturn.push(s.toString())
+ }
+ return toReturn;
+ };
var conf0 = sc.getCurrentConfiguration();
console.log($(conf0));
Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/test/event_system_properties/scripts/unitTest.js
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/test/event_system_properties/scripts/unitTest.js?rev=986387&r1=986386&r2=986387&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/test/event_system_properties/scripts/unitTest.js (original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/test/event_system_properties/scripts/unitTest.js Tue Aug 17 16:46:16 2010
@@ -34,7 +34,14 @@ require.def( "test/event_system_properti
sc.initialize();
},
runTest:function(){
- var $ = function(conf){return conf.map(function(s){return s.toString()})};
+ var $ = function(conf){
+ var toReturn = [];
+ for(var i=0; i<conf.length;i++){
+ var s = conf[i];
+ toReturn.push(s.toString())
+ }
+ return toReturn;
+ };
//sanity tests
var conf0 = sc.getCurrentConfiguration();
Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/test/in_predicate/scripts/unitTest.js
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/test/in_predicate/scripts/unitTest.js?rev=986387&r1=986386&r2=986387&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/test/in_predicate/scripts/unitTest.js (original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/test/in_predicate/scripts/unitTest.js Tue Aug 17 16:46:16 2010
@@ -35,7 +35,14 @@ require.def( "test/in_predicate/scripts/
sc.initialize();
},
runTest:function(){
- var $ = function(conf){return conf.map(function(s){return s.toString()})};
+ var $ = function(conf){
+ var toReturn = [];
+ for(var i=0; i<conf.length;i++){
+ var s = conf[i];
+ toReturn.push(s.toString())
+ }
+ return toReturn;
+ };
//sanity tests
var conf0 = sc.getCurrentConfiguration();
Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/test/kitchen_sink/scripts/unitTest.js
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/test/kitchen_sink/scripts/unitTest.js?rev=986387&r1=986386&r2=986387&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/test/kitchen_sink/scripts/unitTest.js (original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/test/kitchen_sink/scripts/unitTest.js Tue Aug 17 16:46:16 2010
@@ -33,7 +33,14 @@ require.def( "test/kitchen_sink/scripts/
sc.initialize();
},
runTest:function(){
- var $ = function(conf){return conf.map(function(s){return s.toString()})};
+ var $ = function(conf){
+ var toReturn = [];
+ for(var i=0; i<conf.length;i++){
+ var s = conf[i];
+ toReturn.push(s.toString())
+ }
+ return toReturn;
+ };
var conf0 = sc.getCurrentConfiguration();
console.log($(conf0));
Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/test/parallel/scripts/unitTest.js
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/test/parallel/scripts/unitTest.js?rev=986387&r1=986386&r2=986387&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/test/parallel/scripts/unitTest.js (original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/test/parallel/scripts/unitTest.js Tue Aug 17 16:46:16 2010
@@ -35,7 +35,14 @@ require.def( "test/parallel/scripts/unit
sc.initialize();
},
runTest:function(){
- var $ = function(conf){return conf.map(function(s){return s.toString()})};
+ var $ = function(conf){
+ var toReturn = [];
+ for(var i=0; i<conf.length;i++){
+ var s = conf[i];
+ toReturn.push(s.toString())
+ }
+ return toReturn;
+ };
var conf0 = sc.getCurrentConfiguration();
console.log($(conf0));
Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/test/prefix_events/scripts/unitTest.js
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/test/prefix_events/scripts/unitTest.js?rev=986387&r1=986386&r2=986387&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/test/prefix_events/scripts/unitTest.js (original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/test/prefix_events/scripts/unitTest.js Tue Aug 17 16:46:16 2010
@@ -35,7 +35,14 @@ require.def( "test/prefix_events/scripts
sc.initialize();
},
runTest:function(){
- var $ = function(conf){return conf.map(function(s){return s.toString()})};
+ var $ = function(conf){
+ var toReturn = [];
+ for(var i=0; i<conf.length;i++){
+ var s = conf[i];
+ toReturn.push(s.toString())
+ }
+ return toReturn;
+ };
//sanity tests
var conf0 = sc.getCurrentConfiguration();