From 4466bea8b7e6c342d3db2f1425a03316c0993543 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9F=B3=E6=99=93=E4=BC=9F?= <39303645+Shixiaowei02@users.noreply.github.com> Date: Wed, 9 Sep 2020 13:31:34 +0800 Subject: [PATCH] change the style of literal, test=develop (#4269) --- lite/model_parser/flatbuffers/test_helper.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lite/model_parser/flatbuffers/test_helper.h b/lite/model_parser/flatbuffers/test_helper.h index 06ab138ad8..6cdab7cf91 100644 --- a/lite/model_parser/flatbuffers/test_helper.h +++ b/lite/model_parser/flatbuffers/test_helper.h @@ -78,12 +78,12 @@ inline std::vector GenerateProgramCache() { inline void CheckProgramCache(ProgramDesc* program) { CHECK_EQ(program->Version(), 1000600); - CHECK_EQ(program->BlocksSize(), static_cast(2)); + CHECK_EQ(program->BlocksSize(), 2u); /* --------- Check Block A --------- */ BlockDesc block_a(program->GetBlock(0)); - CHECK_EQ(block_a.OpsSize(), static_cast(1)); - CHECK_EQ(block_a.VarsSize(), static_cast(2)); + CHECK_EQ(block_a.OpsSize(), 1u); + CHECK_EQ(block_a.VarsSize(), 2u); auto var_a2 = VarDesc(block_a.GetVar(0)); CHECK(var_a2.GetShape() == std::vector({2, 2, 1})); @@ -101,8 +101,8 @@ inline void CheckProgramCache(ProgramDesc* program) { /* --------- Check Block B --------- */ BlockDesc block_b(program->GetBlock(1)); - CHECK_EQ(block_b.OpsSize(), static_cast(2)); - CHECK_EQ(block_b.VarsSize(), static_cast(1)); + CHECK_EQ(block_b.OpsSize(), 2u); + CHECK_EQ(block_b.VarsSize(), 1u); auto op_b0 = OpDesc(block_b.GetOp(1)); CHECK_EQ(op_b0.GetAttr("Attr1"), true); @@ -111,12 +111,12 @@ inline void CheckProgramCache(ProgramDesc* program) { inline void CheckProgramCache(const ProgramDescView& program) { CHECK_EQ(program.Version(), 1000600); - CHECK_EQ(program.BlocksSize(), static_cast(2)); + CHECK_EQ(program.BlocksSize(), 2u); /* --------- Check Block A --------- */ const auto& block_a = *program.GetBlock(0); - CHECK_EQ(block_a.OpsSize(), static_cast(1)); - CHECK_EQ(block_a.VarsSize(), static_cast(2)); + CHECK_EQ(block_a.OpsSize(), 1u); + CHECK_EQ(block_a.VarsSize(), 2u); const auto& var_a2 = *block_a.GetVar(0); CHECK(var_a2.GetShape() == std::vector({2, 2, 1})); @@ -135,8 +135,8 @@ inline void CheckProgramCache(const ProgramDescView& program) { /* --------- Check Block B --------- */ const auto& block_b = *program.GetBlock(1); - CHECK_EQ(block_b.OpsSize(), static_cast(2)); - CHECK_EQ(block_b.VarsSize(), static_cast(1)); + CHECK_EQ(block_b.OpsSize(), 2u); + CHECK_EQ(block_b.VarsSize(), 1u); const auto& op_b0 = *block_b.GetOp(1); CHECK_EQ(op_b0.GetAttr("Attr1"), true); -- GitLab