On Fri, Oct 25, 2013 at 12:53 AM, Michael Montague <mikemon@x> wrote:
My reader includes location information when it reads identifiers and
quote strips all that out. I want that to be part of the tests and I
want to be able to test for specific errors. I will put more thought
into it and figure out a way to make my tests work in (chibi test).It's not really possible without implementation-specificextensions, because the error is happening at compiletime, and there's no standard way to catch compile-timeerrors.You could write a low-level macro that evaluates it's body:(define-syntax test-syntax(er-macro-transformer(lambda (expr rename compare)(guard (else (exn '(test-assert "syntax bad" #f)))(eval expr)'(test-assert "syntax ok" #t)))))and maybe preserve the source info there, but it's stilljust falling back on eval.As an implementation-specific extension you could providea syntax-guard form which can catch macro errors, whichwould be a cleaner solution.--Alex
_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports
_______________________________________________ Scheme-reports mailing list Scheme-reports@x http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports