Move syntax-source-* tests from unstable-test.

This commit is contained in:
Vincent St-Amour 2015-07-31 16:52:44 -05:00
parent 6e111fe2e4
commit b4b0837a77

View File

@ -0,0 +1,30 @@
#lang racket/base
(require rackunit rackunit/text-ui
mzlib/etc
syntax/location)
(define here
(datum->syntax
#f 'here
(list (build-path (this-expression-source-directory)
(this-expression-file-name))
1 1 1 1)))
(run-tests
(test-suite "Syntax Source Locations"
(test-suite "syntax-source-file-name"
(test-case "here"
(check-equal? (syntax-source-file-name here)
(this-expression-file-name)))
(test-case "fail"
(check-equal? (syntax-source-file-name (datum->syntax #f 'fail))
#f)))
(test-suite "syntax-source-directory"
(test-case "here"
(check-equal? (syntax-source-directory here)
(this-expression-source-directory)))
(test-case "fail"
(check-equal? (syntax-source-directory (datum->syntax #f 'fail))
#f)))))