toCode - multiple declarations
Function toCode
Converts the settings object to DLang code. It's used by the generator
Function toCode
Converts the GlyphSettings object to DLang code. It's used by the generator
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, [], ""`~
`)`);