changed all pointer casts to explicit static_cast or reinterpret_cast.

Added more tests for forward lookahead asserts.


[SVN r12575]
This commit is contained in:
John Maddock
2002-01-30 12:17:51 +00:00
parent 5613d77433
commit f5082341c0
8 changed files with 57 additions and 42 deletions

View File

@ -365,7 +365,7 @@ void cpp_tests(const reg_expression<C, T, A>& e, bool recurse = true)
}
}
}
if((false == recurse) && (matches[0] == 0) && (matches[1] == search_text.size()))
if((false == recurse) && (matches[0] == 0) && (matches[1] == static_cast<int>(search_text.size())))
{
//
// match expected on whole string, so all versions

View File

@ -871,7 +871,7 @@ a+(?#b+)b+ xaaabbba 1 7
;
; forward lookahead asserts added 21/01/02
- match_default normal REG_EXTENDED
- match_default normal REG_EXTENDED REG_NO_POSIX_TEST
((?:(?!a|b)\w)+)(\w+) " xxxabaxxx " 2 11 2 5 5 11
/\*(?:(?!\*/).)*\*/ " /**/ " 2 6
@ -885,3 +885,18 @@ a+(?#b+)b+ xaaabbba 1 7
<\s*a[^>]*>((?:(?!<\s*/\s*a\s*>).)*)(?=<\s*/\s*a\s*>) " <a href=\"here\">here</a> " 1 20 16 20
<\s*a[^>]*>((?:(?!<\s*/\s*a\s*>).)*)(?=<\s*/\s*a\s*>) " <a href=\"here\">here< / a > " 1 20 16 20
; filename matching:
^(?!^(?:PRN|AUX|CLOCK\$|NUL|CON|COM\d|LPT\d|\..*)(?:\..+)?$)[^\x00-\x1f\\?*:\"|/]+$ command.com 0 11
^(?!^(?:PRN|AUX|CLOCK\$|NUL|CON|COM\d|LPT\d|\..*)(?:\..+)?$)[^\x00-\x1f\\?*:\"|/]+$ PRN -1 -1
^(?!^(?:PRN|AUX|CLOCK\$|NUL|CON|COM\d|LPT\d|\..*)(?:\..+)?$)[^\x00-\x1f\\?*:\"|/]+$ COM2 -1 -1
; password checking:
^(?=.*\d).{4,8}$ abc3 0 4
^(?=.*\d).{4,8}$ abc3def4 0 8
^(?=.*\d).{4,8}$ ab2 -1 -1
^(?=.*\d).{4,8}$ abcdefg -1 -1
^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{4,8}$ abc3 -1 -1
^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{4,8}$ abC3 0 4
^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{4,8}$ ABCD3 -1 -1