0507 19:40 db service 分离 添加好友进度一丢丢

This commit is contained in:
2023-05-07 19:40:48 +08:00
parent 6f77f55609
commit 22aad48719
118 changed files with 33066 additions and 307 deletions

43
TEST/main.cpp Normal file
View File

@@ -0,0 +1,43 @@
//
// Created by dongl on 23-5-4.
//
#include "gtest/gtest.h"
#include "works/db/po/PoJson.h"
#include "works/db/linkDB.h"
#include "works/db/UserFriendsDB.h"
#include "works/db/UserDB.h"
int main(int argc, char** argv) {
testing::InitGoogleTest(&argc,argv);
return RUN_ALL_TESTS();
}
TEST(JSON, MYSQL_TYPE_JSON) {
auto i = new PoJsonFriends();
std::string str = i->append(2725096176, 1, 100344, 1)->
append(783556037, 1, 1024255, 2)->to_string();
printf("%s", str.c_str());
}
TEST(add_friends, add_friends__Test) {
auto i = UserFriendsDB();
i.add_friends(2725096176, 783556037);
i.add_friends(783556037, 2725096176);
}
TEST(UserDB, UserDB_Ues_Test) {
auto i = UserDB();
// i.insert_user_friends(1111111);
i.test(2222222);
}
TEST(select_friends, select_friends_Test) {
auto i = UserFriendsDB();
i.select_friends_info(2725096176, 783556037);
}