1 Star 3 Fork 0

coder/sql-builder

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
TestInsertModel.cpp 747 Bytes
一键复制 编辑 原始数据 按行查看 历史
helloworldyu 提交于 2017-08-16 21:42 +08:00 . 基本完成
//
// Created by yhy on 2017/8/15.
//
#include "TestInsertModel.h"
void TestInsertModel::SetUpTestCase() {
std::cout << "begin test InsertModel" << std::endl;
}
void TestInsertModel::TearDownTestCase() {
std::cout << "end test InsertModel" << std::endl;
}
TEST_F(TestInsertModel, insert) {
InsertModel i;
i.insert("score", 100)
("name", std::string("yu"))
("age", 28)
("address", nullptr)
("create_time", "2016-03-25 10:15:59")
.into("user");
std::cout << i.str() << std::endl;
ASSERT_EQ(i.str(),
"insert into user(score, name, age, address, create_time) values(100, 'yu', 28, null, '2016-03-25 10:15:59')");
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/cppteam/sql-builder.git
git@gitee.com:cppteam/sql-builder.git
cppteam
sql-builder
sql-builder
master

搜索帮助