From c9ac1f4701d621c3f39b94970fa96ce23897a295 Mon Sep 17 00:00:00 2001 From: Guangli Dai Date: Fri, 16 Sep 2022 11:39:34 -0700 Subject: [PATCH] Fix a bug in C++ integration test. --- test/integration/cpp/infallible_new_true.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/integration/cpp/infallible_new_true.cpp b/test/integration/cpp/infallible_new_true.cpp index 3976f08b..3b2862bd 100644 --- a/test/integration/cpp/infallible_new_true.cpp +++ b/test/integration/cpp/infallible_new_true.cpp @@ -10,7 +10,7 @@ typedef void (*abort_hook_t)(const char *message); bool fake_abort_called; void fake_abort(const char *message) { const char *expected_start = ": Allocation of size"; - if (strncmp(message, expected_start, strlen(expected_start) != 0)) { + if (strncmp(message, expected_start, strlen(expected_start)) != 0) { abort(); } fake_abort_called = true; @@ -64,4 +64,3 @@ main(void) { return test( test_failing_alloc); } -