]> granicus.if.org Git - icinga2/commitdiff
Update test.cpp
authorWill Frey <will.frey@digitalreasoning.com>
Sat, 22 Jul 2017 03:07:07 +0000 (23:07 -0400)
committerGitHub <noreply@github.com>
Sat, 22 Jul 2017 03:07:07 +0000 (23:07 -0400)
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.

test_drivers/smoke_test/test.cpp

index 70d6f15d379d8888ff3e841f943af3f069f46257..d7bc4268ede24bd0ae6d6be59f252b45cd0d5b47 100644 (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);