| 106 |
CHECK_EQ(comments[2].as_string(), " /* and here is gamma */\n"); |
CHECK_EQ(comments[2].as_string(), " /* and here is gamma */\n"); |
| 107 |
comments.resize(0); |
comments.resize(0); |
| 108 |
|
|
| 109 |
s.GetComments(0, strchr(input, '/') - input, &comments); |
s.GetComments(0, (int)(strchr(input, '/') - input), &comments); |
| 110 |
CHECK_EQ(comments.size(), 0); |
CHECK_EQ(comments.size(), 0); |
| 111 |
comments.resize(0); |
comments.resize(0); |
| 112 |
|
|
| 113 |
s.GetComments(strchr(input, '/') - input - 1, sizeof(input), |
s.GetComments((int)(strchr(input, '/') - input - 1), sizeof(input), |
| 114 |
&comments); |
&comments); |
| 115 |
CHECK_EQ(comments.size(), 3); |
CHECK_EQ(comments.size(), 3); |
| 116 |
CHECK_EQ(comments[0].as_string(), " // this sets alpha\n"); |
CHECK_EQ(comments[0].as_string(), " // this sets alpha\n"); |
| 118 |
CHECK_EQ(comments[2].as_string(), " /* and here is gamma */\n"); |
CHECK_EQ(comments[2].as_string(), " /* and here is gamma */\n"); |
| 119 |
comments.resize(0); |
comments.resize(0); |
| 120 |
|
|
| 121 |
s.GetComments(strchr(input, '/') - input - 1, |
s.GetComments((int)(strchr(input, '/') - input - 1), |
| 122 |
strchr(input + 1, '\n') - input + 1, &comments); |
(int)(strchr(input + 1, '\n') - input + 1), &comments); |
| 123 |
CHECK_EQ(comments.size(), 1); |
CHECK_EQ(comments.size(), 1); |
| 124 |
CHECK_EQ(comments[0].as_string(), " // this sets alpha\n"); |
CHECK_EQ(comments[0].as_string(), " // this sets alpha\n"); |
| 125 |
comments.resize(0); |
comments.resize(0); |