<?php
namespace ccxt;

// ----------------------------------------------------------------------------

// PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
// https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code

// -----------------------------------------------------------------------------


function test_number_to_string() {
    $exchange = new \ccxt\Exchange(array(
        'id' => 'regirock',
    ));
    // ----------------------------------------------------------------------------
    // numberToString
    assert($exchange->number_to_string(-7.8e-7) === '-0.00000078');
    assert($exchange->number_to_string(7.8e-7) === '0.00000078');
    assert($exchange->number_to_string(-0.0000017805) === '-0.0000017805');
    assert($exchange->number_to_string(0.0000017805) === '0.0000017805');
    assert($exchange->number_to_string(-7.0005e+27) === '-7000500000000000000000000000');
    assert($exchange->number_to_string(7.0005e+27) === '7000500000000000000000000000');
    assert($exchange->number_to_string(-7.9e+27) === '-7900000000000000000000000000');
    assert($exchange->number_to_string(7e+27) === '7000000000000000000000000000');
    assert($exchange->number_to_string(7.9e+27) === '7900000000000000000000000000');
    assert($exchange->number_to_string(-12.345) === '-12.345');
    assert($exchange->number_to_string(12.345) === '12.345');
    assert($exchange->number_to_string(0) === '0');
    assert($exchange->number_to_string(7.35946e+21) === '7359460000000000000000');
    assert($exchange->number_to_string(1e-8) === '0.00000001');
    assert($exchange->number_to_string(1e-7) === '0.0000001');
    assert($exchange->number_to_string(-1e-7) === '-0.0000001');
}
