comparison UnitTestsSources/SQLiteTests.cpp @ 2884:497a637366b4 db-changes

integration mainline->db-changes
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 12 Oct 2018 15:18:10 +0200
parents 878b59270859
children 22524fd06225
comparison
equal deleted inserted replaced
1762:2b91363cc1d1 2884:497a637366b4
1 /** 1 /**
2 * Orthanc - A Lightweight, RESTful DICOM Store 2 * Orthanc - A Lightweight, RESTful DICOM Store
3 * Copyright (C) 2012-2015 Sebastien Jodogne, Medical Physics 3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
4 * Department, University Hospital of Liege, Belgium 4 * Department, University Hospital of Liege, Belgium
5 * Copyright (C) 2017-2018 Osimis S.A., Belgium
5 * 6 *
6 * This program is free software: you can redistribute it and/or 7 * This program is free software: you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as 8 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation, either version 3 of the 9 * published by the Free Software Foundation, either version 3 of the
9 * License, or (at your option) any later version. 10 * License, or (at your option) any later version.
31 32
32 33
33 #include "PrecompiledHeadersUnitTests.h" 34 #include "PrecompiledHeadersUnitTests.h"
34 #include "gtest/gtest.h" 35 #include "gtest/gtest.h"
35 36
36 #include "../Core/Toolbox.h" 37 #include "../Core/SystemToolbox.h"
37 #include "../Core/SQLite/Connection.h" 38 #include "../Core/SQLite/Connection.h"
38 #include "../Core/SQLite/Statement.h" 39 #include "../Core/SQLite/Statement.h"
39 #include "../Core/SQLite/Transaction.h" 40 #include "../Core/SQLite/Transaction.h"
40 41
41 #include <sqlite3.h> 42 #include <sqlite3.h>
56 } 57 }
57 58
58 59
59 TEST(SQLite, Connection) 60 TEST(SQLite, Connection)
60 { 61 {
61 Toolbox::RemoveFile("UnitTestsResults/coucou"); 62 SystemToolbox::RemoveFile("UnitTestsResults/coucou");
62 SQLite::Connection c; 63 SQLite::Connection c;
63 c.Open("UnitTestsResults/coucou"); 64 c.Open("UnitTestsResults/coucou");
64 c.Execute("CREATE TABLE c(k INTEGER PRIMARY KEY AUTOINCREMENT, v INTEGER)"); 65 c.Execute("CREATE TABLE c(k INTEGER PRIMARY KEY AUTOINCREMENT, v INTEGER)");
65 c.Execute("INSERT INTO c VALUES(NULL, 42);"); 66 c.Execute("INSERT INTO c VALUES(NULL, 42);");
66 } 67 }