"test/pool/test_max_pool3d_fwd.cpp" did not exist on "582e31e88d185f7bb8b24086a0d8d3804d17501f"
Commit 5b889311 authored by Jesse Beder's avatar Jesse Beder
Browse files

Fixed bug while reading a single space char

parent 25881c4f
......@@ -89,7 +89,7 @@ namespace YAML
const std::string& input = node.Scalar();\
std::stringstream stream(input);\
stream.unsetf(std::ios::dec);\
if((stream >> rhs) && (stream >> std::ws).eof())\
if((stream >> std::noskipws >> rhs) && (stream >> std::ws).eof())\
return true;\
if(std::numeric_limits<type>::has_infinity) {\
if(conversion::IsInfinity(input)) {\
......
......@@ -522,6 +522,13 @@ namespace Test
YAML_ASSERT(std::string(emitter.c_str()) == "");
return true;
}
TEST SpaceChar()
{
YAML::Node node = YAML::Node(' ');
YAML_ASSERT(node.as<char>() == ' ');
return true;
}
}
void RunNodeTest(TEST (*test)(), const std::string& name, int& passed, int& total) {
......@@ -588,6 +595,7 @@ namespace Test
RunNodeTest(&Node::DereferenceIteratorError, "dereference iterator error", passed, total);
RunNodeTest(&Node::FloatingPrecision, "floating precision", passed, total);
RunNodeTest(&Node::EmitEmptyNode, "emit empty node", passed, total);
RunNodeTest(&Node::SpaceChar, "space char", passed, total);
std::cout << "Node tests: " << passed << "/" << total << " passed\n";
return passed == total;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment