1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-22 15:58:45 +01:00
Clementine-audio-player-Mac.../tests/sqlite_test.cpp

18 lines
374 B
C++
Raw Normal View History

2013-11-27 14:53:00 +01:00
#include "gtest/gtest.h"
#include <sqlite3.h>
TEST(SqliteTest, FTS3SupportEnabled) {
2014-02-21 17:24:49 +01:00
sqlite3* db = nullptr;
2013-11-27 14:53:00 +01:00
int rc = sqlite3_open(":memory:", &db);
ASSERT_EQ(0, rc);
2014-02-21 17:24:49 +01:00
char* errmsg = nullptr;
2013-11-27 14:53:00 +01:00
rc = sqlite3_exec(
db, "CREATE VIRTUAL TABLE foo USING fts3(content, TEXT)",
2014-02-21 17:24:49 +01:00
nullptr, nullptr, &errmsg);
2013-11-27 14:53:00 +01:00
ASSERT_EQ(0, rc) << errmsg;
sqlite3_close(db);
}