[cfe-dev] Patch for UCNs in string literals

Eli Friedman eli.friedman at gmail.com
Sun Jul 5 04:45:13 PDT 2009

On Sun, Jul 5, 2009 at 2:47 AM, AlisdairM(public)<public at alisdairm.net> wrote:
> i/ there is a different behaviour between C++ and C.  Ideally I would like to test both.
> That is why I submitted two versions of tests for the same paragraph.

Right; the C tests should be separate.

> In hindsight it looks like we might be better served by a parallel test structure to test/CXX for the C language, although I don't have a copy of that standard myself to know where to submit tests.  At least with C++0x we have publicly available working draughts.

There are also working drafts available for C99, for example
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1336.pdf .  That
said, we don't have the C tests structured that way, and I'm not sure
it's really worth the effort at this point, so just name it something
reasonable and put it in with the existing tests.

> A subset of this issue is the change between C++ and C++0x, which again suggests two tests.  I followed precedent elsewhere of tagging the 0x specific tests with the cpp0x suffix.  Ideally we should run all C++ tests in both C++ and C++0x mode as (most) conforming C++03 programs should also be conforming C++0x programs.  So far, the main incompatibility would be handling of auto.

That's an interesting idea, but it's probably not worth bothering: the
codepaths are mostly identical.

> ii/ Eli's original issue that we want to see tests passing to indicate the new feature works, as well as the extensive tests to validate the paragraph.  I am happy to break out the passing functionality tests, but I don't want to lose the full paragraph coverage.  How should we name these tests and where should we place them?
> For example, when working on my type-alias patch I am using a test file unrelated to paragraph numbers, as the controlling paragraph says not a lot more than 'works like a typedef' so I need to test a wide variety of typedef-like uses, which is almost an open set.  Could I submit my working tests as n2170a.cpp, while retaining the full XFAILed p2?  Likewise, we can incrementally add n2170b,c,d,etc. as support for UCNs in more contexts becomes available.

Hmm, actually, how about splitting it into, for example, "n2170.cpp"
and "n2170-xfail.cpp"?  The passing tests go into n2170.cpp, the
failing ones go into n2170-xfail.cpp, and we shuffle them around as
stuff gets implemented.

(Side note: cfe-dev doesn't mess with the reply-to, so if you hit
"reply" instead of "reply all", your response doesn't go to the list.)


More information about the cfe-dev mailing list