comipayan / googletest

Automatically exported from code.google.com/p/googletest
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

TEST macro can not support chars like blank,+,- etc. But it can support Chinese character. #93

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Always

What is the expected output? What do you see instead?
When I tye testcase's name with " " or someother chars such as '+','?',I
got many compile errors. The below sample cannot work.
TEST(test plus, one+one) {
    EXPECT_EQ(3, 1+1);
}
Surprisingly, I found it can support Chinese!It's really a good news for
our team for it's very hard to find a good English name for unittest
function. It will be much better useful if it can also support characters
such as blankspace,+,?,-...

What version of the product are you using? On what operating system?
Visual studio 2005 Chinese version, windows XP Chinese version.

Please provide any additional information below.

Original issue reported on code.google.com by zhang....@huawei.com on 22 Dec 2008 at 6:43

GoogleCodeExporter commented 9 years ago
This is by design.  The test name must be a valid C++ identifier.

Original comment by shiq...@gmail.com on 22 Dec 2008 at 8:12

GoogleCodeExporter commented 9 years ago
If the name must be a valid C++ identifier, why it can support Chinese 
charcters?
It's seemed C++ only support ASCII charcter as part of identifier.

Original comment by zhang....@huawei.com on 22 Dec 2008 at 9:22