blob: 899442955f0fd69c6aacd83ceeef0a71e93aea89 (
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-2015 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&) {}
}
}
|