Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] help needed: CDT refactoring test suite results

Hi Richard,

Were you able to execute them in an
automated way, or doing it the old fashioned way as I've been doing?

I've just manually run one or two of the tests per refactoring kind for now.

If we make progress on an automated mechanism, then we'll probably
have to add additional metadata to drive the automated tests.  The
current instructions assume a human operator :).

Yes, I guess it would at least need the caret position (and/or selection)
to set before executing a test. Some tests (like "change signature) would
need more metadata.

Just an idea, when adding new tests you could consider a format
that encodes the caret position / selection relative to the #TEST# markup:

// #TEST#: R25 Rename the macro argument x_ from declaration 3:23-3:25
// #TEST#: R99 Rename the macro argument x_ from usage 2:33-2:35
// #TEST#: R26 Rename this macro 1:9-1:22
#define MACRO_ONE_ARG(x_) (2.0f*x_)

Where the numbers say eg "3rd line from here, select column 23-25".
An automation system could then test with this selection, and optionally
even test just with a caret position (each of the 3 possible positions in the selection).

And, markup like this also instructs manual testers where exactly to put the selection / caret.

Cheers,
Martin


Back to the top