aboutsummaryrefslogtreecommitdiff
path: root/tests/basics/driver.cxx
blob: a44e8e85c98be1fcf2ee823ac7ac2e7d5a425be0 (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-2019 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&) {}
  }
}