mirror of
https://github.com/ikawrakow/ik_llama.cpp.git
synced 2026-03-05 11:30:09 +00:00
28 lines
545 B
C++
28 lines
545 B
C++
#include <iostream>
|
|
#include <cstdio>
|
|
#include <cstdlib>
|
|
#include <sqlite_modern_cpp.h>
|
|
#include <catch2/catch.hpp>
|
|
|
|
using namespace sqlite;
|
|
using namespace std;
|
|
|
|
TEST_CASE("shared connections work fine", "[shared_connection]") {
|
|
database db(":memory:");
|
|
|
|
{
|
|
auto con = db.connection();
|
|
|
|
{
|
|
database db2(con);
|
|
int test = 0;
|
|
db2 << "select 1" >> test;
|
|
REQUIRE(test == 1);
|
|
}
|
|
|
|
int test = 0;
|
|
db << "select 1" >> test;
|
|
REQUIRE(test == 1);
|
|
}
|
|
}
|