~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to unittests/table_identifier.cc

  • Committer: Olaf van der Spek
  • Date: 2011-03-23 14:35:15 UTC
  • mto: (2247.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 2248.
  • Revision ID: olafvdspek@gmail.com-20110323143515-p4tn90h1ipnr7rgx
Refactor Identifier::getSQLPath()

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
{
33
33
  identifier::Table identifier("test", "a");
34
34
  BOOST_REQUIRE_EQUAL("test/a", identifier.getPath());
35
 
  std::string path;
36
 
  identifier.getSQLPath(path);
37
 
  BOOST_REQUIRE_EQUAL("test.a", path);
 
35
  BOOST_REQUIRE_EQUAL("test.a", identifier.getSQLPath());
38
36
}
39
37
 
40
38
BOOST_AUTO_TEST_CASE(CreateTemporary)
41
39
{
42
40
  identifier::Table identifier("test", "a", message::Table::TEMPORARY);
43
41
  BOOST_REQUIRE_EQUAL("/#sql", identifier.getPath().substr(0, 5));
44
 
  std::string path;
45
 
  identifier.getSQLPath(path);
46
 
  BOOST_REQUIRE_EQUAL("test.#a", path);
 
42
  BOOST_REQUIRE_EQUAL("test.#a", identifier.getSQLPath());
47
43
}
48
44
 
49
45
BOOST_AUTO_TEST_CASE(CreateInternal)
50
46
{
51
47
  identifier::Table identifier("test", "a", message::Table::TEMPORARY);
52
48
  BOOST_REQUIRE_EQUAL("/#sql", identifier.getPath().substr(0, 5));
53
 
  std::string path;
54
 
  identifier.getSQLPath(path);
55
 
  BOOST_REQUIRE_EQUAL("test.#a", path);
 
49
  BOOST_REQUIRE_EQUAL("test.#a", identifier.getSQLPath());
56
50
}
57
51
 
58
52
BOOST_AUTO_TEST_CASE(StaticTmpTable)