Fixed errors with Variable Length Arrays (issue #416)

This commit is contained in:
Benoit Blanchon
2017-01-15 15:11:26 +01:00
parent 11432253a1
commit 8499f0b960
15 changed files with 822 additions and 165 deletions

View File

@ -49,6 +49,13 @@ TEST_(StoreDouble) {
EXPECT_FALSE(_array[0].is<int>());
}
TEST_(StoreDoubleWithDecimals) {
_array[0].set(123.45, 2);
EXPECT_EQ(123.45, _array[0].as<double>());
EXPECT_TRUE(_array[0].is<double>());
EXPECT_FALSE(_array[0].is<int>());
}
TEST_(StoreBoolean) {
_array[0] = true;
EXPECT_EQ(true, _array[0].as<bool>());