Skip to content

Commit

Permalink
use vector instead array
Browse files Browse the repository at this point in the history
  • Loading branch information
guojidan committed Nov 22, 2023
1 parent 98fd183 commit 1e85e8d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/cppunit/types/json_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<int64_t> result1 = {5, 7, -1};
for (int i = 0; i < 3; ++i) {
ASSERT_EQ(append_cnt_[i], result1[i]);
}
Expand All @@ -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<int64_t> result1 = {3, 5, -1};
for (int i = 0; i < 3; ++i) {
ASSERT_EQ(append_cnt_[i], result1[i]);
}
Expand Down

0 comments on commit 1e85e8d

Please sign in to comment.