Skip to content

Commit

Permalink
chore: remove unused function
Browse files Browse the repository at this point in the history
  • Loading branch information
klokane committed Oct 2, 2018
1 parent a5e44cd commit 3217ac2
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions test/draftertest.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,6 @@ namespace draftertest

struct FixtureHelper {

static std::unique_ptr<refract::IElement> parseAndSerialize(const std::string& source,
snowcrash::ParseResult<snowcrash::Blueprint>& blueprint,
const drafter::WrapperOptions& options)
{
drafter::ConversionContext context(source.c_str(), options);

return WrapRefract(blueprint, context);
}

static const std::string printDiff(const std::string& actual, const std::string& expected)
{
// First, convert strings into arrays of lines.
Expand Down Expand Up @@ -151,10 +142,6 @@ namespace draftertest
return ext::json;
}

typedef std::unique_ptr<refract::IElement> (*Wrapper)(const std::string& source,
snowcrash::ParseResult<snowcrash::Blueprint>& blueprint,
const drafter::WrapperOptions& options);

static bool handleResultJSON(
const std::string& fixturePath, const drafter::WrapperOptions& options, bool mustBeOk = false)
{
Expand All @@ -168,7 +155,9 @@ namespace draftertest
int result = snowcrash::parse(source, snowcrash::ExportSourcemapOption, blueprint);

std::ostringstream outStream;
if (auto parsed = parseAndSerialize(source, blueprint, options)) {
drafter::ConversionContext context(source.c_str(), options);

if (auto parsed = WrapRefract(blueprint, context)) {
auto soValue = refract::serialize::renderSo(*parsed, options.generateSourceMap);
drafter::utils::so::serialize_json(outStream, soValue);
}
Expand Down

0 comments on commit 3217ac2

Please sign in to comment.