Skip to content

Commit 929222a

Browse files
committed
test.cpp: test with char buffer [skip ci]
1 parent cf79906 commit 929222a

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
@@ -20,7 +20,8 @@
2020

2121
enum Input {
2222
Stringstream,
23-
Fstream
23+
Fstream,
24+
CharBuffer
2425
};
2526

2627
static Input USE_INPUT = Stringstream;
@@ -46,6 +47,8 @@ static const char* inputString(Input input) {
4647
return "Stringstream";
4748
case Fstream:
4849
return "Fstream";
50+
case CharBuffer:
51+
return "CharBuffer";
4952
}
5053
}
5154

@@ -115,6 +118,8 @@ static simplecpp::TokenList makeTokenList(const char code[], std::size_t size, s
115118
}
116119
case Fstream:
117120
return makeTokenListFromFstream(code, size, filenames, filename, outputList);
121+
case CharBuffer:
122+
return simplecpp::TokenList(code, size, filenames, filename, outputList);
118123
}
119124
}
120125

@@ -2999,5 +3004,6 @@ int main(int argc, char **argv)
29993004
{
30003005
runTests(argc, argv, Stringstream);
30013006
runTests(argc, argv, Fstream);
3007+
runTests(argc, argv, CharBuffer);
30023008
return numberOfFailedAssertions > 0 ? EXIT_FAILURE : EXIT_SUCCESS;
30033009
}

0 commit comments

Comments
 (0)