summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Choy <albert.choy@osii.com>2015-07-30 09:45:32 -0500
committerAlbert Choy <albert.choy@osii.com>2015-07-30 09:45:32 -0500
commitaa2a3483acd0c5bcf22a34dde0e96f82385766dc (patch)
treeab4a4965f7b3a9f200ee498bdb1c4cbdad5c4dd8
parent5c6906a766b51a45959879dbe38b36f4a2e376c4 (diff)
downloadejdb-aa2a3483acd0c5bcf22a34dde0e96f82385766dc.tar.gz
ejdb-aa2a3483acd0c5bcf22a34dde0e96f82385766dc.tar.bz2
ejdb-aa2a3483acd0c5bcf22a34dde0e96f82385766dc.zip
Minor changes
-rw-r--r--src/ejdb/tests/ejdbtest2.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/ejdb/tests/ejdbtest2.c b/src/ejdb/tests/ejdbtest2.c
index e46fe48..5cbbb36 100644
--- a/src/ejdb/tests/ejdbtest2.c
+++ b/src/ejdb/tests/ejdbtest2.c
@@ -6030,6 +6030,30 @@ void testTicket117(void) {
tcxstrdel(log);
}
+void testTicket142()
+{
+ EJCOLL *coll = ejdbcreatecoll(jb, "ticket142", NULL);
+ CU_ASSERT_PTR_NOT_NULL_FATAL(coll);
+
+ bson b;
+ bson_oid_t oid;
+
+ bson_init(&b);
+ bson_append_int(&b, "id", 18);
+ bson_append_symbol(&b, "sym", "eighteen");
+ bson_finish(&b);
+ CU_ASSERT_TRUE(ejdbsavebson(coll, &b, &oid);
+ bson_destroy(&b);
+
+ /* Verify that id=18 contain record with symbol */
+ bson bsq;
+ bson_init_as_query(&bsq);
+ bson_append_int(&bsq, "id", 18);
+ bson_finish(&bsq);
+ CU_ASSERT_FALSE_FATAL(bsq.err);
+
+
+}
int main() {
setlocale(LC_ALL, "en_US.UTF-8");
@@ -6124,6 +6148,7 @@ int main() {
(NULL == CU_add_test(pSuite, "testDistinct", testDistinct)) ||
(NULL == CU_add_test(pSuite, "testSlice", testSlice)) ||
(NULL == CU_add_test(pSuite, "testTicket117", testTicket117)) ||
+ (NULL == CU_add_test(pSuite, "testTicket142", testTicket142)) ||
(NULL == CU_add_test(pSuite, "testMetaInfo", testMetaInfo))
) {
CU_cleanup_registry();