~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to unittests/generators.cc

  • Committer: Stewart Smith
  • Date: 2010-11-07 04:22:31 UTC
  • mto: (1911.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 1912.
  • Revision ID: stewart@flamingspork.com-20101107042231-ola4sl7j0qvg58tz
fix ARCHIVE storage engine calling exit (lintian warning). Was because we were linking in libinternal into libazio, which links into archive plugin. Just link libinternal into the command line utilities.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
 
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
 
3
 *
 
4
 *  Copyright (C) 2010 Brian Aker
 
5
 *
 
6
 *  This program is free software; you can redistribute it and/or modify
 
7
 *  it under the terms of the GNU General Public License as published by
 
8
 *  the Free Software Foundation; either version 2 of the License, or
 
9
 *  (at your option) any later version.
 
10
 *
 
11
 *  This program is distributed in the hope that it will be useful,
 
12
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 *  GNU General Public License for more details.
 
15
 *
 
16
 *  You should have received a copy of the GNU General Public License
 
17
 *  along with this program; if not, write to the Free Software
 
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
19
 */
 
20
 
 
21
#include "config.h"
 
22
 
 
23
#include <gtest/gtest.h>
 
24
 
 
25
#include <drizzled/generator.h>
 
26
#include <drizzled/plugin/listen.h>
 
27
 
 
28
/*
 
29
  These will not work currently because of init issues for the server.
 
30
*/
 
31
#if 0
 
32
TEST(generator_test, schema)
 
33
{
 
34
  drizzled::Session session(drizzled::plugin::Listen::getNullClient());
 
35
  drizzled::generator::Schema generator(session);
 
36
 
 
37
  const drizzled::message::Schema *schema_ptr;
 
38
  if ((schema_ptr= generator))
 
39
    ASSERT_TRUE(0);
 
40
}
 
41
 
 
42
TEST(generator_test, table)
 
43
{
 
44
  drizzled::Session session(drizzled::plugin::Listen::getNullClient());
 
45
  drizzled::SchemaIdentifier schema("foo");
 
46
  drizzled::generator::Table generator(session, schema);
 
47
  const drizzled::message::Table *table_ptr;
 
48
 
 
49
  if ((table_ptr= generator))
 
50
    ASSERT_TRUE(0);
 
51
}
 
52
 
 
53
TEST(generator_test, all_tables)
 
54
{
 
55
  drizzled::Session session(drizzled::plugin::Listen::getNullClient());
 
56
  drizzled::generator::AllTables generator(session);
 
57
  const drizzled::message::Table *table_ptr;
 
58
 
 
59
  if ((table_ptr= generator))
 
60
    ASSERT_TRUE(0);
 
61
}
 
62
 
 
63
TEST(generator_test, all_fields)
 
64
{
 
65
  drizzled::Session session(drizzled::plugin::Listen::getNullClient());
 
66
  drizzled::generator::AllFields generator(session);
 
67
  const drizzled::message::Table::Field *field_ptr;
 
68
 
 
69
  if ((field_ptr= generator))
 
70
    ASSERT_TRUE(0);
 
71
}
 
72
#endif