Commit d1d2e8c5 authored by Giorgio Azzinnaro's avatar Giorgio Azzinnaro

debugging loader

parent 22dcd000
......@@ -75,7 +75,7 @@ Loader::Loader(
// optionsFile->CopyTo(&optionsProto);
// normalizedDescriptorDb.AddAndOwn(&optionsProto);
BOOST_LOG_TRIVIAL(debug) << "Loading profanedb/protobuf/options.proto and copying to normalized descriptor db";
// BOOST_LOG_TRIVIAL(debug) << "Loading profanedb/protobuf/options.proto and copying to normalized descriptor db";
// Just in case schema is defined in more than one place
for (const auto & path: schemaSourceTree->paths) {
......@@ -98,6 +98,9 @@ Loader::Loader(
// The normalizedDescriptorDb keeps these new Descriptors
normalizedDescriptorDb.AddAndOwn(&normalizedProto);
FileDescriptorProto * proto = new FileDescriptorProto();
normalizedDescriptorDb.FindFileByName(normalizedProto.name(), proto);
// HACK DEBUG
normalizedPool.FindFileByName(normalizedProto.name());
}
}
......
......@@ -41,14 +41,11 @@ struct Format
std::unique_ptr<Loader::RootSourceTree>(schemaSourceTree));
this->marshaller = std::make_shared<ProtobufMarshaller>(storage, loader);
std::cout << loader->GetPool(Loader::SCHEMA).FindMessageTypeByName("schema.Test")->DebugString();
}
};
BOOST_FIXTURE_TEST_CASE(load, Format)
{
loader->GetPool(Loader::SCHEMA).FindFileByName("test.proto");
}
BOOST_FIXTURE_TEST_CASE(marshal, Format)
{
schema::Test message;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment