X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=tests%2Fdb%2Ftest_sql_connection.cpp;h=5840453307a304150726e9a319aee400181870f7;hb=3a034abb4dca58ff0940687d8dd2b829ce2e226f;hp=20907fa31788d456483796826c6e93fc22b098cf;hpb=58be0971049907f3166ce56a6ad509769565158f;p=framework%2Fweb%2Fwrt-commons.git diff --git a/tests/db/test_sql_connection.cpp b/tests/db/test_sql_connection.cpp old mode 100644 new mode 100755 index 20907fa..5840453 --- a/tests/db/test_sql_connection.cpp +++ b/tests/db/test_sql_connection.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include @@ -66,7 +66,7 @@ class StressGenerator : { DPL::DB::SqlConnection connection( m_dbFileName, - DPL::DB::SqlConnection::Flag::None, + DPL::DB::SqlConnection::Flag::NotDefined, DPL::DB::SqlConnection::Flag::RW, m_generator->Create()); @@ -186,7 +186,7 @@ RUNNER_TEST(SqlConnection_Not_Connected) { Try { DPL::DB::SqlConnection connection("/notexisitingdirectiory/foo", - DPL::DB::SqlConnection::Flag::None, + DPL::DB::SqlConnection::Flag::NotDefined, DPL::DB::SqlConnection::Flag::RW); RUNNER_ASSERT_MSG(false, "connection should throw on accessing " @@ -296,14 +296,14 @@ RUNNER_TEST(SqlConnection_Int8) RUNNER_ASSERT(!insertCommand->Step()); insertCommand->Reset(); - insertCommand->BindInt8(1, DPL::Optional(-127)); + insertCommand->BindInt8(1, boost::optional(-127)); RUNNER_ASSERT(!insertCommand->Step()); insertCommand->Reset(); RUNNER_ASSERT(selectCommand->Step()); RUNNER_ASSERT(selectCommand->GetColumnInt8(0) == 127); RUNNER_ASSERT(selectCommand->Step()); - RUNNER_ASSERT(selectCommand->GetColumnOptionalInt8(0) == -127); + RUNNER_ASSERT(selectCommand->GetColumnOptionalInt8(0) == static_cast(-127)); selectCommand->Reset(); connection.ExecCommand("DROP TABLE testInt8;"); @@ -331,7 +331,7 @@ RUNNER_TEST(SqlConnection_Int16) RUNNER_ASSERT(!insertCommand->Step()); insertCommand->Reset(); - insertCommand->BindInt16(1, DPL::Optional((int16_t)0x8000)); + insertCommand->BindInt16(1, boost::optional((int16_t)0x8000)); RUNNER_ASSERT(!insertCommand->Step()); insertCommand->Reset(); @@ -366,14 +366,14 @@ RUNNER_TEST(SqlConnection_Int32) RUNNER_ASSERT(!insertCommand->Step()); insertCommand->Reset(); - insertCommand->BindInt32(1, DPL::Optional(0x80000000)); + insertCommand->BindInt32(1, boost::optional(0x80000000)); RUNNER_ASSERT(!insertCommand->Step()); insertCommand->Reset(); RUNNER_ASSERT(selectCommand->Step()); RUNNER_ASSERT(selectCommand->GetColumnInt32(0) == (int32_t)0xFFFFFFFF); RUNNER_ASSERT(selectCommand->Step()); - RUNNER_ASSERT(selectCommand->GetColumnOptionalInt32(0) == 0x80000000); + RUNNER_ASSERT(selectCommand->GetColumnOptionalInt32(0) == static_cast(0x80000000)); selectCommand->Reset(); connection.ExecCommand("DROP TABLE testInt32;"); @@ -401,7 +401,7 @@ RUNNER_TEST(SqlConnection_Int64) RUNNER_ASSERT(!insertCommand->Step()); insertCommand->Reset(); - insertCommand->BindInt64(1, DPL::Optional(0x8000000000000000)); + insertCommand->BindInt64(1, boost::optional(0x8000000000000000)); RUNNER_ASSERT(!insertCommand->Step()); insertCommand->Reset(); @@ -409,7 +409,7 @@ RUNNER_TEST(SqlConnection_Int64) RUNNER_ASSERT(selectCommand->Step()); RUNNER_ASSERT(selectCommand->GetColumnInt64(0) == (int64_t)0xFFFFFFFFFFFFFFFF); RUNNER_ASSERT(selectCommand->Step()); - RUNNER_ASSERT(selectCommand->GetColumnOptionalInt64(0) == 0x8000000000000000); + RUNNER_ASSERT(selectCommand->GetColumnOptionalInt64(0) == static_cast(0x8000000000000000)); selectCommand->Reset(); connection.ExecCommand("DROP TABLE testInt64;"); @@ -437,7 +437,7 @@ RUNNER_TEST(SqlConnection_Float) RUNNER_ASSERT(!insertCommand->Step()); insertCommand->Reset(); - insertCommand->BindFloat(1, DPL::Optional(-90.6788f)); + insertCommand->BindFloat(1, boost::optional(-90.6788f)); RUNNER_ASSERT(!insertCommand->Step()); insertCommand->Reset(); @@ -474,7 +474,7 @@ RUNNER_TEST(SqlConnection_Double) RUNNER_ASSERT(!insertCommand->Step()); insertCommand->Reset(); - insertCommand->BindDouble(1, DPL::Optional(-90.6788)); + insertCommand->BindDouble(1, boost::optional(-90.6788)); RUNNER_ASSERT(!insertCommand->Step()); insertCommand->Reset();