18
18
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23
23
#define BOOST_TEST_DYN_LINK
24
24
#include <boost/test/unit_test.hpp>
33
33
identifier::Table identifier("test", "a");
34
34
BOOST_REQUIRE_EQUAL("test/a", identifier.getPath());
36
identifier.getSQLPath(path);
37
BOOST_REQUIRE_EQUAL("test.a", path);
35
BOOST_REQUIRE_EQUAL("test.a", identifier.getSQLPath());
40
38
BOOST_AUTO_TEST_CASE(CreateTemporary)
42
40
identifier::Table identifier("test", "a", message::Table::TEMPORARY);
43
41
BOOST_REQUIRE_EQUAL("/#sql", identifier.getPath().substr(0, 5));
45
identifier.getSQLPath(path);
46
BOOST_REQUIRE_EQUAL("test.#a", path);
42
BOOST_REQUIRE_EQUAL("test.#a", identifier.getSQLPath());
49
45
BOOST_AUTO_TEST_CASE(CreateInternal)
51
47
identifier::Table identifier("test", "a", message::Table::TEMPORARY);
52
48
BOOST_REQUIRE_EQUAL("/#sql", identifier.getPath().substr(0, 5));
54
identifier.getSQLPath(path);
55
BOOST_REQUIRE_EQUAL("test.#a", path);
49
BOOST_REQUIRE_EQUAL("test.#a", identifier.getSQLPath());
58
52
BOOST_AUTO_TEST_CASE(StaticTmpTable)
60
std::vector<char> pathname;
62
identifier::Table::build_tmptable_filename(pathname);
54
std::string pathname(identifier::Table::build_tmptable_filename());
64
56
BOOST_REQUIRE_GT(pathname.size(), 0);
65
57
BOOST_REQUIRE_GT(strlen(&pathname[0]), 0);