minor refactor: move tests to dyaml.test.*, remove spaces at ends of lines (#91)
minor refactor: move tests to dyaml.test.*, remove spaces at ends of lines merged-on-behalf-of: BBasile <BBasile@users.noreply.github.com>
This commit is contained in:
parent
e7ea38652b
commit
5ad4c3c435
20
meson.build
20
meson.build
|
@ -39,16 +39,16 @@ dyaml_src = [
|
||||||
'source/dyaml/style.d',
|
'source/dyaml/style.d',
|
||||||
'source/dyaml/tag.d',
|
'source/dyaml/tag.d',
|
||||||
'source/dyaml/tagdirective.d',
|
'source/dyaml/tagdirective.d',
|
||||||
'source/dyaml/testcommon.d',
|
'source/dyaml/test/common.d',
|
||||||
'source/dyaml/testcompare.d',
|
'source/dyaml/test/compare.d',
|
||||||
'source/dyaml/testconstructor.d',
|
'source/dyaml/test/constructor.d',
|
||||||
'source/dyaml/testemitter.d',
|
'source/dyaml/test/emitter.d',
|
||||||
'source/dyaml/testerrors.d',
|
'source/dyaml/test/errors.d',
|
||||||
'source/dyaml/testinputoutput.d',
|
'source/dyaml/test/inputoutput.d',
|
||||||
'source/dyaml/testreader.d',
|
'source/dyaml/test/reader.d',
|
||||||
'source/dyaml/testrepresenter.d',
|
'source/dyaml/test/representer.d',
|
||||||
'source/dyaml/testresolver.d',
|
'source/dyaml/test/resolver.d',
|
||||||
'source/dyaml/testtokens.d',
|
'source/dyaml/test/tokens.d',
|
||||||
'source/dyaml/token.d',
|
'source/dyaml/token.d',
|
||||||
'source/dyaml/unused.d',
|
'source/dyaml/unused.d',
|
||||||
'source/dyaml/zerostring.d',
|
'source/dyaml/zerostring.d',
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
// http://www.boost.org/LICENSE_1_0.txt)
|
// http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
module dyaml.testcommon;
|
module dyaml.test.common;
|
||||||
|
|
||||||
version(unittest)
|
version(unittest)
|
||||||
{
|
{
|
||||||
|
@ -34,7 +34,7 @@ package:
|
||||||
void run(F ...)(string testName, void function(bool, F) testFunction,
|
void run(F ...)(string testName, void function(bool, F) testFunction,
|
||||||
string[] unittestExt, string[] skipExt = [])
|
string[] unittestExt, string[] skipExt = [])
|
||||||
{
|
{
|
||||||
immutable string dataDir = __FILE_FULL_PATH__.dirName ~ "/../../test/data";
|
immutable string dataDir = __FILE_FULL_PATH__.dirName ~ "/../../../test/data";
|
||||||
auto testFilenames = findTestFilenames(dataDir);
|
auto testFilenames = findTestFilenames(dataDir);
|
||||||
bool verbose = false;
|
bool verbose = false;
|
||||||
|
|
|
@ -4,13 +4,13 @@
|
||||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
// http://www.boost.org/LICENSE_1_0.txt)
|
// http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
module dyaml.testcompare;
|
module dyaml.test.compare;
|
||||||
|
|
||||||
|
|
||||||
version(unittest)
|
version(unittest)
|
||||||
{
|
{
|
||||||
|
|
||||||
import dyaml.testcommon;
|
import dyaml.test.common;
|
||||||
import dyaml.token;
|
import dyaml.token;
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
// http://www.boost.org/LICENSE_1_0.txt)
|
// http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
module dyaml.testconstructor;
|
module dyaml.test.constructor;
|
||||||
|
|
||||||
|
|
||||||
version(unittest)
|
version(unittest)
|
||||||
|
@ -17,7 +17,7 @@ import std.string;
|
||||||
import std.typecons;
|
import std.typecons;
|
||||||
|
|
||||||
import dyaml.tag;
|
import dyaml.tag;
|
||||||
import dyaml.testcommon;
|
import dyaml.test.common;
|
||||||
|
|
||||||
|
|
||||||
///Expected results of loading test inputs.
|
///Expected results of loading test inputs.
|
|
@ -4,7 +4,7 @@
|
||||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
// http://www.boost.org/LICENSE_1_0.txt)
|
// http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
module dyaml.testemitter;
|
module dyaml.test.emitter;
|
||||||
|
|
||||||
|
|
||||||
version(unittest)
|
version(unittest)
|
||||||
|
@ -18,7 +18,7 @@ import std.typecons;
|
||||||
import dyaml.stream;
|
import dyaml.stream;
|
||||||
import dyaml.dumper;
|
import dyaml.dumper;
|
||||||
import dyaml.event;
|
import dyaml.event;
|
||||||
import dyaml.testcommon;
|
import dyaml.test.common;
|
||||||
import dyaml.token;
|
import dyaml.token;
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
// http://www.boost.org/LICENSE_1_0.txt)
|
// http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
module dyaml.testerrors;
|
module dyaml.test.errors;
|
||||||
|
|
||||||
|
|
||||||
version(unittest)
|
version(unittest)
|
||||||
|
@ -12,7 +12,7 @@ version(unittest)
|
||||||
|
|
||||||
import std.file;
|
import std.file;
|
||||||
|
|
||||||
import dyaml.testcommon;
|
import dyaml.test.common;
|
||||||
|
|
||||||
|
|
||||||
/// Loader error unittest from file stream.
|
/// Loader error unittest from file stream.
|
|
@ -4,7 +4,7 @@
|
||||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
// http://www.boost.org/LICENSE_1_0.txt)
|
// http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
module dyaml.testinputoutput;
|
module dyaml.test.inputoutput;
|
||||||
|
|
||||||
|
|
||||||
version(unittest)
|
version(unittest)
|
||||||
|
@ -14,7 +14,7 @@ import std.array;
|
||||||
import std.file;
|
import std.file;
|
||||||
import std.system;
|
import std.system;
|
||||||
|
|
||||||
import dyaml.testcommon;
|
import dyaml.test.common;
|
||||||
import dyaml.stream;
|
import dyaml.stream;
|
||||||
|
|
||||||
|
|
|
@ -4,13 +4,13 @@
|
||||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
// http://www.boost.org/LICENSE_1_0.txt)
|
// http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
module dyaml.testreader;
|
module dyaml.test.reader;
|
||||||
|
|
||||||
|
|
||||||
version(unittest)
|
version(unittest)
|
||||||
{
|
{
|
||||||
|
|
||||||
import dyaml.testcommon;
|
import dyaml.test.common;
|
||||||
import dyaml.reader;
|
import dyaml.reader;
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
// http://www.boost.org/LICENSE_1_0.txt)
|
// http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
module dyaml.testrepresenter;
|
module dyaml.test.representer;
|
||||||
|
|
||||||
|
|
||||||
version(unittest)
|
version(unittest)
|
||||||
|
@ -14,8 +14,8 @@ import std.path;
|
||||||
import std.exception;
|
import std.exception;
|
||||||
import std.typecons;
|
import std.typecons;
|
||||||
|
|
||||||
import dyaml.testcommon;
|
import dyaml.test.common;
|
||||||
import dyaml.testconstructor;
|
import dyaml.test.constructor;
|
||||||
|
|
||||||
|
|
||||||
/// Representer unittest.
|
/// Representer unittest.
|
||||||
|
@ -27,7 +27,7 @@ import dyaml.testconstructor;
|
||||||
void testRepresenterTypes(bool verbose, string codeFilename)
|
void testRepresenterTypes(bool verbose, string codeFilename)
|
||||||
{
|
{
|
||||||
string baseName = codeFilename.baseName.stripExtension;
|
string baseName = codeFilename.baseName.stripExtension;
|
||||||
enforce((baseName in dyaml.testconstructor.expected) !is null,
|
enforce((baseName in dyaml.test.constructor.expected) !is null,
|
||||||
new Exception("Unimplemented representer test: " ~ baseName));
|
new Exception("Unimplemented representer test: " ~ baseName));
|
||||||
|
|
||||||
Node[] expectedNodes = expected[baseName];
|
Node[] expectedNodes = expected[baseName];
|
|
@ -4,7 +4,7 @@
|
||||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
// http://www.boost.org/LICENSE_1_0.txt)
|
// http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
module dyaml.testresolver;
|
module dyaml.test.resolver;
|
||||||
|
|
||||||
|
|
||||||
version(unittest)
|
version(unittest)
|
||||||
|
@ -13,7 +13,7 @@ version(unittest)
|
||||||
import std.file;
|
import std.file;
|
||||||
import std.string;
|
import std.string;
|
||||||
|
|
||||||
import dyaml.testcommon;
|
import dyaml.test.common;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
|
@ -4,7 +4,7 @@
|
||||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
// http://www.boost.org/LICENSE_1_0.txt)
|
// http://www.boost.org/LICENSE_1_0.txt)
|
||||||
|
|
||||||
module dyaml.testtokens;
|
module dyaml.test.tokens;
|
||||||
|
|
||||||
|
|
||||||
version(unittest)
|
version(unittest)
|
||||||
|
@ -13,7 +13,7 @@ version(unittest)
|
||||||
import std.array;
|
import std.array;
|
||||||
import std.file;
|
import std.file;
|
||||||
|
|
||||||
import dyaml.testcommon;
|
import dyaml.test.common;
|
||||||
import dyaml.token;
|
import dyaml.token;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue