|
|
|
|
@ -150,7 +150,10 @@ test_parser (void)
|
|
|
|
|
"- 42.72 + 13.32 + 15.48 + 23.4 + 115.4",
|
|
|
|
|
gnc_numeric_create(35897, 100) );
|
|
|
|
|
|
|
|
|
|
scm_c_eval_string("(define (gnc:error->string tag args) (define (write-error port) (if (and (list? args) (not (null? args))) (let ((func (car args))) (if func (begin (display \"Function: \" port) (display func port) (display \", \" port) (display tag port) (display \"\n\n\" port))))) (false-if-exception (apply display-error (fluid-ref the-last-stack) port args)) (display-backtrace (fluid-ref the-last-stack) port) (force-output port)) (false-if-exception (call-with-output-string write-error)))");
|
|
|
|
|
|
|
|
|
|
scm_c_eval_string( "(define (gnc:plus a b) (+ a b))" );
|
|
|
|
|
add_pass_test("plus(2 : 1)", NULL, gnc_numeric_create(3,1));
|
|
|
|
|
add_pass_test( "plus( 1 : 2 ) + 3", NULL, gnc_numeric_create( 6, 1 ) );
|
|
|
|
|
add_pass_test( "plus( 1 : 2 ) * 3", NULL, gnc_numeric_create( 9, 1 ) );
|
|
|
|
|
add_pass_test( "plus( 1 + 2 : 3 ) * 5", NULL, gnc_numeric_create( 30, 1 ) );
|
|
|
|
|
|