2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-30 13:37:55 +00:00

[2377] Fix test and check error

It seemed the wrong pushSource was used due to some automatic
conversion. Also, it complained it couldn't find the file, because a
slash was missing (and nobody noticed before).
This commit is contained in:
Michal 'vorner' Vaner 2012-12-03 11:13:38 +01:00
parent 7e5b7f352d
commit c90033f1d9
2 changed files with 7 additions and 3 deletions

View File

@ -41,7 +41,11 @@ public:
add_callback_(add_callback),
options_(options)
{
lexer_.pushSource(master_file);
string errors;
if (!lexer_.pushSource(master_file, &errors)) {
// TODO: Handle somehow.
assert(0);
}
}
// Get a string token. Handle it as error if it is not string.

View File

@ -62,7 +62,7 @@ public:
void setLoader(const char* file, const Name& origin, const RRClass rrclass,
const MasterLoader::Options options)
{
loader_.reset(new MasterLoader((string(TEST_DATA_SRCDIR) +
loader_.reset(new MasterLoader((string(TEST_DATA_SRCDIR "/") +
file).c_str(), origin, rrclass,
callbacks_,
boost::bind(&MasterLoaderTest::addRRset,
@ -104,6 +104,6 @@ TEST_F(MasterLoaderTest, basicLoad) {
checkRR("example.org", RRType::SOA(), "ns1.example.org. admin.example.org. "
"1234 3600 1800 2419200 7200");
checkRR("example.org", RRType::NS(), "ns1.example.org");
checkRR("example.org", RRType::NS(), "ns1.example.org.");
checkRR("www.example.org", RRType::A(), "192.0.2.1");
}