//
// Automated Testing Framework (atf)
//
// Copyright (c) 2007 The NetBSD Foundation, Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
//
// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND
// CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
// IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY
// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
// IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
// IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
extern "C" {
}
#include <map>
#include <sstream>
#include <utility>
#include "atf-c++/detail/parser.hpp"
#include "atf-c++/detail/sanity.hpp"
#include "reader.hpp"
// ------------------------------------------------------------------------
// Auxiliary functions.
// ------------------------------------------------------------------------
template< typename Type >
{
Type s;
ss >> s;
return s;
}
// ------------------------------------------------------------------------
// The "atf_tps" auxiliary parser.
// ------------------------------------------------------------------------
namespace atf_tps {
public:
{
}
};
} // namespace atf_tps
struct timeval
{
using namespace atf_tps;
"Malformed timestamp value " + t.text());
return tv;
}
// ------------------------------------------------------------------------
// The "atf_tps_reader" class.
// ------------------------------------------------------------------------
{
}
{
}
void
{
}
void
{
}
void
{
}
void
{
}
void
{
}
void
{
}
void
{
}
void
{
}
void
{
}
void
{
using namespace atf_tps;
(pptr);
}
void
{
using namespace atf_tps;
(pptr);
"start of test program");
size_t i = 0;
try {
read_tc(&p);
i++;
} catch (const parse_error& pe) {
}
}
"terminator does not match "
"opening");
"new line or comma_type");
if (t.type() == comma_type) {
throw parse_error(t.lineno(),
"Empty reason for failed test program");
t = p.next();
}
}
void
{
using namespace atf_tps;
(pptr);
while (t.type() != tc_end_type &&
} else {
}
}
throw parse_error(t.lineno(),
"Test case name used in terminator does not "
"match opening");
skipped_type, "expected_{death,exit,failure,signal,timeout}, failed, "
"passed or skipped");
if (t.type() == passed_type) {
} else {
else UNREACHABLE;
" test case result");
}
}
void
{
using namespace atf_tps;
try {
read_info(&p);
size_t i = 0;
try {
read_tp(&p);
i++;
} catch (const parse_error& pe) {
}
}
read_info(&p);
ATF_PARSER_CALLBACK(p, got_eof());
} catch (const parse_error& pe) {
}
}