Matthew,
> If you'd like the test namespace and the test-driving module to share
> the instance of the module that defines `document` (so that they'll
> agree on the data structure), you can use `namespace-attach-module` to
> attach the test-driving module's instance to a newly created namespace.
At Thu, 31 Aug 2017 11:31:33 +0200, Konrad Hinsen wrote:
> On 25/08/2017 17:03, Konrad Hinsen wrote:
>
> > That adds the missing piece - thanks a lot! I had seriously
> > underestimated the complexity of module definitions in Racket.
>
> A followup mostly for the benefit of those who find this t
On 25/08/2017 17:03, Konrad Hinsen wrote:
That adds the missing piece - thanks a lot! I had seriously
underestimated the complexity of module definitions in Racket.
A followup mostly for the benefit of those who find this thread in the
archives one day.
Importing a module this way works per
On 25/08/2017 16:30, Matthew Flatt wrote:
At Fri, 25 Aug 2017 16:04:01 +0200, Konrad Hinsen wrote:
Putting those together, and using `current-namespace` so that both
`eval-syntax` and check-module-form` use the same namespace:
Thanks, that works!
At least to the point of not getting any error
At Fri, 25 Aug 2017 16:04:01 +0200, Konrad Hinsen wrote:
> > Putting those together, and using `current-namespace` so that both
> > `eval-syntax` and check-module-form` use the same namespace:
>
> Thanks, that works!
>
> At least to the point of not getting any error message. I can't say if a
>
Matthias,
Matthew’s response is probably all you want in principle,
but I think that your ‘unit test’ looks like another person’s
‘integration tests’. Both are useful.
Wouldn’t you want to use unit tests to validate the parser
independently of the macros that expand the S-expression
syntax you
Matthew,
Putting those together, and using `current-namespace` so that both
`eval-syntax` and check-module-form` use the same namespace:
Thanks, that works!
At least to the point of not getting any error message. I can't say if a
module is actually defined. A plain
(require 'anonymous-mo
Konrad,
Matthew’s response is probably all you want in principle,
but I think that your ‘unit test’ looks like another person’s
‘integration tests’. Both are useful.
Wouldn’t you want to use unit tests to validate the parser
independently of the macros that expand the S-expression
syntax yo
I forgot to explain why this fails:
At Fri, 25 Aug 2017 14:59:14 +0200, Konrad Hinsen wrote:
> (eval-syntax
> (parameterize ([read-accept-lang #t]
> [read-accept-reader #t])
> (read-syntax "test-module"
> (open-input-string "#lang
> scribble/base\n@section[
I'd say that using `eval` or `eval-syntax` is the right idea, but:
* It's better to use `make-base-namespace` instead of
`module->namespace`, since `(module->namespace 'racket/base)` gives
you a namespace for the inside of `racket/base` instead of a
top-level namespace that has imported
Hi all,
I have been trying for a while to write proper unit tests for a language
implementation I am working on. By "proper" tests I mean tests that are
run using raco test just like any other tests. Until now, I have a
separate shell-script based testing framework that runs scripts written
in
11 matches
Mail list logo