Lines Matching refs:comments
76 vector<StringPiece> comments; in TestScanner() local
82 s.GetNextComments(&comments); in TestScanner()
83 CHECK_EQ(comments.size(), 1); in TestScanner()
84 CHECK_EQ(comments[0].as_string(), " // this sets alpha\n"); in TestScanner()
85 comments.resize(0); in TestScanner()
90 s.GetNextComments(&comments); in TestScanner()
91 CHECK_EQ(comments.size(), 1); in TestScanner()
92 CHECK_EQ(comments[0].as_string(), " // bravo is set here\n"); in TestScanner()
93 comments.resize(0); in TestScanner()
98 s.GetNextComments(&comments); in TestScanner()
99 CHECK_EQ(comments.size(), 1); in TestScanner()
100 CHECK_EQ(comments[0].as_string(), " /* and here is gamma */\n"); in TestScanner()
101 comments.resize(0); in TestScanner()
103 s.GetComments(0, sizeof(input), &comments); in TestScanner()
104 CHECK_EQ(comments.size(), 3); in TestScanner()
105 CHECK_EQ(comments[0].as_string(), " // this sets alpha\n"); in TestScanner()
106 CHECK_EQ(comments[1].as_string(), " // bravo is set here\n"); in TestScanner()
107 CHECK_EQ(comments[2].as_string(), " /* and here is gamma */\n"); in TestScanner()
108 comments.resize(0); in TestScanner()
110 s.GetComments(0, (int)(strchr(input, '/') - input), &comments); in TestScanner()
111 CHECK_EQ(comments.size(), 0); in TestScanner()
112 comments.resize(0); in TestScanner()
115 &comments); in TestScanner()
116 CHECK_EQ(comments.size(), 3); in TestScanner()
117 CHECK_EQ(comments[0].as_string(), " // this sets alpha\n"); in TestScanner()
118 CHECK_EQ(comments[1].as_string(), " // bravo is set here\n"); in TestScanner()
119 CHECK_EQ(comments[2].as_string(), " /* and here is gamma */\n"); in TestScanner()
120 comments.resize(0); in TestScanner()
123 (int)(strchr(input + 1, '\n') - input + 1), &comments); in TestScanner()
124 CHECK_EQ(comments.size(), 1); in TestScanner()
125 CHECK_EQ(comments[0].as_string(), " // this sets alpha\n"); in TestScanner()
126 comments.resize(0); in TestScanner()