blob: 2c25fc88bc7b122bde1c68a13c5a6d5aa4eec136 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
// file : tests/basics/driver.cxx
// copyright : Copyright (c) 2009-2017 Code Synthesis Tools CC
// license : GNU GPL v2; see accompanying LICENSE file
// Basic test to make sure the library is usable. Functionality testing
// is done in the odb-tests package.
#include <cassert>
#include <odb/exceptions.hxx>
#include <odb/transaction.hxx>
using namespace odb;
int
main ()
{
// Transaction.
//
{
assert (!transaction::has_current ());
try
{
transaction::current ();
assert(false);
}
catch (const not_in_transaction&) {}
}
}
|