Update test.cpp

This test was failing for me when I compiled with clang. Must have a different initializer.

I changed the test to match the example from the README and it passes when I build with both clang and gcc.
This commit is contained in:
Will Frey 2017-07-21 23:07:07 -04:00 committed by GitHub
parent 0232ab8188
commit 17ca704d3a
1 changed files with 1 additions and 1 deletions

View File

@ -153,7 +153,7 @@ int main()
//replace_invalid
char invalid_sequence[] = "a\x80\xe0\xa0\xc0\xaf\xed\xa0\x80z";
vector<char> replace_invalid_result(50);
vector<char> replace_invalid_result;
replace_invalid (invalid_sequence, invalid_sequence + sizeof(invalid_sequence), replace_invalid_result.begin(), '?');
bvalid = is_valid(replace_invalid_result.begin(), replace_invalid_result.end());
assert (bvalid);