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

Eliminate double eval from xtmtest and xtmtest-compile #386

Merged
merged 7 commits into from
May 18, 2020

Commits on May 16, 2020

  1. Add an xtmtest-with-fixture test and exercise it

    Adds an xtmtest-with-fixture macro that sets up a fixture and then
    runs its body in the fixture's environment.
    
    There's a bunch of stuff introducing conveniently named macros within
    the body, which got added as I was debugging and getting the basic macro
    to work and it's a tad tricky to unpick this and present it as a series of
    patches adding small pieces of behaviour every time. Sorry.
    pdcawley committed May 16, 2020
    Configuration menu
    Copy the full SHA
    f7a994e View commit details
    Browse the repository at this point in the history

Commits on May 17, 2020

  1. Fail a sanity check

    I thought, I'll fix the double eval in xtmtest and xtmtest-compile by
    checking if the `form` argument is quoted, stripping the quote, and then
    doing `(eval ',form (interaction-environment))` in the body of the test.
    
    By my understanding of the way lisps work, this should not change behaviour in
    any way.
    
    Hah! Tests are now failing. What on _earth_ am I doing wrong?
    
    squash! Fail a sanity check
    pdcawley committed May 17, 2020
    Configuration menu
    Copy the full SHA
    ae931ed View commit details
    Browse the repository at this point in the history
  2. squash! Fail a sanity check

    pdcawley committed May 17, 2020
    Configuration menu
    Copy the full SHA
    478fd64 View commit details
    Browse the repository at this point in the history
  3. Passing my sanity check now!

    pdcawley committed May 17, 2020
    Configuration menu
    Copy the full SHA
    e8290a4 View commit details
    Browse the repository at this point in the history
  4. Remove last double evaluation from xtmtest

    We're still doing a double eval, but that's only until we fix the tests.
    pdcawley committed May 17, 2020
    Configuration menu
    Copy the full SHA
    0d97ddd View commit details
    Browse the repository at this point in the history
  5. Eliminate the unnecessary quoting of xtmtest-* forms

    Since we've removed the double eval from xtmtest and xtmtest-compile,
    we can now fix all the tests to stop quoting their 'form' arguments.
    
    'tests/all-core.xtm' is still passing.
    pdcawley committed May 17, 2020
    Configuration menu
    Copy the full SHA
    25e31c4 View commit details
    Browse the repository at this point in the history
  6. Remove the optional unquote code from xtmtest-*

    Since we've fixed the tests so they don't quote the 'form' argument,
    we can remove the belt and braces code that unquoted such forms before
    expanding the test macros as well.
    pdcawley committed May 17, 2020
    Configuration menu
    Copy the full SHA
    a3e2325 View commit details
    Browse the repository at this point in the history