From: Will Frey Date: Sat, 22 Jul 2017 03:07:07 +0000 (-0400) Subject: Update test.cpp X-Git-Tag: v2.11.0-rc1~204^2~3^2~6^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=17ca704d3a1ba5dc7da8fdfacdaea733acd2c340;p=icinga2 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. --- diff --git a/test_drivers/smoke_test/test.cpp b/test_drivers/smoke_test/test.cpp index 70d6f15d3..d7bc4268e 100644 --- a/test_drivers/smoke_test/test.cpp +++ b/test_drivers/smoke_test/test.cpp @@ -153,7 +153,7 @@ int main() //replace_invalid char invalid_sequence[] = "a\x80\xe0\xa0\xc0\xaf\xed\xa0\x80z"; - vector replace_invalid_result(50); + vector 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);