Jason E. Aten wrote:
> A quick question and a progress report.
>
> Question: could someone explain how to add tests, perhaps give an overview
> of how the test system works?
Add a .crkt file to screen/tests/1_post_bs. You can see the files there for
examples, it's basically comprised of several sections with a certain canned
set of substitutions. The 1_post_bs tests are the tests that depend on
bootstrapping (which is the process of importing the crack/lang.crk file,
where certain very basic elements of the language are defined). The 0_pre_bs
tests test language features that work before bootstrapping.
The test suite is run from the test/screen shell-script, which generally
attempts to build the "screen" test program. The test program runs through
the 0_pre_bs and 1_post_bs directories and processes any files that are in
there.
There's also a screen/tests/optional directory that contains test programs
that depend on external libraries that need not be installed (like ALSA and
SSL). We don't normally run this, so if you want to make sure that nobody
breaks your feature in the course of normal development, best to put in in the
"basic" tests.
>
> And now, the latest repl progress:
>
> + redefinitions are allowed. Classes, functions, variables can all be
> re-defined
> at the repl. If you make a mistake, no big deal. Just type it again.
>
> + syntax errors in classes don't trash the repl state by generating
> unfinished
> llvm code. (Actually they do, we just check for dangling half-finished
> llvm functions
> without terminators, and delete them, so as to recover cleanly.) Plus we
> log all namespace additions in a transaction so we can roll them back
> cleanly on syntax errors.
>
> + .dc sym will list the llvm code for just sym, per Shannon's request.
>
> + code updated per Micheal's comments; a few things still on TODO list. See
> Construct.cc.
>
>
> So give it a try, it's pretty awesome.
I'll definitely play with it over the holiday break!
=============================================================================
michaelMuller =
mmu...@enduden.com |
http://www.mindhog.net/~mmuller
-----------------------------------------------------------------------------
If you are not willing to control your own mind, there are plenty of other
people who are willing to do it for you.
=============================================================================