Skip to content

Commit

Permalink
Merge pull request #14 from amerry/msvc-build-fix
Browse files Browse the repository at this point in the history
Fix smoke test
  • Loading branch information
nemtrif authored Aug 11, 2018
2 parents 37f382b + 3723b0c commit e6bde78
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test_drivers/smoke_test/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,11 @@ int main()
//replace_invalid
char invalid_sequence[] = "a\x80\xe0\xa0\xc0\xaf\xed\xa0\x80z";
vector<char> replace_invalid_result;
replace_invalid (invalid_sequence, invalid_sequence + sizeof(invalid_sequence), replace_invalid_result.begin(), '?');
replace_invalid (invalid_sequence, invalid_sequence + sizeof(invalid_sequence), std::back_inserter(replace_invalid_result), '?');
bvalid = is_valid(replace_invalid_result.begin(), replace_invalid_result.end());
assert (bvalid);
const char* fixed_invalid_sequence = "a????z";
const char fixed_invalid_sequence[] = "a????z";
assert (sizeof(fixed_invalid_sequence) == replace_invalid_result.size());
assert (std::equal(replace_invalid_result.begin(), replace_invalid_result.begin() + sizeof(fixed_invalid_sequence), fixed_invalid_sequence));

// iterator
Expand Down

0 comments on commit e6bde78

Please sign in to comment.