Changeset 8038

Show
Ignore:
Timestamp:
04/10/07 18:18:32 (21 months ago)
Author:
peller
Message:

Port unit tests for number and currency. Refs #2719

Location:
dojo/trunk
Files:
2 added
3 modified

Legend:

Unmodified
Added
Removed
  • dojo/trunk/currency.js

    r8028 r8038  
    1616        var iso = options.currency; 
    1717        var data = dojo.cldr.monetary.getData(iso); 
    18         dojo.lang.mixin(data, bundle[iso] || {}); 
     18        dojo.mixin(data, bundle[iso] || {}); 
    1919 
    2020        // Mixin with provided options 
    21         return dojo.lang.mixin(data, options); 
     21        return dojo.mixin(data, options); 
    2222} 
    2323 
  • dojo/trunk/string.js

    r8028 r8038  
    11dojo.provide("dojo.string"); 
    22 
    3 dojo.string.pad = function(/*String*/text, /*int*/size, /*String?*/ch, /*boolean?*/end) { 
     3dojo.string.pad = function(/*String*/text, /*int*/size, /*String?*/ch, /*boolean?*/end){ 
    44        // summary: 
    55        //      Pad a string to guarantee that it is at least 'size' length by filling with the character 'c' at either the  
     
    1111 
    1212        var out = String(text); 
    13         if(!ch) { 
     13        if(!ch){ 
    1414                ch = '0'; 
    1515        } 
    16         while(out.length < size) { 
    17                 if(!dir) { 
     16        while(out.length < size){ 
     17                if(end){ 
     18                        out += ch; 
     19                }else{ 
    1820                        out = ch + out; 
    19                 } else { 
    20                         out += ch; 
    2121                } 
    2222        } 
  • dojo/trunk/tests/_base.js

    r8029 r8038  
    122122        dojo.require("tests._base.Deferred"); 
    123123        dojo.require("tests._base.json"); 
    124         dojo.require("tests._base.xhr"); 
    125124        // FIXME: add test includes for the rest of the Dojo Base groups here 
    126         dojo.require("tests.i18n"); //FIXME does not belong here in _base 
    127         dojo.require("tests.data"); //FIXME does not belong here in _base 
    128125        dojo.requireIf(dojo.isBrowser, "tests._base.html"); 
    129126        dojo.requireIf(dojo.isBrowser, "tests._base.fx"); 
    130127        dojo.requireIf(dojo.isBrowser, "tests._base.query"); 
    131128        dojo.requireIf(dojo.isBrowser, "tests._base.xhr"); 
     129 
     130//FIXME the following do not belong here in _base.js - create a separate module? 
     131        dojo.require("tests.i18n");  
     132        dojo.require("tests.data"); 
     133        dojo.require("tests.number"); 
     134        dojo.require("tests.currency"); 
    132135}catch(e){ 
    133136        tests.debug(e);