mirror of
https://github.com/tristanpenman/valijson.git
synced 2024-12-12 10:13:51 +01:00
Fix unit tests to match property tree.
This commit is contained in:
parent
698936aee1
commit
7f23f3694b
@ -402,17 +402,17 @@ class YamlCppValue
|
||||
|
||||
bool isBool() const
|
||||
{
|
||||
return m_value.IsScalar();
|
||||
return false;
|
||||
}
|
||||
|
||||
bool isDouble() const
|
||||
{
|
||||
return m_value.IsScalar();
|
||||
return false;
|
||||
}
|
||||
|
||||
bool isInteger() const
|
||||
{
|
||||
return m_value.IsScalar();
|
||||
return false;
|
||||
}
|
||||
|
||||
bool isNull() const
|
||||
@ -422,7 +422,7 @@ class YamlCppValue
|
||||
|
||||
bool isNumber() const
|
||||
{
|
||||
return m_value.IsScalar();
|
||||
return false;
|
||||
}
|
||||
|
||||
bool isObject() const
|
||||
@ -432,7 +432,7 @@ class YamlCppValue
|
||||
|
||||
bool isString() const
|
||||
{
|
||||
return m_value.IsScalar();
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -34,7 +34,9 @@ TEST_F(TestYamlCppAdapter, BasicArrayIteration)
|
||||
// Ensure that the elements are returned in the order they were inserted
|
||||
unsigned int expectedValue = 0;
|
||||
for (const valijson::adapters::YamlCppAdapter value : adapter.getArray()) {
|
||||
ASSERT_TRUE(value.isNumber());
|
||||
ASSERT_TRUE(value.isString());
|
||||
ASSERT_FALSE(value.isNumber());
|
||||
ASSERT_TRUE(value.maybeDouble());
|
||||
EXPECT_EQ(double(expectedValue), value.getDouble());
|
||||
expectedValue++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user