Skip to content

Commit c2844e4

Browse files
committed
fixes explicit casting failures on Windows builds
1 parent 6bfa232 commit c2844e4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/libmongoc/tests/json-test-operations.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1851,7 +1851,7 @@ json_test_operation (json_test_ctx_t *ctx,
18511851
bson_t pipeline = BSON_INITIALIZER;
18521852
mongoc_change_stream_destroy (ctx->change_stream);
18531853
ctx->change_stream = mongoc_collection_watch (c, &pipeline, NULL);
1854-
res = (op_error (operation) == (bool) ctx->change_stream->err.code);
1854+
res = (op_error (operation) == (0 != ctx->change_stream->err.code));
18551855
if (!res) {
18561856
test_error ("expected error=%s, but actual error='%s'",
18571857
op_error (operation) ? "true" : "false",
@@ -1879,7 +1879,7 @@ json_test_operation (json_test_ctx_t *ctx,
18791879
bson_t pipeline = BSON_INITIALIZER;
18801880
mongoc_change_stream_destroy (ctx->change_stream);
18811881
ctx->change_stream = mongoc_database_watch (db, &pipeline, NULL);
1882-
res = (op_error (operation) == (bool) ctx->change_stream->err.code);
1882+
res = (op_error (operation) == (0 != ctx->change_stream->err.code));
18831883
if (!res) {
18841884
test_error ("expected error=%s, but actual error='%s'",
18851885
op_error (operation) ? "true" : "false",
@@ -1933,7 +1933,7 @@ json_test_operation (json_test_ctx_t *ctx,
19331933
bson_t pipeline = BSON_INITIALIZER;
19341934
mongoc_change_stream_destroy (ctx->change_stream);
19351935
ctx->change_stream = mongoc_client_watch (c->client, &pipeline, NULL);
1936-
res = (op_error (operation) == (bool) ctx->change_stream->err.code);
1936+
res = (op_error (operation) == (0 != ctx->change_stream->err.code));
19371937
if (!res) {
19381938
test_error ("expected error=%s, but actual error='%s'",
19391939
op_error (operation) ? "true" : "false",

0 commit comments

Comments
 (0)