From 4b42814cc43b57a8f8993e103c40afde7d6914fe Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 1 Aug 2022 04:06:19 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- tests/cpp/ir/type_test.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/cpp/ir/type_test.cpp b/tests/cpp/ir/type_test.cpp index d36702de28589..f14aaacd7f524 100644 --- a/tests/cpp/ir/type_test.cpp +++ b/tests/cpp/ir/type_test.cpp @@ -18,18 +18,24 @@ TEST(Type, TypeToString) { auto qfl = TypeFactory::get_instance().get_quant_float_type(qi5, qu7, f32); auto bs1 = TypeFactory::get_instance().get_bit_struct_type( - /*physical_type=*/u16, /*member_types=*/{qi5, qu7}, /*member_bit_offsets=*/{0, 5}, /*member_exponents=*/{-1, -1}, /*member_exponent_users=*/{{}, {}}); + /*physical_type=*/u16, /*member_types=*/{qi5, qu7}, + /*member_bit_offsets=*/{0, 5}, /*member_exponents=*/{-1, -1}, + /*member_exponent_users=*/{{}, {}}); EXPECT_EQ(bs1->to_string(), "bs(0: qi5@0, 1: qu7@5)"); auto bs2 = TypeFactory::get_instance().get_bit_struct_type( - /*physical_type=*/u32, /*member_types=*/{qu7, qfl, qu7, qfl}, /*member_bit_offsets=*/{0, 7, 12, 19}, /*member_exponents=*/{-1, 0, -1, 2}, + /*physical_type=*/u32, /*member_types=*/{qu7, qfl, qu7, qfl}, + /*member_bit_offsets=*/{0, 7, 12, 19}, + /*member_exponents=*/{-1, 0, -1, 2}, /*member_exponent_users=*/{{1}, {}, {3}, {}}); EXPECT_EQ(bs2->to_string(), "bs(0: qu7@0, 1: qfl(d=qi5 e=qu7 c=f32)@7 exp=0, 2: qu7@12, 3: " "qfl(d=qi5 e=qu7 c=f32)@19 exp=2)"); auto bs3 = TypeFactory::get_instance().get_bit_struct_type( - /*physical_type=*/u32, /*member_types=*/{qu7, qfl, qfl}, /*member_bit_offsets=*/{0, 7, 12}, /*member_exponents=*/{-1, 0, 0}, /*member_exponent_users=*/{{1, 2}, {}, {}}); + /*physical_type=*/u32, /*member_types=*/{qu7, qfl, qfl}, + /*member_bit_offsets=*/{0, 7, 12}, /*member_exponents=*/{-1, 0, 0}, + /*member_exponent_users=*/{{1, 2}, {}, {}}); EXPECT_EQ(bs3->to_string(), "bs(0: qu7@0, 1: qfl(d=qi5 e=qu7 c=f32)@7 shared_exp=0, 2: " "qfl(d=qi5 e=qu7 c=f32)@12 shared_exp=0)");