Ticket #992: applyDefaults_return.patch
| File applyDefaults_return.patch, 1.4 kB (added by fredj, 1 year ago) |
|---|
-
lib/OpenLayers/Util.js
old new 501 501 to[key] = from[key]; 502 502 } 503 503 } 504 return to; 504 505 }; 505 506 506 507 /** -
tests/test_Util.html
old new 136 136 137 137 function test_06_Util_applyDefaults(t) { 138 138 139 t.plan( 4);139 t.plan(8); 140 140 141 141 var to = { 142 142 'a': "abra", … … 154 154 t.eq( to["a"], "abra", "key present in to but not from maintained"); 155 155 t.eq( to["b"], "blorg", "key present in to and from, maintained in to"); 156 156 t.eq( to["c"], "press", "key present in from and not to successfully copied to to"); 157 158 var ret = OpenLayers.Util.applyDefaults({'a': "abra",'b': "blorg"}, from); 159 t.ok( ret instanceof Object, " applyDefaults returns an object"); 160 t.eq( ret["a"], "abra", "key present in ret but not from maintained"); 161 t.eq( ret["b"], "blorg", "key present in ret and from, maintained in ret"); 162 t.eq( ret["c"], "press", "key present in from and not ret successfully copied to ret"); 157 163 } 158 164 159 165 function test_07_Util_getParameterString(t) {
