Closed GoogleCodeExporter closed 8 years ago
This was already fixed in the trunk. Will be part of release 1.5.0.
Original comment by w...@google.com
on 4 Mar 2010 at 5:29
When do you expect official release on 1.5.0?
Has it been settled already?
Original comment by pmi...@gmail.com
on 5 Mar 2010 at 6:07
In the next several weeks. You can use the code from the SVN today if you
can't wait.
Original comment by w...@google.com
on 5 Mar 2010 at 6:09
I got version from svn and tried it.
I tried to compile following tests:
TEST(MSVC_MatchesRegex, ansi)
{
char res[]="line 123";
EXPECT_THAT(res, ::testing::MatchesRegex("line \\d+"));
}
TEST(MSVC_MatchesRegex, wide)
{
wchar_t res[]=L"line 123";
EXPECT_THAT(res, ::testing::MatchesRegex(L"line \\d+"));
}
TEST(MSVC_MatchesRegex, tchar)
{
TCHAR res[]=L"line 123";
EXPECT_THAT(res, ::testing::MatchesRegex(_T("line \\d+")));
}
I got errors for version with wide chars:
error C2665: 'testing::MatchesRegex' : none of the 2 overloads could convert
all the
argument types
C2512: 'testing::AssertionResult' : no appropriate default constructor available
It seems that it doesn't work with wide chars wchar_t.
Is there any workaround or what am I doing wrong?
Original comment by pmi...@gmail.com
on 5 Mar 2010 at 8:37
I also find out that I can use backslash in regex used in windows version regex.
TEST(MSVC_MatchesRegex, backslash)
{
char res[]="\\Device\\HarddiskVolume1\\windows\\system32\\hal.dll";
EXPECT_THAT(res,
::testing::MatchesRegex("\\Device\\HarddiskVolume\\d+\\windows\\system32\\hal.dl
l"));
}
Is it possible?
I can't find it here
http://code.google.com/p/googletest/wiki/GoogleTestAdvancedGuide#Regular_Express
ion_Syntax
If not what about to define new escape code for example \\\ for \\.
Original comment by pmi...@gmail.com
on 5 Mar 2010 at 9:51
No, we don't support wide string. You need to convert it to narrow string
yourself.
Write \\\\ to match a single \. This is standard in C++ regular expressions.
Original comment by w...@google.com
on 5 Mar 2010 at 5:21
>No, we don't support wide string. You need to convert it to narrow string
yourself.
Do you plan to add support for wide string MatchesRegex?
Original comment by pmi...@gmail.com
on 8 Mar 2010 at 6:41
No, we don't. Unless someone contributes a patch.
Original comment by w...@google.com
on 8 Mar 2010 at 8:51
Is this issue related just to Windows platform or all platforms (meaning that
it is
design of Your internal regex implementation)?
Original comment by pmi...@gmail.com
on 8 Mar 2010 at 9:45
Original issue reported on code.google.com by
pmi...@gmail.com
on 4 Mar 2010 at 3:38