Style.
This commit is contained in:
parent
276bed7fb6
commit
21700fdb5d
|
@ -11,13 +11,11 @@ import dyaml.testcommon;
|
||||||
import dyaml.token;
|
import dyaml.token;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/// Test parser by comparing output from parsing two equivalent YAML files.
|
||||||
* Test parser by comparing output from parsing two equivalent YAML files.
|
///
|
||||||
*
|
/// Params: verbose = Print verbose output?
|
||||||
* Params: verbose = Print verbose output?
|
/// dataFilename = YAML file to parse.
|
||||||
* dataFilename = YAML file to parse.
|
/// canonicalFilename = Another file to parse, in canonical YAML format.
|
||||||
* canonicalFilename = Another file to parse, in canonical YAML format.
|
|
||||||
*/
|
|
||||||
void testParser(bool verbose, string dataFilename, string canonicalFilename)
|
void testParser(bool verbose, string dataFilename, string canonicalFilename)
|
||||||
{
|
{
|
||||||
auto dataEvents = Loader(dataFilename).parse();
|
auto dataEvents = Loader(dataFilename).parse();
|
||||||
|
@ -25,7 +23,6 @@ void testParser(bool verbose, string dataFilename, string canonicalFilename)
|
||||||
|
|
||||||
assert(dataEvents.length == canonicalEvents.length);
|
assert(dataEvents.length == canonicalEvents.length);
|
||||||
|
|
||||||
|
|
||||||
foreach(e; 0 .. dataEvents.length)
|
foreach(e; 0 .. dataEvents.length)
|
||||||
{
|
{
|
||||||
assert(dataEvents[e].id == canonicalEvents[e].id);
|
assert(dataEvents[e].id == canonicalEvents[e].id);
|
||||||
|
@ -33,13 +30,11 @@ void testParser(bool verbose, string dataFilename, string canonicalFilename)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/// Test loader by comparing output from loading two equivalent YAML files.
|
||||||
* Test loader by comparing output from loading two equivalent YAML files.
|
///
|
||||||
*
|
/// Params: verbose = Print verbose output?
|
||||||
* Params: verbose = Print verbose output?
|
/// dataFilename = YAML file to load.
|
||||||
* dataFilename = YAML file to load.
|
/// canonicalFilename = Another file to load, in canonical YAML format.
|
||||||
* canonicalFilename = Another file to load, in canonical YAML format.
|
|
||||||
*/
|
|
||||||
void testLoader(bool verbose, string dataFilename, string canonicalFilename)
|
void testLoader(bool verbose, string dataFilename, string canonicalFilename)
|
||||||
{
|
{
|
||||||
auto data = Loader(dataFilename).loadAll();
|
auto data = Loader(dataFilename).loadAll();
|
||||||
|
|
Loading…
Reference in a new issue