From 1e85e8d9b5aa0db6620ed8857143162b73d5863f Mon Sep 17 00:00:00 2001 From: guojidan <1948535941@qq.com> Date: Wed, 22 Nov 2023 02:23:36 +0000 Subject: [PATCH] use vector instead array --- tests/cppunit/types/json_test.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/cppunit/types/json_test.cc b/tests/cppunit/types/json_test.cc index a9ca515be62..334e354ee16 100644 --- a/tests/cppunit/types/json_test.cc +++ b/tests/cppunit/types/json_test.cc @@ -497,7 +497,7 @@ TEST_F(RedisJsonTest, StrAppend) { ASSERT_TRUE(json_->Set(key_, "$", R"({"a":"foo", "nested": {"a": "hello"}, "nested2": {"a": 31}})").ok()); ASSERT_TRUE(json_->StrAppend(key_, "$..a", "\"be\"", append_cnt_).ok()); ASSERT_EQ(append_cnt_.size(), 3); - int64_t result1[] = {5, 7, -1}; + std::vector result1 = {5, 7, -1}; for (int i = 0; i < 3; ++i) { ASSERT_EQ(append_cnt_[i], result1[i]); } @@ -514,7 +514,7 @@ TEST_F(RedisJsonTest, StrLen) { ASSERT_TRUE(json_->Set(key_, "$", R"({"a":"foo", "nested": {"a": "hello"}, "nested2": {"a": 31}})").ok()); ASSERT_TRUE(json_->StrLen(key_, "$..a", append_cnt_).ok()); ASSERT_EQ(append_cnt_.size(), 3); - int64_t result1[] = {3, 5, -1}; + std::vector result1 = {3, 5, -1}; for (int i = 0; i < 3; ++i) { ASSERT_EQ(append_cnt_[i], result1[i]); }