/[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 144 by ph10, Mon Apr 2 13:32:07 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
36    #include "config.h"
37    #endif
38    
39  #include <stdio.h>  #include <stdio.h>
40  #include <string>  #include <string>
41  #include <vector>  #include <vector>
 #include <pcre_stringpiece.h>  
 #include <pcre_scanner.h>  
42    
43  #ifdef _WIN32  #include "pcrecpp.h"
44  #  define snprintf _snprintf  #include "pcre_stringpiece.h"
45  #endif  #include "pcre_scanner.h"
46    
47  #define FLAGS_unittest_stack_size   49152  #define FLAGS_unittest_stack_size   49152
48    
# Line 126  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.144  
changed lines
  Added in v.257

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12