Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run doc example code as a test suite #52

Closed
StefanKarpinski opened this issue Jun 15, 2011 · 9 comments
Closed

run doc example code as a test suite #52

StefanKarpinski opened this issue Jun 15, 2011 · 9 comments
Assignees
Labels
docs This change adds or pertains to documentation test This change adds or pertains to unit tests

Comments

@StefanKarpinski
Copy link
Member

The examples in the wiki should all be exactly what the interpreter actually produces. We should automate comparing the output of the interpreter with what is in the wiki, thereby ensuring accuracy of all the examples and serving as an additional set of integration tests. One issue is when to clear variables and state. An obvious choice is to retain state within sections (or subsections, or whatever).

@ghost ghost assigned StefanKarpinski Jun 15, 2011
@JeffBezanson
Copy link
Member

This seems like kind of an annoying project. Are you really going to do this? It seems like there would be better uses of your time.

@StefanKarpinski
Copy link
Member Author

It would be a good thing to have at some point. Not urgent though. Also, I suspect, not all that hard to do.

@StefanKarpinski
Copy link
Member Author

And maintaining the wiki when we change the language is kind of annoying too. This might be less work in the long run.

@ViralBShah
Copy link
Member

Actually, a better way would be to have some annotations in the wiki, which can be extracted as code, run automatically within julia, and the real output used. Given the wiki is actually just a git repo makes this quite easy to pull off.

@StefanKarpinski
Copy link
Member Author

I thought about that, but I think using it as a test suite is for the best. If the output changes, you really want to actually examine it and make sure that the surrounding text still makes sense and applies.

@JeffBezanson
Copy link
Member

Doesn't seem like this can/should block 1.0. Reprioritize?

@StefanKarpinski
Copy link
Member Author

No, it shouldn't. Running through them all by hand should be fine. Can automate later.

@jiahao
Copy link
Member

jiahao commented Nov 25, 2013

This calls for champagne. 🍷

@ViralBShah
Copy link
Member

+1

StefanKarpinski pushed a commit that referenced this issue Feb 8, 2018
* `copy!()` -> `copyto!()`

* Quash more 0.7 compatibility bugs

* Require at least Compat 0.38
cmcaine pushed a commit to cmcaine/julia that referenced this issue Sep 24, 2020
Keno pushed a commit that referenced this issue Oct 9, 2023
Check output type of `prepare_call` more carefully. Fixes #51.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This change adds or pertains to documentation test This change adds or pertains to unit tests
Projects
None yet
Development

No branches or pull requests

5 participants