X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=tests%2Fdb%2Ftest_orm.cpp;h=6726bc2409a2231e014c11e3411780b439970795;hb=3a034abb4dca58ff0940687d8dd2b829ce2e226f;hp=c7c9ea9f7c0fdc8b0332c6f1134833b1714d4bd0;hpb=58be0971049907f3166ce56a6ad509769565158f;p=framework%2Fweb%2Fwrt-commons.git diff --git a/tests/db/test_orm.cpp b/tests/db/test_orm.cpp index c7c9ea9..6726bc2 100644 --- a/tests/db/test_orm.cpp +++ b/tests/db/test_orm.cpp @@ -16,6 +16,7 @@ #include #include #include +#include #include #include @@ -70,11 +71,16 @@ bool ContainerContentsEqual(const ContainerType1& container1, it != set1.end(); it++) { - LogDebug("Set1 element: " << *it); + std::stringstream ss; + ss << *it; + WrtLogD("Set1 element: %s", ss.str().c_str()); } - for (typename Set2::iterator it = set2.begin(); it != set2.end(); it++) { - LogDebug("Set2 element: " << *it); + for (typename Set2::iterator it = set2.begin(); it != set2.end(); it++) + { + std::stringstream ss; + ss << *it; + WrtLogD("Set2 element: %s", ss.str().c_str()); } return set1 == set2; @@ -298,21 +304,21 @@ RUNNER_TEST(ORM_SelectValueList) //Getting each column { TestTable::Select select(interface.get()); - select.Where(Is(DPL::Optional::Null)); + select.Where(Is(DPL::OptionalInt())); RUNNER_ASSERT(ContainerContentsEqual(select.GetValueList(), makeList(99, 99))); } { TestTable::Select select(interface.get()); - select.Where(Is(DPL::Optional::Null)); + select.Where(Is(DPL::OptionalInt())); RUNNER_ASSERT(ContainerContentsEqual(select.GetValueList(), makeList(11, 13))); } { TestTable::Select select(interface.get()); - select.Where(Is(DPL::Optional::Null)); + select.Where(Is(DPL::OptionalInt())); RUNNER_ASSERT(ContainerContentsEqual(select.GetValueList(), makeList(DPL::String(L"twelve"), @@ -320,27 +326,24 @@ RUNNER_TEST(ORM_SelectValueList) } { TestTable::Select select(interface.get()); - select.Where(Is(DPL::Optional::Null)); + select.Where(Is(DPL::OptionalInt())); RUNNER_ASSERT(ContainerContentsEqual(select.GetValueList(), - makeList(DPL::Optional - ::Null, - DPL::Optional - ::Null))); + makeList(DPL::OptionalString(), + DPL::OptionalString()))); } //Where on each column { TestTable::Select select(interface.get()); - select.Where(Is(DPL::Optional::Null)); + select.Where(Is(DPL::OptionalInt())); RUNNER_ASSERT(ContainerContentsEqual(select.GetValueList(), makeList(11, 13))); } { TestTable::Select select(interface.get()); - select.Where(Is(DPL::Optional:: - Null)); + select.Where(Is(DPL::OptionalString())); RUNNER_ASSERT(ContainerContentsEqual(select.GetValueList(), makeList(11, 13))); @@ -565,8 +568,7 @@ RUNNER_TEST(ORM_Delete) list.remove(vector[3]); TestTableDelete::Delete del(interface.get()); - del.Where(Is(DPL::Optional - ::Null)); + del.Where(Is(DPL::OptionalString())); del.Execute(); TestTableDelete::Select select(interface.get()); @@ -991,7 +993,7 @@ RUNNER_TEST(ORM_Join) rowlist2.size() == 4, "Expected 4 rows while received: " << rowlist.size()); cnt = 0; - DPL::Optional optext; + DPL::OptionalString optext; FOREACH(rowit, rowlist2) { cnt++;