From 66f649d50195cf7846b0a0b39224b08fab20898f Mon Sep 17 00:00:00 2001 From: David Neto Date: Tue, 1 Dec 2015 16:19:44 -0500 Subject: [PATCH] Use static_cast instead of constructor for uint32_t --- test/BinaryParse.cpp | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/test/BinaryParse.cpp b/test/BinaryParse.cpp index 0b94089..3b81b28 100644 --- a/test/BinaryParse.cpp +++ b/test/BinaryParse.cpp @@ -560,26 +560,27 @@ INSTANTIATE_TEST_CASE_P( // where a string operand is followed by another operand. {Concatenate({ExpectedHeaderForBound(2), {spvOpcodeMake(6, SpvOpDecorate), 1 /* target id */, - uint32_t(SpvDecorationLinkageAttributes)}, + static_cast(SpvDecorationLinkageAttributes)}, MakeVector("abc"), - {uint32_t(SpvLinkageTypeImport), + {static_cast(SpvLinkageTypeImport), 0 /* does not belong */}}), "Invalid instruction OpDecorate starting at word 5: expected no more" " operands after 5 words, but stated word count is 6."}, // Same as the previous case, but with OpMemberDecorate. - {Concatenate( - {ExpectedHeaderForBound(2), - {spvOpcodeMake(7, SpvOpMemberDecorate), 1 /* target id */, - 42 /* member index */, uint32_t(SpvDecorationLinkageAttributes)}, - MakeVector("abc"), - {uint32_t(SpvLinkageTypeImport), 0 /* does not belong */}}), + {Concatenate({ExpectedHeaderForBound(2), + {spvOpcodeMake(7, SpvOpMemberDecorate), 1 /* target id */, + 42 /* member index */, + static_cast(SpvDecorationLinkageAttributes)}, + MakeVector("abc"), + {static_cast(SpvLinkageTypeImport), + 0 /* does not belong */}}), "Invalid instruction OpMemberDecorate starting at word 5: expected no" " more operands after 6 words, but stated word count is 7."}, // Word count is too large. There should be no more words // after the RelaxedPrecision decoration. {Concatenate({ExpectedHeaderForBound(2), {spvOpcodeMake(4, SpvOpDecorate), 1 /* target id */, - uint32_t(SpvDecorationRelaxedPrecision), + static_cast(SpvDecorationRelaxedPrecision), 0 /* does not belong */}}), "Invalid instruction OpDecorate starting at word 5: expected no" " more operands after 3 words, but stated word count is 4."}, @@ -587,8 +588,8 @@ INSTANTIATE_TEST_CASE_P( // the SpecId decoration enum word. {Concatenate({ExpectedHeaderForBound(2), {spvOpcodeMake(5, SpvOpDecorate), 1 /* target id */, - uint32_t(SpvDecorationSpecId), 42 /* the spec id */, - 0 /* does not belong */}}), + static_cast(SpvDecorationSpecId), + 42 /* the spec id */, 0 /* does not belong */}}), "Invalid instruction OpDecorate starting at word 5: expected no" " more operands after 4 words, but stated word count is 5."}, {Concatenate({ExpectedHeaderForBound(2), -- 2.7.4