mirror of
https://github.com/jezhiggins/arabica
synced 2025-01-15 15:40:56 +01:00
I think that's the last of the warnings
This commit is contained in:
parent
3dc2f255c7
commit
b46b48d006
5 changed files with 14 additions and 11 deletions
|
@ -1,5 +1,6 @@
|
||||||
|
#ifdef _MSC_VER
|
||||||
#pragma warning(disable : 4250)
|
#pragma warning(disable : 4250)
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
|
@ -375,7 +375,7 @@ protected:
|
||||||
current().appendChild(document().createProcessingInstruction(target, data));
|
current().appendChild(document().createProcessingInstruction(target, data));
|
||||||
} // do_processing_instruction
|
} // do_processing_instruction
|
||||||
|
|
||||||
void do_disableOutputEscaping(bool disable) { }
|
void do_disableOutputEscaping(bool /* disable */) { }
|
||||||
|
|
||||||
bool want_namespace_declarations() const { return false; }
|
bool want_namespace_declarations() const { return false; }
|
||||||
|
|
||||||
|
@ -394,8 +394,8 @@ protected:
|
||||||
current_ = elem;
|
current_ = elem;
|
||||||
} // do_start_element
|
} // do_start_element
|
||||||
|
|
||||||
void do_end_element(const std::string& qName,
|
void do_end_element(const std::string& /* qName */,
|
||||||
const std::string& namespaceURI)
|
const std::string& /* namespaceURI */)
|
||||||
{
|
{
|
||||||
outdent();
|
outdent();
|
||||||
current_ = current_.getParentNode();
|
current_ = current_.getParentNode();
|
||||||
|
|
|
@ -106,7 +106,7 @@ public:
|
||||||
assertTrue(SA::construct_from_utf8("t") == q.prefix());
|
assertTrue(SA::construct_from_utf8("t") == q.prefix());
|
||||||
} // testPrefix
|
} // testPrefix
|
||||||
|
|
||||||
static string_type uri_mapper(const string_type& prefix)
|
static string_type uri_mapper(const string_type& /* prefix */)
|
||||||
{
|
{
|
||||||
return SA::construct_from_utf8("http://test/");
|
return SA::construct_from_utf8("http://test/");
|
||||||
} // uri_mapper
|
} // uri_mapper
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
|
#ifdef _MSC_VER
|
||||||
#pragma warning(disable : 4250)
|
#pragma warning(disable : 4250)
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
|
#ifdef _MSC_VER
|
||||||
#pragma warning(disable: 4250)
|
#pragma warning(disable: 4250)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#include "../CppUnit/framework/Test.h"
|
#include "../CppUnit/framework/Test.h"
|
||||||
|
@ -407,7 +408,7 @@ protected:
|
||||||
void stripWhitespace(Arabica::DOM::Node<std::string> doc)
|
void stripWhitespace(Arabica::DOM::Node<std::string> doc)
|
||||||
{
|
{
|
||||||
Arabica::XPath::NodeSet<std::string> textNodes = selectNodes("//text()", doc);
|
Arabica::XPath::NodeSet<std::string> textNodes = selectNodes("//text()", doc);
|
||||||
for(int i = 0; i != textNodes.size(); ++i)
|
for(size_t i = 0; i != textNodes.size(); ++i)
|
||||||
{
|
{
|
||||||
Arabica::DOM::Node<std::string> t = textNodes[i];
|
Arabica::DOM::Node<std::string> t = textNodes[i];
|
||||||
std::string text = t.getNodeValue();
|
std::string text = t.getNodeValue();
|
||||||
|
@ -505,7 +506,7 @@ protected:
|
||||||
void stripWhitespace(Arabica::DOM::Node<std::string> doc)
|
void stripWhitespace(Arabica::DOM::Node<std::string> doc)
|
||||||
{
|
{
|
||||||
Arabica::XPath::NodeSet<std::string> textNodes = selectNodes("//text()", doc);
|
Arabica::XPath::NodeSet<std::string> textNodes = selectNodes("//text()", doc);
|
||||||
for(int i = 0; i != textNodes.size(); ++i)
|
for(size_t i = 0; i != textNodes.size(); ++i)
|
||||||
{
|
{
|
||||||
Arabica::DOM::Node<std::string> t = textNodes[i];
|
Arabica::DOM::Node<std::string> t = textNodes[i];
|
||||||
std::string text = t.getNodeValue();
|
std::string text = t.getNodeValue();
|
||||||
|
@ -540,7 +541,7 @@ public:
|
||||||
std::cerr << "Loaded expected fails" << std::endl;
|
std::cerr << "Loaded expected fails" << std::endl;
|
||||||
Arabica::DOM::Document<std::string> fail_doc = buildDOM(PATH_PREFIX + "arabica-expected-fails.xml");
|
Arabica::DOM::Document<std::string> fail_doc = buildDOM(PATH_PREFIX + "arabica-expected-fails.xml");
|
||||||
Arabica::XPath::NodeSet<std::string> failcases = selectNodes("/test-suite/test-case", fail_doc);
|
Arabica::XPath::NodeSet<std::string> failcases = selectNodes("/test-suite/test-case", fail_doc);
|
||||||
for(int i = 0; i != failcases.size(); ++i)
|
for(size_t i = 0; i != failcases.size(); ++i)
|
||||||
{
|
{
|
||||||
std::string name = selectString("@id", failcases[i]);
|
std::string name = selectString("@id", failcases[i]);
|
||||||
std::string compiles = selectString("@compiles", failcases[i]);
|
std::string compiles = selectString("@compiles", failcases[i]);
|
||||||
|
@ -609,7 +610,7 @@ TestSuite* Loader::suite(const std::string& path, const std::string& catalog_fil
|
||||||
Arabica::XPath::NodeSet<std::string> tests =
|
Arabica::XPath::NodeSet<std::string> tests =
|
||||||
selectNodes("/test-suite/test-catalog/test-case[file-path='" + path + "']", catalog);
|
selectNodes("/test-suite/test-catalog/test-case[file-path='" + path + "']", catalog);
|
||||||
std::cerr << "There are " << tests.size() << " " << path << " tests." << std::endl;
|
std::cerr << "There are " << tests.size() << " " << path << " tests." << std::endl;
|
||||||
for(int i = 0; i != tests.size(); ++i)
|
for(size_t i = 0; i != tests.size(); ++i)
|
||||||
{
|
{
|
||||||
std::string operation = selectString("scenario/@operation", tests[i]);
|
std::string operation = selectString("scenario/@operation", tests[i]);
|
||||||
std::string name = selectString("@id", tests[i]);
|
std::string name = selectString("@id", tests[i]);
|
||||||
|
|
Loading…
Reference in a new issue