We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 78fd541 commit fccf6b5Copy full SHA for fccf6b5
1 file changed
tests/lmdbxx/lmdb_tests.cpp
@@ -83,6 +83,27 @@ TEST(Lmdbxx, InsertTrivial) {
83
ASSERT_EQ(value, v);
84
}
85
86
+TEST(Lmdbxx, InsertGetRemoveFloatingPoint) {
87
+ auto db = createDb();
88
+ db->open();
89
+
90
+ float key = 100.0f;
91
+ double value = 50.0;
92
93
+ db->insert(key, value);
94
95
+ ASSERT_TRUE(db->size() == 1);
96
+ ASSERT_TRUE(db->isKeyExists(key));
97
98
+ auto v = db->value<decltype(value)>(key);
99
+ ASSERT_EQ(int(value), int(v));
100
101
+ db->remove(key);
102
103
+ ASSERT_TRUE(db->size() == 0);
104
+ ASSERT_FALSE(db->isKeyExists(key));
105
+}
106
107
TEST(Lmdbxx, InsertAndRemove) {
108
auto db = createDb();
109
db->open();
0 commit comments