toCode - multiple declarations

Function toCode

Converts the settings object to DLang code. It's used by the generator

string toCode (
  Settings settings
);

Function toCode

Converts the GlyphSettings object to DLang code. It's used by the generator

string toCode (
  GlyphSettings settings
);

Example

it should be able to compile the settings code

mixin("auto settings = " ~ Settings().toCode ~ ";");

Example

it should be able to transform the Settings to code

Settings settings;

settings.toCode.should.equal(`Settings(` ~
     `["spec", "result"], ` ~
     `["trial.discovery.unit.UnitTestDiscovery"], 0, ` ~
      "GlyphSettings(SpecGlyphs(`✓`), " ~
                    "SpecStepsGlyphs(`┌`, `└`, `│`), "~
                    "TestResultGlyphs(`✖`), " ~
                    "DotMatrixGlyphs(`.`,`!`,`?`), " ~
                    "LandingGlyphs(`✈`,`━`,`⋅`), " ~
                    "ProgressGlyphs(`░`,`▓`)" ~
      "), " ~
      `".trial", ` ~
      `20, 100, [], ""`~
      `)`);