Commit 98557123 authored by Mateusz Loskot's avatar Mateusz Loskot

Add tests for some variants with char* query

parent 0b2837de
......@@ -63,19 +63,19 @@ TEST_CASE("Dummy test", "[empty]")
sql << "Do what I want.";
sql << "Do what I want " << 123 << " times.";
{
char const* const query = "some query";
sql << query;
}
char const* const query = "some query";
sql << query;
{
std::string query = "some query";
sql << query;
std::string squery = "some query";
sql << squery;
}
int i = 7;
sql << "insert", use(i);
sql << "select", into(i);
sql << query, use(i);
sql << query, into(i);
#if defined (__LP64__) || ( __WORDSIZE == 64 )
long int li = 9;
......@@ -90,6 +90,8 @@ TEST_CASE("Dummy test", "[empty]")
indicator ind = i_ok;
sql << "insert", use(i, ind);
sql << "select", into(i, ind);
sql << query, use(i, ind);
sql << query, use(i, ind);
std::vector<int> numbers(100);
sql << "insert", use(numbers);
......@@ -104,8 +106,14 @@ TEST_CASE("Dummy test", "[empty]")
st.execute();
st.fetch();
}
{
statement st = (sql.prepare << query, into(i));
st.execute();
st.fetch();
}
{
statement st = (sql.prepare << "select", into(i, ind));
statement sq = (sql.prepare << query, into(i, ind));
}
{
statement st = (sql.prepare << "select", into(numbers));
......@@ -115,9 +123,11 @@ TEST_CASE("Dummy test", "[empty]")
}
{
statement st = (sql.prepare << "insert", use(i));
statement sq = (sql.prepare << query, use(i));
}
{
statement st = (sql.prepare << "insert", use(i, ind));
statement sq = (sql.prepare << query, use(i, ind));
}
{
statement st = (sql.prepare << "insert", use(numbers));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment