Tests: bcadd version 29

Function:
Description: Returns the sum of two arbitrary precision numbers.
Version:
Status: current
Date: 2012-03-16 19:41
Summary: Adding test that highlights treatment of commas.
Programmer: jj5
Tests
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
function bcadd_tests() {

  // API reference: http://docs.jquery.com/QUnit
  module( "bcadd" );

  test( "bcadd", function() {

    // note: bcadd won't add numbers with commas in them:
    equal( bcadd( '1,000', '1' ), '1' );

    ok( true, "all pass" );

  } );

}
[top]

Comments

There are no comments yet, be the first!

Please Login or Register to post comments.