[cfe-dev] How to check paths in tests

Dmitri Gribenko gribozavr at gmail.com
Mon Jun 24 20:08:20 PDT 2013


On Mon, Jun 24, 2013 at 7:11 PM, Sean Silva <silvas at purdue.edu> wrote:
> On Mon, Jun 24, 2013 at 3:22 PM, Rafael EspĂ­ndola
> <rafael.espindola at gmail.com> wrote:
>>
>> Sean Silva suggests using something like {{{foo/bar/zed}}} to make the
>> substitution more local.
>
>
> I'm actually not sure I like this too much anymore. It's extremely cryptic.
> My primary concern was something like:
>
> CHECK: error: frobnication at foo/bar/baz
>
> where I don't think you would want the test to just say
>
> CHECK-PATH: foo/bar/baz
>
> but rather want to check that "error: frobnication at" is there too.
> However, having CHECK-PATH just replace `/` with the appropriate regex would
> deal with this. It would lead to a slight loosening of cases like:
>
> CHECK-PATH: error: division operator `/` at foo/bar/baz
>
> would accept
>
> CHECK-PATH: error: division operator `\\` at foo/bar/baz
>
> but I think that this is not likely to be an issue in practice.

What about:

CHECK: error: division operator `/` at [[@PATH:foo/bar/baz]]

Dmitri

--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/




More information about the cfe-dev mailing list