Skip to content

Commit 60e60a5

Browse files
committed
Surface entity_map_match error if expectResult fails
The entity_map_match error contains relevant information about the failed match (e.g. field path). This is consistent with error reporting for error.expectResult later in the function.
1 parent 683cf39 commit 60e60a5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/libmongoc/tests/unified/result.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -368,10 +368,10 @@ result_check (result_t *result,
368368
result->value,
369369
result->array_of_root_docs,
370370
error)) {
371-
test_set_error (error,
372-
"expectResult mismatch:\nExpected: %s\nActual: %s\n",
373-
bson_val_to_json (expect_result),
374-
bson_val_to_json (result->value));
371+
test_diagnostics_error_info (
372+
"expectResult mismatch:\nExpected: %s\nActual: %s\n",
373+
bson_val_to_json (expect_result),
374+
bson_val_to_json (result->value));
375375
goto done;
376376
}
377377
}

0 commit comments

Comments
 (0)