"...composable_kernel.git" did not exist on "0cd587d9e593d66e48c6917af78570dcf58c9d5c"
Commit b266447d authored by beder's avatar beder
Browse files

Added test for new API octal/hex conversion

parent 88540cc9
...@@ -303,7 +303,7 @@ namespace Test ...@@ -303,7 +303,7 @@ namespace Test
TEST NumericConversion() TEST NumericConversion()
{ {
YAML::Node node = YAML::Load("[1.5, 1, .nan, .inf, -.inf]"); YAML::Node node = YAML::Load("[1.5, 1, .nan, .inf, -.inf, 0x15, 015]");
YAML_ASSERT(node[0].as<float>() == 1.5f); YAML_ASSERT(node[0].as<float>() == 1.5f);
YAML_ASSERT(node[0].as<double>() == 1.5); YAML_ASSERT(node[0].as<double>() == 1.5);
YAML_ASSERT_THROWS(node[0].as<int>(), std::runtime_error); YAML_ASSERT_THROWS(node[0].as<int>(), std::runtime_error);
...@@ -312,6 +312,8 @@ namespace Test ...@@ -312,6 +312,8 @@ namespace Test
YAML_ASSERT(node[2].as<float>() != node[2].as<float>()); YAML_ASSERT(node[2].as<float>() != node[2].as<float>());
YAML_ASSERT(node[3].as<float>() == std::numeric_limits<float>::infinity()); YAML_ASSERT(node[3].as<float>() == std::numeric_limits<float>::infinity());
YAML_ASSERT(node[4].as<float>() == -std::numeric_limits<float>::infinity()); YAML_ASSERT(node[4].as<float>() == -std::numeric_limits<float>::infinity());
YAML_ASSERT(node[5].as<int>() == 21);
YAML_ASSERT(node[6].as<int>() == 13);
return true; return true;
} }
} }
......
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