Skip to content

Commit e5843df

Browse files
Tests: change a few more QCOMPARE to print the error message.
Commit 36bdbfb did not catch all cases. Signed-off-by: Thiago Macieira <[email protected]>
1 parent f8514e3 commit e5843df

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/encoder/tst_encoder.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ void tst_Encoder::shortBuffer()
626626
for (int len = 0; len < output.length(); ++len) {
627627
CborEncoder encoder;
628628
cbor_encoder_init(&encoder, reinterpret_cast<quint8 *>(buffer.data()), len, 0);
629-
QCOMPARE(int(encodeVariant(&encoder, input)), int(CborErrorOutOfMemory));
629+
QCOMPARE(encodeVariant(&encoder, input), CborErrorOutOfMemory);
630630
QVERIFY(cbor_encoder_get_extra_bytes_needed(&encoder) != 0);
631631
QCOMPARE(len + cbor_encoder_get_extra_bytes_needed(&encoder), size_t(output.length()));
632632
}
@@ -710,7 +710,7 @@ void tst_Encoder::illegalSimpleType()
710710
quint8 buf[2];
711711
CborEncoder encoder;
712712
cbor_encoder_init(&encoder, buf, sizeof(buf), 0);
713-
QCOMPARE(int(cbor_encode_simple_value(&encoder, type)), int(CborErrorIllegalSimpleType));
713+
QCOMPARE(cbor_encode_simple_value(&encoder, type), CborErrorIllegalSimpleType);
714714
}
715715

716716
QTEST_MAIN(tst_Encoder)

0 commit comments

Comments
 (0)