Skip to content

Commit e8e6d7a

Browse files
committed
test.cpp: test with char buffer
1 parent e5c0b7f commit e8e6d7a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ enum Input {
2222
Stringstream,
2323
Fstream,
2424
File,
25-
String
25+
String,
26+
CharBuffer
2627
};
2728

2829
static Input USE_INPUT = Stringstream;
@@ -52,6 +53,8 @@ static const char* inputString(Input input) {
5253
return "File";
5354
case String:
5455
return "String";
56+
case CharBuffer:
57+
return "CharBuffer";
5558
}
5659
}
5760

@@ -140,6 +143,8 @@ static simplecpp::TokenList makeTokenList(const char code[], std::size_t size, s
140143
const std::string code_s(code, size);
141144
return simplecpp::TokenList(code_s, filenames, filename, outputList);
142145
}
146+
case CharBuffer:
147+
return simplecpp::TokenList(code, size, filenames, filename, outputList);
143148
}
144149
}
145150

@@ -3031,5 +3036,6 @@ int main(int argc, char **argv)
30313036
runTests(argc, argv, Fstream);
30323037
runTests(argc, argv, File);
30333038
runTests(argc, argv, String);
3039+
runTests(argc, argv, CharBuffer);
30343040
return numberOfFailedAssertions > 0 ? EXIT_FAILURE : EXIT_SUCCESS;
30353041
}

0 commit comments

Comments
 (0)