From 5b12a4bbec9ead4f35656d3068cabaafc05ce520 Mon Sep 17 00:00:00 2001 From: Ingela Anderton Andin Date: Mon, 27 Jun 2016 15:22:05 +0200 Subject: odbc: Remove legacy suite clauses from test suites --- lib/odbc/test/odbc_query_SUITE.erl | 68 -------------------------------------- 1 file changed, 68 deletions(-) (limited to 'lib/odbc/test/odbc_query_SUITE.erl') diff --git a/lib/odbc/test/odbc_query_SUITE.erl b/lib/odbc/test/odbc_query_SUITE.erl index 5f719b7287..8a5c6bdd73 100644 --- a/lib/odbc/test/odbc_query_SUITE.erl +++ b/lib/odbc/test/odbc_query_SUITE.erl @@ -174,7 +174,6 @@ end_per_testcase(_Case, Config) -> %%------------------------------------------------------------------------- stored_proc(doc)-> ["Test stored proc with OUT param"]; -stored_proc(suite) -> []; stored_proc(Config) when is_list(Config) -> case ?RDBMS of X when X == oracle; X == postgres-> @@ -194,7 +193,6 @@ stored_proc(Config) when is_list(Config) -> sql_query(doc)-> ["Test the common cases"]; -sql_query(suite) -> []; sql_query(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -259,7 +257,6 @@ select_count(Config) when is_list(Config) -> %%------------------------------------------------------------------------- first(doc) -> ["Tests first/[1,2]"]; -first(suite) -> []; first(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -286,7 +283,6 @@ first(Config) when is_list(Config) -> %%------------------------------------------------------------------------- last(doc) -> ["Tests last/[1,2]"]; -last(suite) -> []; last(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -313,7 +309,6 @@ last(Config) when is_list(Config) -> %%------------------------------------------------------------------------- next(doc) -> ["Tests next/[1,2]"]; -next(suite) -> []; next(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -339,7 +334,6 @@ next(Config) when is_list(Config) -> %%------------------------------------------------------------------------- prev(doc) -> ["Tests prev/[1,2]"]; -prev(suite) -> []; prev(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -484,7 +478,6 @@ select_absolute(Config) when is_list(Config) -> %%------------------------------------------------------------------------- create_table_twice(doc) -> ["Test what happens if you try to create the same table twice."]; -create_table_twice(suite) -> []; create_table_twice(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -503,7 +496,6 @@ create_table_twice(Config) when is_list(Config) -> %%------------------------------------------------------------------------- delete_table_twice(doc) -> ["Test what happens if you try to delete the same table twice."]; -delete_table_twice(suite) -> []; delete_table_twice(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -542,7 +534,6 @@ duplicate_key(Config) when is_list(Config) -> not_connection_owner(doc) -> ["Test what happens if a process that did not start the connection" " tries to acess it."]; -not_connection_owner(suite) -> []; not_connection_owner(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -567,7 +558,6 @@ not_owner(Pid, Ref, Table) -> no_result_set(doc) -> ["Tests what happens if you try to use a function that needs an " "associated result set when there is none."]; -no_result_set(suite) -> []; no_result_set(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), @@ -584,8 +574,6 @@ no_result_set(Config) when is_list(Config) -> %%------------------------------------------------------------------------- query_error(doc) -> ["Test what happens if there is an error in the query."]; -query_error(suite) -> - []; query_error(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -607,8 +595,6 @@ query_error(Config) when is_list(Config) -> %%------------------------------------------------------------------------- multiple_select_result_sets(doc) -> ["Test what happens if you have a batch of select queries."]; -multiple_select_result_sets(suite) -> - []; multiple_select_result_sets(Config) when is_list(Config) -> case ?RDBMS of sqlserver -> @@ -643,8 +629,6 @@ multiple_select_result_sets(Config) when is_list(Config) -> multiple_mix_result_sets(doc) -> ["Test what happens if you have a batch of select and other type of" " queries."]; -multiple_mix_result_sets(suite) -> - []; multiple_mix_result_sets(Config) when is_list(Config) -> case ?RDBMS of sqlserver -> @@ -676,8 +660,6 @@ multiple_mix_result_sets(Config) when is_list(Config) -> %%------------------------------------------------------------------------- multiple_result_sets_error(doc) -> ["Test what happens if one of the batched queries fails."]; -multiple_result_sets_error(suite) -> - []; multiple_result_sets_error(Config) when is_list(Config) -> case ?RDBMS of sqlserver -> @@ -711,8 +693,6 @@ multiple_result_sets_error(Config) when is_list(Config) -> %%------------------------------------------------------------------------- param_insert_tiny_int(doc)-> ["Test insertion of tiny ints by parameterized queries."]; -param_insert_tiny_int(suite) -> - []; param_insert_tiny_int(Config) when is_list(Config) -> case ?RDBMS of sqlserver -> @@ -748,8 +728,6 @@ param_insert_tiny_int(Config) when is_list(Config) -> %%------------------------------------------------------------------------- param_insert_small_int(doc)-> ["Test insertion of small ints by parameterized queries."]; -param_insert_small_int(suite) -> - []; param_insert_small_int(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -780,8 +758,6 @@ param_insert_small_int(Config) when is_list(Config) -> %%------------------------------------------------------------------------- param_insert_int(doc)-> ["Test insertion of ints by parameterized queries."]; -param_insert_int(suite) -> - []; param_insert_int(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -812,8 +788,6 @@ param_insert_int(Config) when is_list(Config) -> %%------------------------------------------------------------------------- param_insert_integer(doc)-> ["Test insertion of integers by parameterized queries."]; -param_insert_integer(suite) -> - []; param_insert_integer(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -844,8 +818,6 @@ param_insert_integer(Config) when is_list(Config) -> %%------------------------------------------------------------------------- param_insert_decimal(doc)-> ["Test insertion of decimal numbers by parameterized queries."]; -param_insert_decimal(suite) -> - []; param_insert_decimal(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -895,8 +867,6 @@ param_insert_decimal(Config) when is_list(Config) -> %%------------------------------------------------------------------------- param_insert_numeric(doc)-> ["Test insertion of numeric numbers by parameterized queries."]; -param_insert_numeric(suite) -> - []; param_insert_numeric(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -946,8 +916,6 @@ param_insert_numeric(Config) when is_list(Config) -> %%------------------------------------------------------------------------- param_insert_char(doc)-> ["Test insertion of fixed length string by parameterized queries."]; -param_insert_char(suite) -> - []; param_insert_char(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -982,8 +950,6 @@ param_insert_char(Config) when is_list(Config) -> %%------------------------------------------------------------------------- param_insert_character(doc)-> ["Test insertion of fixed length string by parameterized queries."]; -param_insert_character(suite) -> - []; param_insert_character(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -1019,8 +985,6 @@ param_insert_character(Config) when is_list(Config) -> %%------------------------------------------------------------------------ param_insert_char_varying(doc)-> ["Test insertion of variable length strings by parameterized queries."]; -param_insert_char_varying(suite) -> - []; param_insert_char_varying(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -1056,8 +1020,6 @@ param_insert_char_varying(Config) when is_list(Config) -> %%------------------------------------------------------------------------- param_insert_character_varying(doc)-> ["Test insertion of variable length strings by parameterized queries."]; -param_insert_character_varying(suite) -> - []; param_insert_character_varying(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -1093,8 +1055,6 @@ param_insert_character_varying(Config) when is_list(Config) -> %%------------------------------------------------------------------------- param_insert_float(doc)-> ["Test insertion of floats by parameterized queries."]; -param_insert_float(suite) -> - []; param_insert_float(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -1132,8 +1092,6 @@ param_insert_float(Config) when is_list(Config) -> %%------------------------------------------------------------------------- param_insert_real(doc)-> ["Test insertion of real numbers by parameterized queries."]; -param_insert_real(suite) -> - []; param_insert_real(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -1173,8 +1131,6 @@ param_insert_real(Config) when is_list(Config) -> %%------------------------------------------------------------------------- param_insert_double(doc)-> ["Test insertion of doubles by parameterized queries."]; -param_insert_double(suite) -> - []; param_insert_double(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -1212,8 +1168,6 @@ param_insert_double(Config) when is_list(Config) -> %%------------------------------------------------------------------------- param_insert_mix(doc)-> ["Test insertion of a mixture of datatypes by parameterized queries."]; -param_insert_mix(suite) -> - []; param_insert_mix(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -1239,8 +1193,6 @@ param_insert_mix(Config) when is_list(Config) -> %%------------------------------------------------------------------------- param_update(doc)-> ["Test parameterized update query."]; -param_update(suite) -> - []; param_update(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -1303,8 +1255,6 @@ delete_nonexisting_row(Config) when is_list(Config) -> %%------------------------------------------------------------------------- param_delete(doc) -> ["Test parameterized delete query."]; -param_delete(suite) -> - []; param_delete(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -1338,8 +1288,6 @@ param_delete(Config) when is_list(Config) -> %%------------------------------------------------------------------------- param_select(doc) -> ["Test parameterized select query."]; -param_select(suite) -> - []; param_select(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -1368,8 +1316,6 @@ param_select(Config) when is_list(Config) -> %%------------------------------------------------------------------------- param_select_empty_params(doc) -> ["Test parameterized select query with no parameters."]; -param_select_empty_params(suite) -> - []; param_select_empty_params(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -1398,8 +1344,6 @@ param_select_empty_params(Config) when is_list(Config) -> %%------------------------------------------------------------------------- param_delete_empty_params(doc) -> ["Test parameterized delete query with no parameters."]; -param_delete_empty_params(suite) -> - []; param_delete_empty_params(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -1432,8 +1376,6 @@ param_delete_empty_params(Config) when is_list(Config) -> %%------------------------------------------------------------------------- describe_integer(doc) -> ["Test describe_table/[2,3] for integer columns."]; -describe_integer(suite) -> - []; describe_integer(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -1451,8 +1393,6 @@ describe_integer(Config) when is_list(Config) -> %%------------------------------------------------------------------------- describe_string(doc) -> ["Test describe_table/[2,3] for string columns."]; -describe_string(suite) -> - []; describe_string(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -1472,8 +1412,6 @@ describe_string(Config) when is_list(Config) -> %%------------------------------------------------------------------------- describe_floating(doc) -> ["Test describe_table/[2,3] for floting columns."]; -describe_floating(suite) -> - []; describe_floating(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), Table = ?config(tableName, Config), @@ -1492,8 +1430,6 @@ describe_floating(Config) when is_list(Config) -> %%------------------------------------------------------------------------- describe_dec_num(doc) -> ["Test describe_table/[2,3] for decimal and numerical columns"]; -describe_dec_num(suite) -> - []; describe_dec_num(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), @@ -1513,8 +1449,6 @@ describe_dec_num(Config) when is_list(Config) -> %%------------------------------------------------------------------------- describe_timestamp(doc) -> ["Test describe_table/[2,3] for tinmestap columns"]; -describe_timestamp(suite) -> - []; describe_timestamp(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), @@ -1532,8 +1466,6 @@ describe_timestamp(Config) when is_list(Config) -> %%------------------------------------------------------------------------- describe_no_such_table(doc) -> ["Test what happens if you try to describe a table that does not exist."]; -describe_no_such_table(suite) -> - []; describe_no_such_table(Config) when is_list(Config) -> Ref = ?config(connection_ref, Config), -- cgit v1.2.3 From 39d2169bd96cafa13f3cbb5fea8eb30e093a3876 Mon Sep 17 00:00:00 2001 From: Ingela Anderton Andin Date: Mon, 27 Jun 2016 15:29:18 +0200 Subject: odbc: Remove legacy config macros --- lib/odbc/test/odbc_query_SUITE.erl | 182 ++++++++++++++++++------------------- 1 file changed, 91 insertions(+), 91 deletions(-) (limited to 'lib/odbc/test/odbc_query_SUITE.erl') diff --git a/lib/odbc/test/odbc_query_SUITE.erl b/lib/odbc/test/odbc_query_SUITE.erl index 8a5c6bdd73..f48468dc47 100644 --- a/lib/odbc/test/odbc_query_SUITE.erl +++ b/lib/odbc/test/odbc_query_SUITE.erl @@ -158,14 +158,14 @@ init_per_testcase(_Case, Config) -> %% Description: Cleanup after each test case %%-------------------------------------------------------------------- end_per_testcase(_Case, Config) -> - Ref = ?config(connection_ref, Config), + Ref = proplists:get_value(connection_ref, Config), ok = odbc:disconnect(Ref), %% Clean up if needed - Table = ?config(tableName, Config), + Table = proplists:get_value(tableName, Config), {ok, NewRef} = odbc:connect(?RDBMS:connection_string(), odbc_test_lib:platform_options()), odbc:sql_query(NewRef, "DROP TABLE " ++ Table), odbc:disconnect(NewRef), - Dog = ?config(watchdog, Config), + Dog = proplists:get_value(watchdog, Config), test_server:timetrap_cancel(Dog), ok. @@ -177,7 +177,7 @@ stored_proc(doc)-> stored_proc(Config) when is_list(Config) -> case ?RDBMS of X when X == oracle; X == postgres-> - Ref = ?config(connection_ref, Config), + Ref = proplists:get_value(connection_ref, Config), {updated, _} = odbc:sql_query(Ref, ?RDBMS:stored_proc_integer_out()), @@ -194,8 +194,8 @@ stored_proc(Config) when is_list(Config) -> sql_query(doc)-> ["Test the common cases"]; sql_query(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -239,8 +239,8 @@ select_count(doc) -> " such as first."]; select_count(sute) -> []; select_count(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++ @@ -258,8 +258,8 @@ select_count(Config) when is_list(Config) -> first(doc) -> ["Tests first/[1,2]"]; first(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++ @@ -284,8 +284,8 @@ first(Config) when is_list(Config) -> last(doc) -> ["Tests last/[1,2]"]; last(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++ @@ -310,8 +310,8 @@ last(Config) when is_list(Config) -> next(doc) -> ["Tests next/[1,2]"]; next(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++ @@ -335,8 +335,8 @@ next(Config) when is_list(Config) -> prev(doc) -> ["Tests prev/[1,2]"]; prev(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++ @@ -364,8 +364,8 @@ select_next(doc) -> ["Tests select/[4,5] with CursorRelation = next "]; select_next(suit) -> []; select_next(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++ @@ -405,8 +405,8 @@ select_relative(doc) -> ["Tests select/[4,5] with CursorRelation = relative "]; select_relative(suit) -> []; select_relative(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++ @@ -446,8 +446,8 @@ select_absolute(doc) -> ["Tests select/[4,5] with CursorRelation = absolute "]; select_absolute(suit) -> []; select_absolute(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++ @@ -479,8 +479,8 @@ select_absolute(Config) when is_list(Config) -> create_table_twice(doc) -> ["Test what happens if you try to create the same table twice."]; create_table_twice(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -497,8 +497,8 @@ create_table_twice(Config) when is_list(Config) -> delete_table_twice(doc) -> ["Test what happens if you try to delete the same table twice."]; delete_table_twice(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -514,8 +514,8 @@ duplicate_key(doc) -> ["Test what happens if you try to use the same key twice"]; duplicate_key(suit) -> []; duplicate_key(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -535,8 +535,8 @@ not_connection_owner(doc) -> ["Test what happens if a process that did not start the connection" " tries to acess it."]; not_connection_owner(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), spawn_link(?MODULE, not_owner, [self(), Ref, Table]), @@ -559,7 +559,7 @@ no_result_set(doc) -> ["Tests what happens if you try to use a function that needs an " "associated result set when there is none."]; no_result_set(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), + Ref = proplists:get_value(connection_ref, Config), {error, result_set_does_not_exist} = odbc:first(Ref), {error, result_set_does_not_exist} = odbc:last(Ref), @@ -575,8 +575,8 @@ no_result_set(Config) when is_list(Config) -> query_error(doc) -> ["Test what happens if there is an error in the query."]; query_error(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -598,8 +598,8 @@ multiple_select_result_sets(doc) -> multiple_select_result_sets(Config) when is_list(Config) -> case ?RDBMS of sqlserver -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -632,8 +632,8 @@ multiple_mix_result_sets(doc) -> multiple_mix_result_sets(Config) when is_list(Config) -> case ?RDBMS of sqlserver -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -663,8 +663,8 @@ multiple_result_sets_error(doc) -> multiple_result_sets_error(Config) when is_list(Config) -> case ?RDBMS of sqlserver -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -696,8 +696,8 @@ param_insert_tiny_int(doc)-> param_insert_tiny_int(Config) when is_list(Config) -> case ?RDBMS of sqlserver -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -729,8 +729,8 @@ param_insert_tiny_int(Config) when is_list(Config) -> param_insert_small_int(doc)-> ["Test insertion of small ints by parameterized queries."]; param_insert_small_int(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -759,8 +759,8 @@ param_insert_small_int(Config) when is_list(Config) -> param_insert_int(doc)-> ["Test insertion of ints by parameterized queries."]; param_insert_int(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -789,8 +789,8 @@ param_insert_int(Config) when is_list(Config) -> param_insert_integer(doc)-> ["Test insertion of integers by parameterized queries."]; param_insert_integer(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -819,8 +819,8 @@ param_insert_integer(Config) when is_list(Config) -> param_insert_decimal(doc)-> ["Test insertion of decimal numbers by parameterized queries."]; param_insert_decimal(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -868,8 +868,8 @@ param_insert_decimal(Config) when is_list(Config) -> param_insert_numeric(doc)-> ["Test insertion of numeric numbers by parameterized queries."]; param_insert_numeric(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -917,8 +917,8 @@ param_insert_numeric(Config) when is_list(Config) -> param_insert_char(doc)-> ["Test insertion of fixed length string by parameterized queries."]; param_insert_char(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -951,8 +951,8 @@ param_insert_char(Config) when is_list(Config) -> param_insert_character(doc)-> ["Test insertion of fixed length string by parameterized queries."]; param_insert_character(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -986,8 +986,8 @@ param_insert_character(Config) when is_list(Config) -> param_insert_char_varying(doc)-> ["Test insertion of variable length strings by parameterized queries."]; param_insert_char_varying(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -1021,8 +1021,8 @@ param_insert_char_varying(Config) when is_list(Config) -> param_insert_character_varying(doc)-> ["Test insertion of variable length strings by parameterized queries."]; param_insert_character_varying(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -1056,8 +1056,8 @@ param_insert_character_varying(Config) when is_list(Config) -> param_insert_float(doc)-> ["Test insertion of floats by parameterized queries."]; param_insert_float(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -1093,8 +1093,8 @@ param_insert_float(Config) when is_list(Config) -> param_insert_real(doc)-> ["Test insertion of real numbers by parameterized queries."]; param_insert_real(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -1132,8 +1132,8 @@ param_insert_real(Config) when is_list(Config) -> param_insert_double(doc)-> ["Test insertion of doubles by parameterized queries."]; param_insert_double(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -1169,8 +1169,8 @@ param_insert_double(Config) when is_list(Config) -> param_insert_mix(doc)-> ["Test insertion of a mixture of datatypes by parameterized queries."]; param_insert_mix(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -1194,8 +1194,8 @@ param_insert_mix(Config) when is_list(Config) -> param_update(doc)-> ["Test parameterized update query."]; param_update(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -1228,8 +1228,8 @@ delete_nonexisting_row(doc) -> % OTP-5759 ["Make a delete...where with false conditions (0 rows deleted). ", "This used to give an error message (see ticket OTP-5759)."]; delete_nonexisting_row(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, "CREATE TABLE " ++ Table @@ -1256,8 +1256,8 @@ delete_nonexisting_row(Config) when is_list(Config) -> param_delete(doc) -> ["Test parameterized delete query."]; param_delete(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -1289,8 +1289,8 @@ param_delete(Config) when is_list(Config) -> param_select(doc) -> ["Test parameterized select query."]; param_select(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -1317,8 +1317,8 @@ param_select(Config) when is_list(Config) -> param_select_empty_params(doc) -> ["Test parameterized select query with no parameters."]; param_select_empty_params(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -1345,8 +1345,8 @@ param_select_empty_params(Config) when is_list(Config) -> param_delete_empty_params(doc) -> ["Test parameterized delete query with no parameters."]; param_delete_empty_params(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -1377,8 +1377,8 @@ param_delete_empty_params(Config) when is_list(Config) -> describe_integer(doc) -> ["Test describe_table/[2,3] for integer columns."]; describe_integer(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -1394,8 +1394,8 @@ describe_integer(Config) when is_list(Config) -> describe_string(doc) -> ["Test describe_table/[2,3] for string columns."]; describe_string(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -1413,8 +1413,8 @@ describe_string(Config) when is_list(Config) -> describe_floating(doc) -> ["Test describe_table/[2,3] for floting columns."]; describe_floating(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -1432,8 +1432,8 @@ describe_dec_num(doc) -> ["Test describe_table/[2,3] for decimal and numerical columns"]; describe_dec_num(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = odbc:sql_query(Ref, @@ -1451,8 +1451,8 @@ describe_timestamp(doc) -> ["Test describe_table/[2,3] for tinmestap columns"]; describe_timestamp(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {updated, _} = % Value == 0 || -1 driver dependent! odbc:sql_query(Ref, "CREATE TABLE " ++ Table ++ @@ -1468,8 +1468,8 @@ describe_no_such_table(doc) -> ["Test what happens if you try to describe a table that does not exist."]; describe_no_such_table(Config) when is_list(Config) -> - Ref = ?config(connection_ref, Config), - Table = ?config(tableName, Config), + Ref = proplists:get_value(connection_ref, Config), + Table = proplists:get_value(tableName, Config), {error, _ } = odbc:describe_table(Ref, Table), ok. -- cgit v1.2.3 From 63551bf2917dce40c8003d7aec05557be62d08bd Mon Sep 17 00:00:00 2001 From: Ingela Anderton Andin Date: Mon, 27 Jun 2016 15:52:27 +0200 Subject: odbc: Replace test_server with ct eqvivalents --- lib/odbc/test/odbc_query_SUITE.erl | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'lib/odbc/test/odbc_query_SUITE.erl') diff --git a/lib/odbc/test/odbc_query_SUITE.erl b/lib/odbc/test/odbc_query_SUITE.erl index f48468dc47..a49cd74a43 100644 --- a/lib/odbc/test/odbc_query_SUITE.erl +++ b/lib/odbc/test/odbc_query_SUITE.erl @@ -113,6 +113,7 @@ init_per_suite(Config) when is_list(Config) -> false -> case (catch odbc:start()) of ok -> + ct:timetrap(?default_timeout), [{tableName, odbc_test_lib:unique_table_name()}| Config]; _ -> {skip, "ODBC not startable"} @@ -144,10 +145,10 @@ end_per_suite(_Config) -> init_per_testcase(_Case, Config) -> {ok, Ref} = odbc:connect(?RDBMS:connection_string(), odbc_test_lib:platform_options()), odbc_test_lib:strict(Ref, ?RDBMS), - Dog = test_server:timetrap(?default_timeout), - Temp = lists:keydelete(connection_ref, 1, Config), - NewConfig = lists:keydelete(watchdog, 1, Temp), - [{watchdog, Dog}, {connection_ref, Ref} | NewConfig]. + + NewConfig = lists:keydelete(connection_ref, 1, Config), + + [{connection_ref, Ref} | NewConfig]. %%-------------------------------------------------------------------- %% Function: end_per_testcase(Case, Config) -> _ @@ -164,10 +165,7 @@ end_per_testcase(_Case, Config) -> Table = proplists:get_value(tableName, Config), {ok, NewRef} = odbc:connect(?RDBMS:connection_string(), odbc_test_lib:platform_options()), odbc:sql_query(NewRef, "DROP TABLE " ++ Table), - odbc:disconnect(NewRef), - Dog = proplists:get_value(watchdog, Config), - test_server:timetrap_cancel(Dog), - ok. + odbc:disconnect(NewRef). %%------------------------------------------------------------------------- %% Test cases starts here. @@ -1080,7 +1078,7 @@ param_insert_float(Config) when is_list(Config) -> true -> ok; false -> - test_server:fail(float_numbers_do_not_match) + ct:fail(float_numbers_do_not_match) end, {'EXIT',{badarg,odbc,param_query,'Params'}} = @@ -1119,7 +1117,7 @@ param_insert_real(Config) when is_list(Config) -> true -> ok; false -> - test_server:fail(real_numbers_do_not_match) + ct:fail(real_numbers_do_not_match) end, {'EXIT',{badarg,odbc,param_query,'Params'}} = @@ -1156,7 +1154,7 @@ param_insert_double(Config) when is_list(Config) -> true -> ok; false -> - test_server:fail(double_numbers_do_not_match) + ct:fail(double_numbers_do_not_match) end, {'EXIT',{badarg,odbc,param_query,'Params'}} = @@ -1481,10 +1479,10 @@ describe_no_such_table(Config) when is_list(Config) -> is_driver_error(Error) -> case is_list(Error) of true -> - test_server:format("Driver error ~p~n", [Error]), + ct:pal("Driver error ~p~n", [Error]), ok; false -> - test_server:fail(Error) + ct:fail(Error) end. is_supported_multiple_resultsets(sqlserver) -> true; -- cgit v1.2.3 From 436d0e3300a64daede0f45dc52920161a5423a0b Mon Sep 17 00:00:00 2001 From: Ingela Anderton Andin Date: Mon, 27 Jun 2016 16:34:59 +0200 Subject: odbc: Convert doc clauses form test_server to ct --- lib/odbc/test/odbc_query_SUITE.erl | 192 ++++++++++++++++++------------------- 1 file changed, 96 insertions(+), 96 deletions(-) (limited to 'lib/odbc/test/odbc_query_SUITE.erl') diff --git a/lib/odbc/test/odbc_query_SUITE.erl b/lib/odbc/test/odbc_query_SUITE.erl index a49cd74a43..c283872965 100644 --- a/lib/odbc/test/odbc_query_SUITE.erl +++ b/lib/odbc/test/odbc_query_SUITE.erl @@ -170,8 +170,8 @@ end_per_testcase(_Case, Config) -> %%------------------------------------------------------------------------- %% Test cases starts here. %%------------------------------------------------------------------------- -stored_proc(doc)-> - ["Test stored proc with OUT param"]; +stored_proc()-> + [{doc, "Test stored proc with OUT param"}]. stored_proc(Config) when is_list(Config) -> case ?RDBMS of X when X == oracle; X == postgres-> @@ -189,8 +189,8 @@ stored_proc(Config) when is_list(Config) -> {skip, "stored proc not yet supported"} end. -sql_query(doc)-> - ["Test the common cases"]; +sql_query()-> + [{doc, "Test the common cases"}]. sql_query(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -231,10 +231,10 @@ sql_query(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -select_count(doc) -> - ["Tests select_count/[2,3]'s timeout, " - " select_count's functionality will be better tested by other tests " - " such as first."]; +select_count() -> + [{doc, "Tests select_count/[2,3]'s timeout, " + " select_count's functionality will be better tested by other tests " + " such as first."}]. select_count(sute) -> []; select_count(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), @@ -253,8 +253,8 @@ select_count(Config) when is_list(Config) -> (catch odbc:select_count(Ref, "SELECT * FROM ", -1)), ok. %%------------------------------------------------------------------------- -first(doc) -> - ["Tests first/[1,2]"]; +first() -> + [doc, {"Tests first/[1,2]"}]. first(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -279,8 +279,8 @@ first(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -last(doc) -> - ["Tests last/[1,2]"]; +last() -> + [{doc, "Tests last/[1,2]"}]. last(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -305,8 +305,8 @@ last(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -next(doc) -> - ["Tests next/[1,2]"]; +next() -> + [{doc, "Tests next/[1,2]"}]. next(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -330,8 +330,8 @@ next(Config) when is_list(Config) -> {'EXIT', {function_clause, _}} = (catch odbc:next(Ref, -1)), ok. %%------------------------------------------------------------------------- -prev(doc) -> - ["Tests prev/[1,2]"]; +prev() -> + [{doc, "Tests prev/[1,2]"}]. prev(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -358,8 +358,8 @@ prev(Config) when is_list(Config) -> {'EXIT', {function_clause, _}} = (catch odbc:prev(Ref, -1)), ok. %%------------------------------------------------------------------------- -select_next(doc) -> - ["Tests select/[4,5] with CursorRelation = next "]; +select_next() -> + [{doc, "Tests select/[4,5] with CursorRelation = next "}]. select_next(suit) -> []; select_next(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), @@ -399,8 +399,8 @@ select_next(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -select_relative(doc) -> - ["Tests select/[4,5] with CursorRelation = relative "]; +select_relative() -> + [{doc, "Tests select/[4,5] with CursorRelation = relative "}]. select_relative(suit) -> []; select_relative(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), @@ -440,8 +440,8 @@ select_relative(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -select_absolute(doc) -> - ["Tests select/[4,5] with CursorRelation = absolute "]; +select_absolute() -> + [{doc, "Tests select/[4,5] with CursorRelation = absolute "}]. select_absolute(suit) -> []; select_absolute(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), @@ -474,8 +474,8 @@ select_absolute(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -create_table_twice(doc) -> - ["Test what happens if you try to create the same table twice."]; +create_table_twice() -> + [{doc, "Test what happens if you try to create the same table twice."}]. create_table_twice(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -492,8 +492,8 @@ create_table_twice(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -delete_table_twice(doc) -> - ["Test what happens if you try to delete the same table twice."]; +delete_table_twice() -> + [{doc, "Test what happens if you try to delete the same table twice."}]. delete_table_twice(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -508,8 +508,8 @@ delete_table_twice(Config) when is_list(Config) -> ok. %------------------------------------------------------------------------- -duplicate_key(doc) -> - ["Test what happens if you try to use the same key twice"]; +duplicate_key() -> + [{doc, "Test what happens if you try to use the same key twice"}]. duplicate_key(suit) -> []; duplicate_key(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), @@ -529,9 +529,9 @@ duplicate_key(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -not_connection_owner(doc) -> - ["Test what happens if a process that did not start the connection" - " tries to acess it."]; +not_connection_owner() -> + [{doc, "Test what happens if a process that did not start the connection" + " tries to acess it."}]. not_connection_owner(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -553,9 +553,9 @@ not_owner(Pid, Ref, Table) -> Pid ! continue. %%------------------------------------------------------------------------- -no_result_set(doc) -> - ["Tests what happens if you try to use a function that needs an " - "associated result set when there is none."]; +no_result_set() -> + [{doc, "Tests what happens if you try to use a function that needs an " + "associated result set when there is none."}]. no_result_set(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), @@ -570,8 +570,8 @@ no_result_set(Config) when is_list(Config) -> odbc:select(Ref, {relative, 2}, 1), ok. %%------------------------------------------------------------------------- -query_error(doc) -> - ["Test what happens if there is an error in the query."]; +query_error() -> + [{doc, "Test what happens if there is an error in the query."}]. query_error(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -591,8 +591,8 @@ query_error(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -multiple_select_result_sets(doc) -> - ["Test what happens if you have a batch of select queries."]; +multiple_select_result_sets() -> + [{doc, "Test what happens if you have a batch of select queries."}]. multiple_select_result_sets(Config) when is_list(Config) -> case ?RDBMS of sqlserver -> @@ -624,9 +624,9 @@ multiple_select_result_sets(Config) when is_list(Config) -> end. %%------------------------------------------------------------------------- -multiple_mix_result_sets(doc) -> - ["Test what happens if you have a batch of select and other type of" - " queries."]; +multiple_mix_result_sets() -> + [{doc, "Test what happens if you have a batch of select and other type of" + " queries."}]. multiple_mix_result_sets(Config) when is_list(Config) -> case ?RDBMS of sqlserver -> @@ -656,8 +656,8 @@ multiple_mix_result_sets(Config) when is_list(Config) -> {skip, "multiple result_set not supported"} end. %%------------------------------------------------------------------------- -multiple_result_sets_error(doc) -> - ["Test what happens if one of the batched queries fails."]; +multiple_result_sets_error() -> + [{doc, "Test what happens if one of the batched queries fails."}]. multiple_result_sets_error(Config) when is_list(Config) -> case ?RDBMS of sqlserver -> @@ -689,8 +689,8 @@ multiple_result_sets_error(Config) when is_list(Config) -> end. %%------------------------------------------------------------------------- -param_insert_tiny_int(doc)-> - ["Test insertion of tiny ints by parameterized queries."]; +param_insert_tiny_int()-> + [{doc,"Test insertion of tiny ints by parameterized queries."}]. param_insert_tiny_int(Config) when is_list(Config) -> case ?RDBMS of sqlserver -> @@ -724,8 +724,8 @@ param_insert_tiny_int(Config) when is_list(Config) -> {skip, "Type tiniyint not supported"} end. %%------------------------------------------------------------------------- -param_insert_small_int(doc)-> - ["Test insertion of small ints by parameterized queries."]; +param_insert_small_int()-> + [{doc,"Test insertion of small ints by parameterized queries."}]. param_insert_small_int(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -754,8 +754,8 @@ param_insert_small_int(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -param_insert_int(doc)-> - ["Test insertion of ints by parameterized queries."]; +param_insert_int()-> + [{doc,"Test insertion of ints by parameterized queries."}]. param_insert_int(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -784,8 +784,8 @@ param_insert_int(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -param_insert_integer(doc)-> - ["Test insertion of integers by parameterized queries."]; +param_insert_integer()-> + [{doc,"Test insertion of integers by parameterized queries."}]. param_insert_integer(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -814,8 +814,8 @@ param_insert_integer(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -param_insert_decimal(doc)-> - ["Test insertion of decimal numbers by parameterized queries."]; +param_insert_decimal()-> + [{doc,"Test insertion of decimal numbers by parameterized queries."}]. param_insert_decimal(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -863,8 +863,8 @@ param_insert_decimal(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -param_insert_numeric(doc)-> - ["Test insertion of numeric numbers by parameterized queries."]; +param_insert_numeric()-> + [{doc,"Test insertion of numeric numbers by parameterized queries."}]. param_insert_numeric(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -912,8 +912,8 @@ param_insert_numeric(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -param_insert_char(doc)-> - ["Test insertion of fixed length string by parameterized queries."]; +param_insert_char()-> + [{doc,"Test insertion of fixed length string by parameterized queries."}]. param_insert_char(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -946,8 +946,8 @@ param_insert_char(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -param_insert_character(doc)-> - ["Test insertion of fixed length string by parameterized queries."]; +param_insert_character()-> + [{doc,"Test insertion of fixed length string by parameterized queries."}]. param_insert_character(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -981,8 +981,8 @@ param_insert_character(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------ -param_insert_char_varying(doc)-> - ["Test insertion of variable length strings by parameterized queries."]; +param_insert_char_varying()-> + [{doc,"Test insertion of variable length strings by parameterized queries."}]. param_insert_char_varying(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -1016,8 +1016,8 @@ param_insert_char_varying(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -param_insert_character_varying(doc)-> - ["Test insertion of variable length strings by parameterized queries."]; +param_insert_character_varying()-> + [{doc,"Test insertion of variable length strings by parameterized queries."}]. param_insert_character_varying(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -1051,8 +1051,8 @@ param_insert_character_varying(Config) when is_list(Config) -> [{{sql_varchar, 10}, ["1", 2]}])), ok. %%------------------------------------------------------------------------- -param_insert_float(doc)-> - ["Test insertion of floats by parameterized queries."]; +param_insert_float()-> + [{doc,"Test insertion of floats by parameterized queries."}]. param_insert_float(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -1088,8 +1088,8 @@ param_insert_float(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -param_insert_real(doc)-> - ["Test insertion of real numbers by parameterized queries."]; +param_insert_real()-> + [{doc,"Test insertion of real numbers by parameterized queries."}]. param_insert_real(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -1127,8 +1127,8 @@ param_insert_real(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -param_insert_double(doc)-> - ["Test insertion of doubles by parameterized queries."]; +param_insert_double()-> + [{doc,"Test insertion of doubles by parameterized queries."}]. param_insert_double(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -1164,8 +1164,8 @@ param_insert_double(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -param_insert_mix(doc)-> - ["Test insertion of a mixture of datatypes by parameterized queries."]; +param_insert_mix()-> + [{doc,"Test insertion of a mixture of datatypes by parameterized queries."}]. param_insert_mix(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -1189,8 +1189,8 @@ param_insert_mix(Config) when is_list(Config) -> odbc:sql_query(Ref, "SELECT * FROM " ++ Table), ok. %%------------------------------------------------------------------------- -param_update(doc)-> - ["Test parameterized update query."]; +param_update()-> + [{doc,"Test parameterized update query."}]. param_update(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -1222,9 +1222,9 @@ param_update(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -delete_nonexisting_row(doc) -> % OTP-5759 - ["Make a delete...where with false conditions (0 rows deleted). ", - "This used to give an error message (see ticket OTP-5759)."]; +delete_nonexisting_row() -> % OTP-5759 + [{doc, "Make a delete...where with false conditions (0 rows deleted). ", + "This used to give an error message (see ticket OTP-5759)."}]. delete_nonexisting_row(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -1251,8 +1251,8 @@ delete_nonexisting_row(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -param_delete(doc) -> - ["Test parameterized delete query."]; +param_delete() -> + [{doc,"Test parameterized delete query."}]. param_delete(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -1284,8 +1284,8 @@ param_delete(Config) when is_list(Config) -> %%------------------------------------------------------------------------- -param_select(doc) -> - ["Test parameterized select query."]; +param_select() -> + [{doc,"Test parameterized select query."}]. param_select(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -1312,8 +1312,8 @@ param_select(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -param_select_empty_params(doc) -> - ["Test parameterized select query with no parameters."]; +param_select_empty_params() -> + [{doc,"Test parameterized select query with no parameters."}]. param_select_empty_params(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -1340,8 +1340,8 @@ param_select_empty_params(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -param_delete_empty_params(doc) -> - ["Test parameterized delete query with no parameters."]; +param_delete_empty_params() -> + [{doc,"Test parameterized delete query with no parameters."}]. param_delete_empty_params(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -1372,8 +1372,8 @@ param_delete_empty_params(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -describe_integer(doc) -> - ["Test describe_table/[2,3] for integer columns."]; +describe_integer() -> + [{doc,"Test describe_table/[2,3] for integer columns."}]. describe_integer(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -1389,8 +1389,8 @@ describe_integer(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -describe_string(doc) -> - ["Test describe_table/[2,3] for string columns."]; +describe_string() -> + [{doc,"Test describe_table/[2,3] for string columns."}]. describe_string(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -1408,8 +1408,8 @@ describe_string(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -describe_floating(doc) -> - ["Test describe_table/[2,3] for floting columns."]; +describe_floating() -> + [{doc,"Test describe_table/[2,3] for floting columns."}]. describe_floating(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), Table = proplists:get_value(tableName, Config), @@ -1426,8 +1426,8 @@ describe_floating(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -describe_dec_num(doc) -> - ["Test describe_table/[2,3] for decimal and numerical columns"]; +describe_dec_num() -> + [{doc,"Test describe_table/[2,3] for decimal and numerical columns"}]. describe_dec_num(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), @@ -1445,8 +1445,8 @@ describe_dec_num(Config) when is_list(Config) -> %%------------------------------------------------------------------------- -describe_timestamp(doc) -> - ["Test describe_table/[2,3] for tinmestap columns"]; +describe_timestamp() -> + [{doc,"Test describe_table/[2,3] for tinmestap columns"}]. describe_timestamp(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), @@ -1462,8 +1462,8 @@ describe_timestamp(Config) when is_list(Config) -> ok. %%------------------------------------------------------------------------- -describe_no_such_table(doc) -> - ["Test what happens if you try to describe a table that does not exist."]; +describe_no_such_table() -> + [{doc,"Test what happens if you try to describe a table that does not exist."}]. describe_no_such_table(Config) when is_list(Config) -> Ref = proplists:get_value(connection_ref, Config), -- cgit v1.2.3