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

Diff of /code/trunk/pcre_scanner_unittest.cc

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

revision 199 by ph10, Tue Jul 31 14:39:09 2007 UTC revision 257 by ph10, Wed Sep 19 09:11:19 2007 UTC
# Line 32  Line 32 
32  // Unittest for scanner, especially GetNextComments and GetComments()  // Unittest for scanner, especially GetNextComments and GetComments()
33  // functionality.  // functionality.
34    
35  #ifdef HAVE_CONFIG_H  #ifdef HAVE_CONFIG_H
36  #include <config.h>  #include "config.h"
37  #endif  #endif
38    
39  #include <stdio.h>  #include <stdio.h>
40  #include <string>  #include <string>
41  #include <vector>  #include <vector>
42    
43  #include <pcrecpp.h>  #include "pcrecpp.h"
44  #include <pcre_stringpiece.h>  #include "pcre_stringpiece.h"
45  #include <pcre_scanner.h>  #include "pcre_scanner.h"
   
 #ifdef _WIN32  
 #  define snprintf _snprintf  
 #endif  
46    
47  #define FLAGS_unittest_stack_size   49152  #define FLAGS_unittest_stack_size   49152
48    
# Line 132  static void TestScanner() { Line 128  static void TestScanner() {
128  static void TestBigComment() {  static void TestBigComment() {
129    string input;    string input;
130    for (int i = 0; i < 1024; ++i) {    for (int i = 0; i < 1024; ++i) {
131      char buf[1024];      char buf[1024];  // definitely big enough
132      snprintf(buf, sizeof(buf), "    # Comment %d\n", i);      sprintf(buf, "    # Comment %d\n", i);
133      input += buf;      input += buf;
134    }    }
135    input += "name = value;\n";    input += "name = value;\n";

Legend:
Removed from v.199  
changed lines
  Added in v.257

  ViewVC Help
Powered by ViewVC 1.1.5