Last active
December 16, 2015 04:49
-
-
Save dyoo/5380369 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket | |
(define-syntax (verify stx) | |
(syntax-case stx () | |
[(_ exp1 exp2) | |
(with-syntax ([the-line-number (syntax-line stx)]) | |
(syntax/loc stx | |
(begin | |
(printf "~s == ~s : " 'exp1 'exp2) | |
(if (equal? exp1 exp2) | |
(printf "TRUE\n") | |
(printf "FALSE (line ~a)\n" the-line-number)))))])) | |
(verify (+ 1 1) 2) | |
(verify (+ 1 1) 3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment