Switched from loading test files to testing specific parsing constructs. The tests don't fully cover the span (eventually I'll add more, maybe), but there's a bunch there.

More to the point, the yaml-reader program doesn't do any file IO, so it doesn't require a specific working directory.
This commit is contained in:
Jesse Beder
2009-05-31 06:36:01 +00:00
parent 9585797b41
commit 1cde7fbfc0
11 changed files with 890 additions and 766 deletions

View File

@@ -3,10 +3,32 @@
namespace YAML { class Emitter; }
namespace Test {
void RunAll(bool verbose);
bool Inout(const std::string& file, bool verbose);
void RunAll();
bool RunParserTests();
bool RunEmitterTests();
namespace Parser {
// scalar tests
void SimpleScalar(std::string& inputScalar, std::string& desiredOutput);
void MultiLineScalar(std::string& inputScalar, std::string& desiredOutput);
void LiteralScalar(std::string& inputScalar, std::string& desiredOutput);
void FoldedScalar(std::string& inputScalar, std::string& desiredOutput);
void ChompedFoldedScalar(std::string& inputScalar, std::string& desiredOutput);
void ChompedLiteralScalar(std::string& inputScalar, std::string& desiredOutput);
void FoldedScalarWithIndent(std::string& inputScalar, std::string& desiredOutput);
void ColonScalar(std::string& inputScalar, std::string& desiredOutput);
void QuotedScalar(std::string& inputScalar, std::string& desiredOutput);
void CommaScalar(std::string& inputScalar, std::string& desiredOutput);
void DashScalar(std::string& inputScalar, std::string& desiredOutput);
void URLScalar(std::string& inputScalar, std::string& desiredOutput);
// misc tests
bool SimpleSeq();
bool SimpleMap();
bool FlowSeq();
bool FlowMap();
}
namespace Emitter {
// correct emitting