/[pcre]/code/trunk/pcrecpp_unittest.cc
ViewVC logotype

Diff of /code/trunk/pcrecpp_unittest.cc

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 200 by ph10, Wed Aug 1 09:10:40 2007 UTC revision 201 by ph10, Thu Aug 2 08:37:31 2007 UTC
# Line 910  int main(int argc, char** argv) { Line 910  int main(int argc, char** argv) {
910  #ifdef HAVE_LONG_LONG  #ifdef HAVE_LONG_LONG
911  # if defined(__MINGW__) || defined(__MINGW32__)  # if defined(__MINGW__) || defined(__MINGW32__)
912  #   define LLD "%I64d"  #   define LLD "%I64d"
913    #   define LLU "%I64u"
914  # else  # else
915  #   define LLD "%lld"  #   define LLD "%lld"
916    #   define LLU "%llu"
917  # endif  # endif
918    {    {
919      long long v;      long long v;
# Line 949  int main(int argc, char** argv) { Line 951  int main(int argc, char** argv) {
951      CHECK(RE("(-?\\d+)").FullMatch("100",&v)); CHECK_EQ(v, 100);      CHECK(RE("(-?\\d+)").FullMatch("100",&v)); CHECK_EQ(v, 100);
952      CHECK(RE("(-?\\d+)").FullMatch("-100",&v2)); CHECK_EQ(v2, -100);      CHECK(RE("(-?\\d+)").FullMatch("-100",&v2)); CHECK_EQ(v2, -100);
953    
954      snprintf(buf, sizeof(buf), "%llu", max_value);      snprintf(buf, sizeof(buf), LLU, max_value);
955      CHECK(RE("(-?\\d+)").FullMatch(buf,&v)); CHECK_EQ(v, max_value);      CHECK(RE("(-?\\d+)").FullMatch(buf,&v)); CHECK_EQ(v, max_value);
956    
957      assert(buf[strlen(buf)-1] != '9');      assert(buf[strlen(buf)-1] != '9');

Legend:
Removed from v.200  
changed lines
  Added in v.201

  ViewVC Help
Powered by ViewVC 1.1.5