diff options
author | Kirill Ponomarev <krion@FreeBSD.org> | 2004-03-04 19:29:05 +0000 |
---|---|---|
committer | Kirill Ponomarev <krion@FreeBSD.org> | 2004-03-04 19:29:05 +0000 |
commit | 9d51d547e26d57b7e489b3abaeb87ed16a1a068e (patch) | |
tree | f1f6e379f63b6eaad0a84ae4d1175b3400d92e81 /net/xmlrpc-c-devel/files/patch-src::cpptest.cc | |
parent | This does not work with ruby 1.6, but requires ruby 1.8 or later. (diff) |
- Fix build on -current
PR: ports/63752
Submitted by: Ports Fury
Notes
Notes:
svn path=/head/; revision=102932
Diffstat (limited to 'net/xmlrpc-c-devel/files/patch-src::cpptest.cc')
-rw-r--r-- | net/xmlrpc-c-devel/files/patch-src::cpptest.cc | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/net/xmlrpc-c-devel/files/patch-src::cpptest.cc b/net/xmlrpc-c-devel/files/patch-src::cpptest.cc new file mode 100644 index 000000000000..67395f125644 --- /dev/null +++ b/net/xmlrpc-c-devel/files/patch-src::cpptest.cc @@ -0,0 +1,89 @@ +--- src/cpptest.cc.orig Wed May 2 00:26:13 2001 ++++ src/cpptest.cc Tue Mar 2 23:39:39 2004 +@@ -28,15 +28,15 @@ + void test_failure (char* file, int line, char* statement) + { + total_failures++; +- cout << endl +- << file << ":" << line << ": expected (" << statement << ")" << endl; ++ std::cout << std::endl ++ << file << ":" << line << ": expected (" << statement << ")" << std::endl; + } + + #define TEST(statement) \ + do { \ + total_tests++; \ + if ((statement)) { \ +- cout << "."; \ ++ std::cout << "."; \ + } else { \ + test_failure(__FILE__, __LINE__, #statement); \ + } \ +@@ -45,7 +45,7 @@ + #define TEST_PASSED() \ + do { \ + total_tests++; \ +- cout << "."; \ ++ std::cout << "."; \ + } while (0) + + #define TEST_FAILED(reason) \ +@@ -187,7 +187,7 @@ + TEST(XmlRpcValue::makeString("foo").getString() == "foo"); + TEST(XmlRpcValue::makeString("bar", 3).getString() == "bar"); + TEST(XmlRpcValue::makeString("bar", 3).getString() == "bar"); +- TEST(XmlRpcValue::makeString("a\0b").getString() == string("a\0b")); ++ TEST(XmlRpcValue::makeString("a\0b").getString() == std::string("a\0b")); + XmlRpcValue::makeArray().getArray(); + XmlRpcValue::makeStruct().getStruct(); + +@@ -219,7 +219,7 @@ + TEST(strct.structHasKey("bar")); + TEST(!strct.structHasKey("nosuch")); + for (size_t i = 0; i < strct.structSize(); i++) { +- string key; ++ std::string key; + XmlRpcValue value; + strct.structGetKeyAndValue(i, key, value); + TEST(key + "val" == value.getString()); +@@ -248,30 +248,30 @@ + test_errors(); + + } catch (XmlRpcFault& fault) { +- cout << "Unexpected XML-RPC fault when running test suites." << endl ++ std::cout << "Unexpected XML-RPC fault when running test suites." << std::endl + << "Fault #" << fault.getFaultCode() +- << ": " << fault.getFaultString() << endl +- << "FAILED" << endl; ++ << ": " << fault.getFaultString() << std::endl ++ << "FAILED" << std::endl; + exit(1); + } catch (...) { +- cout << "Unexpected exception when running test suites." << endl +- << "FAILED" << endl; ++ std::cout << "Unexpected exception when running test suites." << std::endl ++ << "FAILED" << std::endl; + exit(1); + } + + // Summarize our test run. +- cout << endl << "Ran " << total_tests << " tests, " ++ std::cout << std::endl << "Ran " << total_tests << " tests, " + << total_failures << " failed, " +- << setprecision(4) ++ << std::setprecision(4) + << (100.0 - (100.0 * total_failures) / total_tests) +- << "% passed" << endl; ++ << "% passed" << std::endl; + + // Print the final result. + if (total_failures == 0) { +- cout << "OK" << endl; ++ std::cout << "OK" << std::endl; + return 0; + } + +- cout << "FAILED" << endl; ++ std::cout << "FAILED" << std::endl; + return 1; + } |