From: Mike D. Lowis Date: Wed, 18 Jul 2012 20:29:09 +0000 (-0400) Subject: Added test for infix operator application X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=98ea7a465f1b8669e90d8fe23f207600de2f693c;p=archive%2Fdlang-scm.git Added test for infix operator application --- diff --git a/tests/test_parser.scm b/tests/test_parser.scm index 65ccb44..e85a8e3 100644 --- a/tests/test_parser.scm +++ b/tests/test_parser.scm @@ -189,6 +189,17 @@ ; dlang/operator-app ;------------------------------------------------------------------------------ +(def-test "dlang/operator-app should parse an infix operator application" + (call-with-input-string "(1.0 * 2.0)" + (lambda (input) + (define lxr (make-lexer input)) + (define result (dlang/operator-app lxr)) + (syntree=? result + (syntree 'apply "" + (list + (syntree 'id "*" '()) + (syntree 'number "1.0" '()) + (syntree 'number "2.0" '()))))))) ; dlang/operator ;------------------------------------------------------------------------------