diff options
author | Lars Thorsen <[email protected]> | 2018-04-25 15:09:14 +0200 |
---|---|---|
committer | Lars Thorsen <[email protected]> | 2018-04-27 12:05:30 +0200 |
commit | 6bcdad20c24457393c0d9eeb385d0ff5aa872cd0 (patch) | |
tree | 63162ddfa38d92eaff2193b73277aba18160308c /lib/cosEvent/test | |
parent | 87b06e4ab91729f7415578c8ac0aacec28720ad9 (diff) | |
download | otp-6bcdad20c24457393c0d9eeb385d0ff5aa872cd0.tar.gz otp-6bcdad20c24457393c0d9eeb385d0ff5aa872cd0.tar.bz2 otp-6bcdad20c24457393c0d9eeb385d0ff5aa872cd0.zip |
Move the corba applcations to separate repository
All corba applications are moved to a separate repository.
E.g. orber, ic, cosEvent, cosEventDomain, cosNotifications
cosTime, cosTransactions, cosProperty and cosFileTransfer.
Diffstat (limited to 'lib/cosEvent/test')
-rw-r--r-- | lib/cosEvent/test/Makefile | 150 | ||||
-rw-r--r-- | lib/cosEvent/test/cosEvent.cover | 2 | ||||
-rw-r--r-- | lib/cosEvent/test/cosEvent.spec | 1 | ||||
-rw-r--r-- | lib/cosEvent/test/event_channel_SUITE.erl | 326 | ||||
-rw-r--r-- | lib/cosEvent/test/event_test_PullC_impl.erl | 44 | ||||
-rw-r--r-- | lib/cosEvent/test/event_test_PullS_impl.erl | 58 | ||||
-rw-r--r-- | lib/cosEvent/test/event_test_PushC_impl.erl | 47 | ||||
-rw-r--r-- | lib/cosEvent/test/event_test_PushS_impl.erl | 42 | ||||
-rw-r--r-- | lib/cosEvent/test/event_test_server.idl | 48 | ||||
-rw-r--r-- | lib/cosEvent/test/generated_SUITE.erl | 473 | ||||
-rw-r--r-- | lib/cosEvent/test/idl_output/.gitignore | 0 |
11 files changed, 0 insertions, 1191 deletions
diff --git a/lib/cosEvent/test/Makefile b/lib/cosEvent/test/Makefile deleted file mode 100644 index 878e1c8a4c..0000000000 --- a/lib/cosEvent/test/Makefile +++ /dev/null @@ -1,150 +0,0 @@ -# -# %CopyrightBegin% -# -# Copyright Ericsson AB 1999-2016. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# %CopyrightEnd% -# -# -include $(ERL_TOP)/make/target.mk -include $(ERL_TOP)/make/$(TARGET)/otp.mk - -# ---------------------------------------------------- -# Application version -# ---------------------------------------------------- -include ../vsn.mk -VSN=$(COSEVENT_VSN) -# ---------------------------------------------------- -# Release directory specification -# ---------------------------------------------------- -RELSYSDIR = $(RELEASE_PATH)/cosEvent_test - -# ---------------------------------------------------- -# Target Specs -# ---------------------------------------------------- -TEST_SPEC_FILE = cosEvent.spec -COVER_FILE = cosEvent.cover - - -IDL_FILES = \ - event_test_server.idl \ - -IDLOUTDIR = idl_output - -MODULES = \ - event_test_PushC_impl \ - event_test_PullC_impl \ - event_test_PushS_impl \ - event_test_PullS_impl \ - event_channel_SUITE \ - generated_SUITE - -GEN_MOD_COS = \ - event_test_PullC \ - event_test_PushS \ - event_test_PullS \ - oe_event_test_server \ - event_test_PushC - -GEN_HRL_COS = \ - event_test.hrl \ - event_test_PushC.hrl \ - event_test_PullC.hrl \ - event_test_PushS.hrl \ - event_test_PullS.hrl \ - oe_event_test_server.hrl - - -GEN_MODULES = $(GEN_MOD_COS) - -ERL_FILES = $(MODULES:%=%.erl) - -HRL_FILES = - -GEN_HRL_FILES = $(GEN_HRL_COS) - -GEN_FILES = \ - $(GEN_HRL_FILES:%=$(IDLOUTDIR)/%) \ - $(GEN_MODULES:%=$(IDLOUTDIR)/%.erl) - -GEN_TARGET_FILES = $(GEN_MODULES:%=$(IDLOUTDIR)/%.$(EMULATOR)) - -SUITE_TARGET_FILES = $(MODULES:%=%.$(EMULATOR)) - -TARGET_FILES = \ - $(GEN_TARGET_FILES) \ - $(SUITE_TARGET_FILES) - -# ---------------------------------------------------- -# PROGRAMS -# ---------------------------------------------------- -# ---------------------------------------------------- -# FLAGS -# ---------------------------------------------------- -ERL_IDL_FLAGS += -pa $(ERL_TOP)/lib/orber/ebin -pa $(ERL_TOP)/lib/ic/ebin - -ERL_COMPILE_FLAGS += $(ERL_IDL_FLAGS) \ - -pa $(ERL_TOP)/lib/cosEvent/ebin \ - -pa $(ERL_TOP)/lib/cosEvent/test/idl_output \ - -I$(ERL_TOP)/lib/cosEvent \ - -I$(ERL_TOP)/lib/cosEvent/test/$(IDLOUTDIR) - -# ---------------------------------------------------- -# Targets -# ---------------------------------------------------- -tests debug opt: $(TARGET_FILES) - -clean: - rm -f idl_output/* - rm -rf java_initial_reference_idl java_cos_naming_idl - rm -rf java_iiop_module_idl java_output/* - rm -f $(TARGET_FILES) - rm -f errs core *~ - - -docs: - -# ---------------------------------------------------- -# Special Targets -# ---------------------------------------------------- - -IDL-GENERATED: event_test_server.idl - erlc $(ERL_IDL_FLAGS) -o$(IDLOUTDIR) event_test_server.idl - >IDL-GENERATED - -$(GEN_FILES): IDL-GENERATED - -$(TARGET_FILES): IDL-GENERATED - -# ---------------------------------------------------- -# Release Targets -# ---------------------------------------------------- -# We don't copy generated intermediate erlang and hrl files - -include $(ERL_TOP)/make/otp_release_targets.mk - -release_spec: - -release_docs_spec: - -release_tests_spec: tests - $(INSTALL_DIR) "$(RELSYSDIR)" - $(INSTALL_DATA) $(IDL_FILES) $(TEST_SPEC_FILE) \ - $(COVER_FILE) $(ERL_FILES) "$(RELSYSDIR)" - $(INSTALL_DATA) $(SUITE_TARGET_FILES) "$(RELSYSDIR)" - $(INSTALL_DIR) "$(RELSYSDIR)/$(IDLOUTDIR)" - $(INSTALL_DATA) $(GEN_TARGET_FILES) $(GEN_FILES) \ - "$(RELSYSDIR)/$(IDLOUTDIR)" - diff --git a/lib/cosEvent/test/cosEvent.cover b/lib/cosEvent/test/cosEvent.cover deleted file mode 100644 index df12ea3ca9..0000000000 --- a/lib/cosEvent/test/cosEvent.cover +++ /dev/null @@ -1,2 +0,0 @@ -{incl_app,cosEvent,details}. - diff --git a/lib/cosEvent/test/cosEvent.spec b/lib/cosEvent/test/cosEvent.spec deleted file mode 100644 index f793693779..0000000000 --- a/lib/cosEvent/test/cosEvent.spec +++ /dev/null @@ -1 +0,0 @@ -{suites,"../cosEvent_test",all}. diff --git a/lib/cosEvent/test/event_channel_SUITE.erl b/lib/cosEvent/test/event_channel_SUITE.erl deleted file mode 100644 index bbae8d782a..0000000000 --- a/lib/cosEvent/test/event_channel_SUITE.erl +++ /dev/null @@ -1,326 +0,0 @@ -%%----------------------------------------------------------------- -%% -%% %CopyrightBegin% -%% -%% Copyright Ericsson AB 1997-2016. All Rights Reserved. -%% -%% Licensed under the Apache License, Version 2.0 (the "License"); -%% you may not use this file except in compliance with the License. -%% You may obtain a copy of the License at -%% -%% http://www.apache.org/licenses/LICENSE-2.0 -%% -%% Unless required by applicable law or agreed to in writing, software -%% distributed under the License is distributed on an "AS IS" BASIS, -%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -%% See the License for the specific language governing permissions and -%% limitations under the License. -%% -%% %CopyrightEnd% -%% -%% -%%----------------------------------------------------------------- - --module(event_channel_SUITE). - --include_lib("common_test/include/ct.hrl"). --include_lib("orber/include/corba.hrl"). --include_lib("orber/COSS/CosNaming/CosNaming.hrl"). --include_lib("orber/src/orber_iiop.hrl"). - -%%----------------------------------------------------------------- -%% Macros -%%----------------------------------------------------------------- - --define(default_timeout, test_server:minutes(5)). - - --define(match(ExpectedRes, Expr), - fun() -> - AcTuAlReS = (catch (Expr)), - case AcTuAlReS of - ExpectedRes -> - io:format("------ CORRECT RESULT ------~n~p~n", - [AcTuAlReS]), - AcTuAlReS; - _ -> - io:format("###### ERROR ERROR ######~n~p~n", - [AcTuAlReS]), - exit(AcTuAlReS) - end - end()). - - -%%----------------------------------------------------------------- -%% External exports -%%----------------------------------------------------------------- --export([all/0, suite/0,groups/0,init_per_group/2,end_per_group/2, - event_objects_api/1, events_api/1, events_sync_api/1, - cases/0, init_per_suite/1, end_per_suite/1, - init_per_testcase/2, end_per_testcase/2, app_test/1]). - -%%----------------------------------------------------------------- -%% Internal exports -%%----------------------------------------------------------------- - -suite() -> [{ct_hooks,[ts_install_cth]}]. - -all() -> - cases(). - -groups() -> - []. - -init_per_group(_GroupName, Config) -> - Config. - -end_per_group(_GroupName, Config) -> - Config. - - -cases() -> - [events_api, events_sync_api, event_objects_api, - app_test]. - -%%----------------------------------------------------------------- -%% Init and cleanup functions. -%%----------------------------------------------------------------- - -init_per_testcase(_Case, Config) -> - Dog=test_server:timetrap(?default_timeout), - [{watchdog, Dog}|Config]. - - -end_per_testcase(_Case, Config) -> - Dog = proplists:get_value(watchdog, Config), - test_server:timetrap_cancel(Dog), - ok. - -init_per_suite(Config) when is_list(Config) -> - Path = code:which(?MODULE), - code:add_pathz(filename:join(filename:dirname(Path), "idl_output")), - mnesia:delete_schema([node()]), - mnesia:create_schema([node()]), - orber:install([node()]), - application:start(mnesia), - application:start(orber), - cosEventApp:install(), - cosEventApp:start(), - oe_event_test_server:oe_register(), - Config. - -end_per_suite(Config) when is_list(Config) -> - oe_event_test_server:oe_unregister(), - cosEventApp:stop(), - cosEventApp:uninstall(), - application:stop(orber), - application:stop(mnesia), - mnesia:delete_schema([node()]), - Path = code:which(?MODULE), - code:del_path(filename:join(filename:dirname(Path), "idl_output")), - Config. - -%%----------------------------------------------------------------- -%% Tests app file -%%----------------------------------------------------------------- -app_test(doc) -> []; -app_test(suite) -> []; -app_test(_Config) -> - ok=test_server:app_test(cosEvent), - ok. - - - -%% Testing the CosEvent API to setup a complete service -event_objects_api(_Config) -> - - Ch = ?match({_,key,_,_,_,_}, cosEventApp:start_channel([{typecheck, true}, - {pull_interval, 300}])), - - AC=?match({_,key,_,_,_,_}, - 'CosEventChannelAdmin_EventChannel':for_consumers(Ch)), - AS=?match({_,key,_,_,_,_}, - 'CosEventChannelAdmin_EventChannel':for_suppliers(Ch)), - - PPushS=?match({_,key,_,_,_,_}, - 'CosEventChannelAdmin_ConsumerAdmin':obtain_push_supplier(AC)), - PPullS=?match({_,key,_,_,_,_}, - 'CosEventChannelAdmin_ConsumerAdmin':obtain_pull_supplier(AC)), - - PPushC=?match({_,key,_,_,_,_}, - 'CosEventChannelAdmin_SupplierAdmin':obtain_push_consumer(AS)), - PPullC=?match({_,key,_,_,_,_}, - 'CosEventChannelAdmin_SupplierAdmin':obtain_pull_consumer(AS)), - - PushC=?match({_,key,_,_,_,_}, - 'event_test_PushC':oe_create([])), - PullC=?match({_,key,_,_,_,_}, - 'event_test_PullC':oe_create(PPullC)), - - PushS=?match({_,key,_,_,_,_}, - 'event_test_PushS':oe_create(PPushC)), - - PullS=?match({_,key,_,_,_,_}, - 'event_test_PullS':oe_create([])), - - NIL = corba:create_nil_objref(), - - ?match({'EXCEPTION',{'BAD_PARAM',_,_,_}}, - 'CosEventChannelAdmin_ProxyPushSupplier':connect_push_consumer(PPushS, NIL)), - ?match({'EXCEPTION',{'BAD_PARAM',_,_,_}}, - 'CosEventChannelAdmin_ProxyPushSupplier':connect_push_consumer(PPushS, PullS)), - ?match(ok, 'CosEventChannelAdmin_ProxyPushSupplier':connect_push_consumer(PPushS, PushC)), - ?match({'EXCEPTION',{'CosEventChannelAdmin_AlreadyConnected',_}}, - 'CosEventChannelAdmin_ProxyPushSupplier':connect_push_consumer(PPushS, PushC)), - - ?match(ok, 'CosEventChannelAdmin_ProxyPullSupplier':connect_pull_consumer(PPullS, NIL)), - ?match({'EXCEPTION',{'BAD_PARAM',_,_,_}}, - 'CosEventChannelAdmin_ProxyPullSupplier':connect_pull_consumer(PPullS, PullS)), - ?match(ok, 'CosEventChannelAdmin_ProxyPullSupplier':connect_pull_consumer(PPullS, PullC)), - ?match({'EXCEPTION',{'CosEventChannelAdmin_AlreadyConnected',_}}, - 'CosEventChannelAdmin_ProxyPullSupplier':connect_pull_consumer(PPullS, PullC)), - - ?match(ok, 'CosEventChannelAdmin_ProxyPushConsumer':connect_push_supplier(PPushC, NIL)), - ?match({'EXCEPTION',{'BAD_PARAM',_,_,_}}, - 'CosEventChannelAdmin_ProxyPushConsumer':connect_push_supplier(PPushC, PullS)), - ?match(ok, 'CosEventChannelAdmin_ProxyPushConsumer':connect_push_supplier(PPushC, PushS)), - ?match({'EXCEPTION',{'CosEventChannelAdmin_AlreadyConnected',_}}, - 'CosEventChannelAdmin_ProxyPushConsumer':connect_push_supplier(PPushC, PushS)), - - ?match({'EXCEPTION',{'BAD_PARAM',_,_,_}}, - 'CosEventChannelAdmin_ProxyPullConsumer':connect_pull_supplier(PPullC, NIL)), - ?match({'EXCEPTION',{'BAD_PARAM',_,_,_}}, - 'CosEventChannelAdmin_ProxyPullConsumer':connect_pull_supplier(PPullC, PushS)), - ?match(ok, 'CosEventChannelAdmin_ProxyPullConsumer':connect_pull_supplier(PPullC, PullS)), - ?match({'EXCEPTION',{'CosEventChannelAdmin_AlreadyConnected',_}}, - 'CosEventChannelAdmin_ProxyPullConsumer':connect_pull_supplier(PPullC, PullS)), - - - catch corba:dispose(AC), - %% Wait a couple of seconds to be sure all data removed from DB. - timer:sleep(2000), - - %% Since we terminated ConsumerAdmin only the Supplier Proxies should be terminated. - ?match(true, corba_object:non_existent(AC)), - ?match(true, corba_object:non_existent(PPushS)), - ?match(true, corba_object:non_existent(PPullS)), - - ?match(false, corba_object:non_existent(Ch)), - ?match(false, corba_object:non_existent(AS)), - ?match(false, corba_object:non_existent(PPullC)), - ?match(false, corba_object:non_existent(PPushC)), - - %% Terminate a proxy and check that its admin is unaffected. - catch corba:dispose(PPullC), - timer:sleep(2000), - ?match(false, corba_object:non_existent(AS)), - ?match(true, corba_object:non_existent(PPullC)), - - catch corba:dispose(Ch), - timer:sleep(2000), - - ?match(true, corba_object:non_existent(Ch)), - ?match(true, corba_object:non_existent(AS)), - ?match(true, corba_object:non_existent(PPullC)), - ?match(true, corba_object:non_existent(PPushC)), - - %% The client should be notified; wait for a couple of seconds and check it. - timer:sleep(2000), - ?match(true, corba_object:non_existent(PushC)), - ?match(true, corba_object:non_existent(PullC)), - ?match(true, corba_object:non_existent(PushS)), - ?match(true, corba_object:non_existent(PullS)), - - ok. - -%% Testing the CosEvent API for sending events asynchronous -events_api(_Config) -> - - Ch = ?match({_,key,_,_,_,_}, cosEventApp:start_channel([{typecheck, true}, - {pull_interval, 2}, - {blocking, false}])), - event_sender(Ch). - - -%% Testing the CosEvent API for sending events synchronous -events_sync_api(_Config) -> - - Ch = ?match({_,key,_,_,_,_}, cosEventApp:start_channel([{typecheck, true}, - {pull_interval, 2}, - {blocking, true}])), - event_sender(Ch). - -event_sender(Ch) -> - Event1 = #any{typecode=tk_long, value = 1}, - Event2 = #any{typecode=tk_long, value = 2}, - Event3 = #any{typecode=tk_long, value = 3}, - Event4 = #any{typecode=tk_long, value = 4}, - Event5 = #any{typecode=tk_long, value = 5}, - Event6 = #any{typecode=tk_long, value = 6}, - - AC=?match({_,key,_,_,_,_}, - 'CosEventChannelAdmin_EventChannel':for_consumers(Ch)), - AS=?match({_,key,_,_,_,_}, - 'CosEventChannelAdmin_EventChannel':for_suppliers(Ch)), - - PPushS=?match({_,key,_,_,_,_}, - 'CosEventChannelAdmin_ConsumerAdmin':obtain_push_supplier(AC)), - PPullS=?match({_,key,_,_,_,_}, - 'CosEventChannelAdmin_ConsumerAdmin':obtain_pull_supplier(AC)), - - PPushC=?match({_,key,_,_,_,_}, - 'CosEventChannelAdmin_SupplierAdmin':obtain_push_consumer(AS)), - PPullC=?match({_,key,_,_,_,_}, - 'CosEventChannelAdmin_SupplierAdmin':obtain_pull_consumer(AS)), - - PushC=?match({_,key,_,_,_,_}, 'event_test_PushC':oe_create([])), - PullC=?match({_,key,_,_,_,_}, 'event_test_PullC':oe_create(PPullS)), - - PushS=?match({_,key,_,_,_,_}, 'event_test_PushS':oe_create(PPushC)), - - PullS=?match({_,key,_,_,_,_}, 'event_test_PullS':oe_create([])), - - ?match(ok, 'CosEventChannelAdmin_ProxyPushSupplier':connect_push_consumer(PPushS, PushC)), - ?match(ok, 'CosEventChannelAdmin_ProxyPullSupplier':connect_pull_consumer(PPullS, PullC)), - ?match(ok, 'CosEventChannelAdmin_ProxyPushConsumer':connect_push_supplier(PPushC, PushS)), - ?match(ok, 'CosEventChannelAdmin_ProxyPullConsumer':connect_pull_supplier(PPullC, PullS)), - - %% No events should be available at the consumer side at this point. - ?match({_, false}, event_test_PullC:do_try_pull(PullC)), - ?match([], event_test_PushC:get_data(PushC)), - - %% Push an event and wait to be sure it have reached the destination. - ?match(ok, event_test_PushS:do_push(PushS, Event1)), - ?match(ok, event_test_PushS:do_push(PushS, Event2)), - ?match(ok, event_test_PushS:do_push(PushS, Event3)), - timer:sleep(2000), - ?match({Event1, true}, event_test_PullC:do_try_pull(PullC)), - ?match({Event2, true}, event_test_PullC:do_try_pull(PullC)), - ?match({Event3, true}, event_test_PullC:do_try_pull(PullC)), - ?match({_, false}, event_test_PullC:do_try_pull(PullC)), - ?match([Event1, Event2, Event3], event_test_PushC:get_data(PushC)), - - ?match(ok, event_test_PullS:add_event(PullS, Event4)), - ?match(ok, event_test_PullS:add_event(PullS, Event5)), - ?match(ok, event_test_PullS:add_event(PullS, Event6)), - - %% Since the pull operation is blocking we do not need to "sleep". - %% The ProxyPullConsumer will pull for events according to the pull_interval - %% parameter given when started the channel. - ?match(Event4, event_test_PullC:do_pull(PullC)), - ?match(Event5, event_test_PullC:do_pull(PullC)), - ?match(Event6, event_test_PullC:do_pull(PullC)), - - timer:sleep(2000), - ?match([Event4, Event5, Event6], event_test_PushC:get_data(PushC)), - - - catch corba:dispose(Ch), - %% The client should be notified; wait for a couple of seconds and check it. - timer:sleep(2000), - ?match(true, corba_object:non_existent(PushC)), - ?match(true, corba_object:non_existent(PullC)), - ?match(true, corba_object:non_existent(PushS)), - ?match(true, corba_object:non_existent(PullS)), - - ok. diff --git a/lib/cosEvent/test/event_test_PullC_impl.erl b/lib/cosEvent/test/event_test_PullC_impl.erl deleted file mode 100644 index fb72d2e595..0000000000 --- a/lib/cosEvent/test/event_test_PullC_impl.erl +++ /dev/null @@ -1,44 +0,0 @@ -%%------------------------------------------------------------------------ -%% -%% %CopyrightBegin% -%% -%% Copyright Ericsson AB 2001-2016. All Rights Reserved. -%% -%% Licensed under the Apache License, Version 2.0 (the "License"); -%% you may not use this file except in compliance with the License. -%% You may obtain a copy of the License at -%% -%% http://www.apache.org/licenses/LICENSE-2.0 -%% -%% Unless required by applicable law or agreed to in writing, software -%% distributed under the License is distributed on an "AS IS" BASIS, -%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -%% See the License for the specific language governing permissions and -%% limitations under the License. -%% -%% %CopyrightEnd% -%% -%% -%%------------------------------------------------------------------------ -%% Description: a very simple implementation of PullConsumer interface -%%------------------------------------------------------------------------ --module(event_test_PullC_impl). - --export([init/1, terminate/2, disconnect_pull_consumer/1, do_pull/1, do_try_pull/1]). - -init(Proxy) -> - {ok, Proxy}. - -terminate(_From, _Reason) -> - ok. - -disconnect_pull_consumer(Proxy) -> - io:format("event_test_PullC terminates~n",[]), - {stop, normal, ok, Proxy}. - -do_pull(Proxy) -> - {reply, 'CosEventComm_PullSupplier':pull(Proxy), Proxy}. - -do_try_pull(Proxy) -> - {reply, 'CosEventComm_PullSupplier':try_pull(Proxy), Proxy}. - diff --git a/lib/cosEvent/test/event_test_PullS_impl.erl b/lib/cosEvent/test/event_test_PullS_impl.erl deleted file mode 100644 index de59b251da..0000000000 --- a/lib/cosEvent/test/event_test_PullS_impl.erl +++ /dev/null @@ -1,58 +0,0 @@ -%%------------------------------------------------------------------------ -%% -%% %CopyrightBegin% -%% -%% Copyright Ericsson AB 2001-2016. All Rights Reserved. -%% -%% Licensed under the Apache License, Version 2.0 (the "License"); -%% you may not use this file except in compliance with the License. -%% You may obtain a copy of the License at -%% -%% http://www.apache.org/licenses/LICENSE-2.0 -%% -%% Unless required by applicable law or agreed to in writing, software -%% distributed under the License is distributed on an "AS IS" BASIS, -%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -%% See the License for the specific language governing permissions and -%% limitations under the License. -%% -%% %CopyrightEnd% -%% -%% -%%------------------------------------------------------------------------ -%% Description: a very simple implementation of Pull Supplier interface -%%------------------------------------------------------------------------ --module(event_test_PullS_impl). - --include_lib("orber/include/corba.hrl"). - --export([init/1, terminate/2, pull/1, try_pull/1, disconnect_pull_supplier/1, - add_event/2]). - -init(_) -> - {ok, []}. - -terminate(_From, _Reason) -> - ok. - -pull([]) -> - corba:raise(#'INTERNAL'{completion_status = ?COMPLETED_NO}); -pull([Event|Events]) -> - {reply, Event, Events}. - -try_pull([]) -> - {reply, {#any{typecode=tk_null, value = null}, false}, []}; -try_pull([Event|Events]) -> - {reply, {Event, true}, Events}. - -disconnect_pull_supplier(Events) -> - io:format("event_test_PullS terminates ~p~n", [Events]), - {stop, normal, ok, Events}. - - -add_event(Events, Event) -> - %% Store in FIFO order; don't really care if we use '++' since - %% this operation is used in tests only. - {reply, ok, Events ++ [Event]}. - - diff --git a/lib/cosEvent/test/event_test_PushC_impl.erl b/lib/cosEvent/test/event_test_PushC_impl.erl deleted file mode 100644 index 98e4d611fc..0000000000 --- a/lib/cosEvent/test/event_test_PushC_impl.erl +++ /dev/null @@ -1,47 +0,0 @@ -%%------------------------------------------------------------------------ -%% -%% %CopyrightBegin% -%% -%% Copyright Ericsson AB 2001-2016. All Rights Reserved. -%% -%% Licensed under the Apache License, Version 2.0 (the "License"); -%% you may not use this file except in compliance with the License. -%% You may obtain a copy of the License at -%% -%% http://www.apache.org/licenses/LICENSE-2.0 -%% -%% Unless required by applicable law or agreed to in writing, software -%% distributed under the License is distributed on an "AS IS" BASIS, -%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -%% See the License for the specific language governing permissions and -%% limitations under the License. -%% -%% %CopyrightEnd% -%% -%% -%%------------------------------------------------------------------------ -%% Description: a very simple implementation of Push Consumer interface -%%------------------------------------------------------------------------ - --module(event_test_PushC_impl). - --export([init/1, terminate/2, push/2, disconnect_push_consumer/1, get_data/1]). - -init(_) -> - {ok, []}. - -terminate(_From, _Reason) -> - ok. - -push(Events, Event) -> - {reply, ok, [Event|Events]}. - -disconnect_push_consumer(Events) -> - io:format("event_test_PushC terminates: ~p~n", [Events]), - {stop, normal, ok, Events}. - - -get_data(Events) -> - %% Returns Events in FIFO order and reset state. - {reply, lists:reverse(Events), []}. - diff --git a/lib/cosEvent/test/event_test_PushS_impl.erl b/lib/cosEvent/test/event_test_PushS_impl.erl deleted file mode 100644 index 062ee8a311..0000000000 --- a/lib/cosEvent/test/event_test_PushS_impl.erl +++ /dev/null @@ -1,42 +0,0 @@ -%%------------------------------------------------------------------------ -%% -%% %CopyrightBegin% -%% -%% Copyright Ericsson AB 2001-2016. All Rights Reserved. -%% -%% Licensed under the Apache License, Version 2.0 (the "License"); -%% you may not use this file except in compliance with the License. -%% You may obtain a copy of the License at -%% -%% http://www.apache.org/licenses/LICENSE-2.0 -%% -%% Unless required by applicable law or agreed to in writing, software -%% distributed under the License is distributed on an "AS IS" BASIS, -%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -%% See the License for the specific language governing permissions and -%% limitations under the License. -%% -%% %CopyrightEnd% -%% -%% -%%------------------------------------------------------------------------ -%% Description: a very simple implementation of Push Supplier interface -%%------------------------------------------------------------------------ - --module(event_test_PushS_impl). - --export([init/1, terminate/2, disconnect_push_supplier/1, do_push/2]). - -init(Proxy) -> - {ok, Proxy}. - -terminate(_From, _Reason) -> - ok. - -disconnect_push_supplier(Proxy) -> - io:format("event_test_PullC terminates~n",[]), - {stop, normal, ok, Proxy}. - -do_push(Proxy, Event) -> - {reply, 'CosEventComm_PushConsumer':push(Proxy, Event), Proxy}. - diff --git a/lib/cosEvent/test/event_test_server.idl b/lib/cosEvent/test/event_test_server.idl deleted file mode 100644 index f76ac085e1..0000000000 --- a/lib/cosEvent/test/event_test_server.idl +++ /dev/null @@ -1,48 +0,0 @@ -// -// %CopyrightBegin% -// -// Copyright Ericsson AB 2001-2016. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// %CopyrightEnd% -// - -#ifndef _EVENT_TEST_SERVER_IDL -#define _EVENT_TEST_SERVER_IDL - -#include <../src/CosEventComm.idl> - -module event_test { - - interface PushC : CosEventComm::PushConsumer { - typedef sequence<any> AnySeq; - AnySeq get_data(); - }; - interface PullC : CosEventComm::PullConsumer { - any do_pull(); - any do_try_pull(out boolean has_event); - }; - - interface PushS : CosEventComm::PushSupplier { - void do_push(in any Event); - }; - interface PullS : CosEventComm::PullSupplier { - void add_event(in any Event); - }; - -}; - -#endif - - diff --git a/lib/cosEvent/test/generated_SUITE.erl b/lib/cosEvent/test/generated_SUITE.erl deleted file mode 100644 index 86794023af..0000000000 --- a/lib/cosEvent/test/generated_SUITE.erl +++ /dev/null @@ -1,473 +0,0 @@ -%%----------------------------------------------------------------- -%% -%% %CopyrightBegin% -%% -%% Copyright Ericsson AB 2004-2016. All Rights Reserved. -%% -%% Licensed under the Apache License, Version 2.0 (the "License"); -%% you may not use this file except in compliance with the License. -%% You may obtain a copy of the License at -%% -%% http://www.apache.org/licenses/LICENSE-2.0 -%% -%% Unless required by applicable law or agreed to in writing, software -%% distributed under the License is distributed on an "AS IS" BASIS, -%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -%% See the License for the specific language governing permissions and -%% limitations under the License. -%% -%% %CopyrightEnd% -%% -%% -%%----------------------------------------------------------------- -%% File : generated_SUITE.erl -%% Purpose : -%%----------------------------------------------------------------- - --module(generated_SUITE). - --include_lib("common_test/include/ct.hrl"). --include_lib("orber/include/corba.hrl"). - --define(default_timeout, test_server:minutes(3)). - --define(match(ExpectedRes, Expr), - fun() -> - AcTuAlReS = (catch (Expr)), - case AcTuAlReS of - ExpectedRes -> - AcTuAlReS; - _ -> - io:format("###### ERROR ERROR ######~n~p~n", - [AcTuAlReS]), - exit(AcTuAlReS) - end - end()). - --define(nomatch(Not, Expr), - fun() -> - AcTuAlReS = (catch (Expr)), - case AcTuAlReS of - Not -> - io:format("###### ERROR ERROR ######~n~p~n", - [AcTuAlReS]), - exit(AcTuAlReS); - _ -> - AcTuAlReS - end - end()). - - --define(checktc(_Op), - fun(TC) -> - case orber_tc:check_tc(TC) of - false -> - io:format("###### ERROR ERROR ######~n~p - ~p~n", [Op, TC]), - exit(TC); - true -> - true - end - end). - -%%----------------------------------------------------------------- -%% External exports -%%----------------------------------------------------------------- --export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, - init_per_group/2,end_per_group/2]). - -%%----------------------------------------------------------------- -%% Internal exports -%%----------------------------------------------------------------- --compile(export_all). - -%%----------------------------------------------------------------- -%% Func: all/1 -%% Args: -%% Returns: -%%----------------------------------------------------------------- -suite() -> [{ct_hooks,[ts_install_cth]}]. - -all() -> - ['CosEventChannelAdmin_AlreadyConnected', - 'CosEventChannelAdmin_TypeError', - 'CosEventComm_Disconnected', - 'CosEventChannelAdmin_ConsumerAdmin', - 'CosEventChannelAdmin_EventChannel', - 'CosEventChannelAdmin_ProxyPullConsumer', - 'CosEventChannelAdmin_ProxyPullSupplier', - 'CosEventChannelAdmin_ProxyPushConsumer', - 'CosEventChannelAdmin_ProxyPushSupplier', - 'CosEventChannelAdmin_SupplierAdmin', - oe_CosEventComm_CAdmin, oe_CosEventComm_Channel, - oe_CosEventComm_Event, oe_CosEventComm_PullerS, - oe_CosEventComm_PusherS, 'CosEventComm_PullConsumer', - 'CosEventComm_PullSupplier', - 'CosEventComm_PushConsumer', - 'CosEventComm_PushSupplier']. - -groups() -> - []. - -init_per_suite(Config) -> - Config. - -end_per_suite(_Config) -> - ok. - -init_per_group(_GroupName, Config) -> - Config. - -end_per_group(_GroupName, Config) -> - Config. - - -%%----------------------------------------------------------------- -%% Init and cleanup functions. -%%----------------------------------------------------------------- -init_per_testcase(_Case, Config) -> - Dog=test_server:timetrap(?default_timeout), - [{watchdog, Dog}|Config]. - - -end_per_testcase(_Case, Config) -> - Dog = proplists:get_value(watchdog, Config), - test_server:timetrap_cancel(Dog), - ok. - - -%%----------------------------------------------------------------- -%% Test Case: 'CosEventChannelAdmin_AlreadyConnected' -%% Description: -%%----------------------------------------------------------------- -'CosEventChannelAdmin_AlreadyConnected'(_) -> - ?match(true, orber_tc:check_tc('CosEventChannelAdmin_AlreadyConnected':tc())), - ?match("IDL:omg.org/CosEventChannelAdmin/AlreadyConnected:1.0", - 'CosEventChannelAdmin_AlreadyConnected':id()), - ?match("CosEventChannelAdmin_AlreadyConnected", - 'CosEventChannelAdmin_AlreadyConnected':name()), - ok. - - -%%----------------------------------------------------------------- -%% Test Case: 'CosEventChannelAdmin_TypeError' -%% Description: -%%----------------------------------------------------------------- -'CosEventChannelAdmin_TypeError'(_) -> - ?match(true, orber_tc:check_tc('CosEventChannelAdmin_TypeError':tc())), - ?match("IDL:omg.org/CosEventChannelAdmin/TypeError:1.0", - 'CosEventChannelAdmin_TypeError':id()), - ?match("CosEventChannelAdmin_TypeError", - 'CosEventChannelAdmin_TypeError':name()), - ok. - - -%%----------------------------------------------------------------- -%% Test Case: 'CosEventComm_Disconnected' -%% Description: -%%----------------------------------------------------------------- -'CosEventComm_Disconnected'(_) -> - ?match(true, orber_tc:check_tc('CosEventComm_Disconnected':tc())), - ?match("IDL:omg.org/CosEventComm/Disconnected:1.0", - 'CosEventComm_Disconnected':id()), - ?match("CosEventComm_Disconnected", 'CosEventComm_Disconnected':name()), - ok. - - -%%----------------------------------------------------------------- -%% Test Case: 'CosEventChannelAdmin_ConsumerAdmin' -%% Description: -%%----------------------------------------------------------------- -'CosEventChannelAdmin_ConsumerAdmin'(_) -> - ?nomatch(undefined, 'CosEventChannelAdmin_ConsumerAdmin':oe_tc(obtain_push_supplier)), - ?nomatch(undefined, 'CosEventChannelAdmin_ConsumerAdmin':oe_tc(obtain_pull_supplier)), - ?match(undefined, 'CosEventChannelAdmin_ConsumerAdmin':oe_tc(undefined)), - ?match([_|_], 'CosEventChannelAdmin_ConsumerAdmin':oe_get_interface()), - ?match("IDL:omg.org/CosEventChannelAdmin/ConsumerAdmin:1.0", - 'CosEventChannelAdmin_ConsumerAdmin':typeID()), - check_tc('CosEventChannelAdmin_ConsumerAdmin':oe_get_interface()), - ?match(true, 'CosEventChannelAdmin_ConsumerAdmin':oe_is_a('CosEventChannelAdmin_ConsumerAdmin':typeID())), - ?match(false, 'CosEventChannelAdmin_ConsumerAdmin':oe_is_a("wrong")), - ok. - -%%----------------------------------------------------------------- -%% Test Case: 'CosEventChannelAdmin_EventChannel' -%% Description: -%%----------------------------------------------------------------- -'CosEventChannelAdmin_EventChannel'(_) -> - ?nomatch(undefined, 'CosEventChannelAdmin_EventChannel':oe_tc(for_consumers)), - ?nomatch(undefined, 'CosEventChannelAdmin_EventChannel':oe_tc(for_suppliers)), - ?nomatch(undefined, 'CosEventChannelAdmin_EventChannel':oe_tc(destroy)), - ?match(undefined, 'CosEventChannelAdmin_EventChannel':oe_tc(undefined)), - ?match([_|_], 'CosEventChannelAdmin_EventChannel':oe_get_interface()), - ?match("IDL:omg.org/CosEventChannelAdmin/EventChannel:1.0", - 'CosEventChannelAdmin_EventChannel':typeID()), - check_tc('CosEventChannelAdmin_EventChannel':oe_get_interface()), - ?match(true, 'CosEventChannelAdmin_EventChannel':oe_is_a('CosEventChannelAdmin_EventChannel':typeID())), - ?match(false, 'CosEventChannelAdmin_EventChannel':oe_is_a("wrong")), - ok. - -%%----------------------------------------------------------------- -%% Test Case: 'CosEventChannelAdmin_ProxyPullConsumer' -%% Description: -%%----------------------------------------------------------------- -'CosEventChannelAdmin_ProxyPullConsumer'(_) -> - ?nomatch(undefined, 'CosEventChannelAdmin_ProxyPullConsumer':oe_tc(connect_pull_supplier)), - ?nomatch(undefined, 'CosEventChannelAdmin_ProxyPullConsumer':oe_tc(disconnect_pull_consumer)), - ?match(undefined, 'CosEventChannelAdmin_ProxyPullConsumer':oe_tc(undefined)), - ?match([_|_], 'CosEventChannelAdmin_ProxyPullConsumer':oe_get_interface()), - ?match("IDL:omg.org/CosEventChannelAdmin/ProxyPullConsumer:1.0", - 'CosEventChannelAdmin_ProxyPullConsumer':typeID()), - check_tc('CosEventChannelAdmin_ProxyPullConsumer':oe_get_interface()), - ?match(true, 'CosEventChannelAdmin_ProxyPullConsumer':oe_is_a('CosEventChannelAdmin_ProxyPullConsumer':typeID())), - ?match(true, 'CosEventChannelAdmin_ProxyPullConsumer':oe_is_a('CosEventComm_PullConsumer':typeID())), - ?match(false, 'CosEventChannelAdmin_ProxyPullConsumer':oe_is_a("wrong")), - ok. - -%%----------------------------------------------------------------- -%% Test Case: 'CosEventChannelAdmin_ProxyPullSupplier' -%% Description: -%%----------------------------------------------------------------- -'CosEventChannelAdmin_ProxyPullSupplier'(_) -> - ?nomatch(undefined, 'CosEventChannelAdmin_ProxyPullSupplier':oe_tc(connect_pull_consumer)), - ?nomatch(undefined, 'CosEventChannelAdmin_ProxyPullSupplier':oe_tc(pull)), - ?nomatch(undefined, 'CosEventChannelAdmin_ProxyPullSupplier':oe_tc(try_pull)), - ?nomatch(undefined, 'CosEventChannelAdmin_ProxyPullSupplier':oe_tc(disconnect_pull_supplier)), - ?match(undefined, 'CosEventChannelAdmin_ProxyPullSupplier':oe_tc(undefined)), - ?match([_|_], 'CosEventChannelAdmin_ProxyPullSupplier':oe_get_interface()), - ?match("IDL:omg.org/CosEventChannelAdmin/ProxyPullSupplier:1.0", - 'CosEventChannelAdmin_ProxyPullSupplier':typeID()), - check_tc('CosEventChannelAdmin_ProxyPullSupplier':oe_get_interface()), - ?match(true, 'CosEventChannelAdmin_ProxyPullSupplier':oe_is_a('CosEventChannelAdmin_ProxyPullSupplier':typeID())), - ?match(true, 'CosEventChannelAdmin_ProxyPullSupplier':oe_is_a('CosEventComm_PullSupplier':typeID())), - ?match(false, 'CosEventChannelAdmin_ProxyPullSupplier':oe_is_a("wrong")), - ok. - -%%----------------------------------------------------------------- -%% Test Case: 'CosEventChannelAdmin_ProxyPushConsumer' -%% Description: -%%----------------------------------------------------------------- -'CosEventChannelAdmin_ProxyPushConsumer'(_) -> - ?nomatch(undefined, 'CosEventChannelAdmin_ProxyPushConsumer':oe_tc(connect_push_supplier)), - ?nomatch(undefined, 'CosEventChannelAdmin_ProxyPushConsumer':oe_tc(push)), - ?nomatch(undefined, 'CosEventChannelAdmin_ProxyPushConsumer':oe_tc(disconnect_push_consumer)), - ?match(undefined, 'CosEventChannelAdmin_ProxyPushConsumer':oe_tc(undefined)), - ?match([_|_], 'CosEventChannelAdmin_ProxyPushConsumer':oe_get_interface()), - ?match("IDL:omg.org/CosEventChannelAdmin/ProxyPushConsumer:1.0", - 'CosEventChannelAdmin_ProxyPushConsumer':typeID()), - check_tc('CosEventChannelAdmin_ProxyPushConsumer':oe_get_interface()), - ?match(true, 'CosEventChannelAdmin_ProxyPushConsumer':oe_is_a('CosEventChannelAdmin_ProxyPushConsumer':typeID())), - ?match(true, 'CosEventChannelAdmin_ProxyPushConsumer':oe_is_a('CosEventComm_PushConsumer':typeID())), - ?match(false, 'CosEventChannelAdmin_ProxyPushConsumer':oe_is_a("wrong")), - ok. - -%%----------------------------------------------------------------- -%% Test Case: 'CosEventChannelAdmin_ProxyPushSupplier' -%% Description: -%%----------------------------------------------------------------- -'CosEventChannelAdmin_ProxyPushSupplier'(_) -> - ?nomatch(undefined, 'CosEventChannelAdmin_ProxyPushSupplier':oe_tc(connect_push_consumer)), - ?nomatch(undefined, 'CosEventChannelAdmin_ProxyPushSupplier':oe_tc(disconnect_push_supplier)), - ?match(undefined, 'CosEventChannelAdmin_ProxyPushSupplier':oe_tc(undefined)), - ?match([_|_], 'CosEventChannelAdmin_ProxyPushSupplier':oe_get_interface()), - ?match("IDL:omg.org/CosEventChannelAdmin/ProxyPushSupplier:1.0", - 'CosEventChannelAdmin_ProxyPushSupplier':typeID()), - check_tc('CosEventChannelAdmin_ProxyPushSupplier':oe_get_interface()), - ?match(true, 'CosEventChannelAdmin_ProxyPushSupplier':oe_is_a('CosEventChannelAdmin_ProxyPushSupplier':typeID())), - ?match(true, 'CosEventChannelAdmin_ProxyPushSupplier':oe_is_a('CosEventComm_PushSupplier':typeID())), - ?match(false, 'CosEventChannelAdmin_ProxyPushSupplier':oe_is_a("wrong")), - ok. - -%%----------------------------------------------------------------- -%% Test Case: 'CosEventChannelAdmin_SupplierAdmin' -%% Description: -%%----------------------------------------------------------------- -'CosEventChannelAdmin_SupplierAdmin'(_) -> - ?nomatch(undefined, 'CosEventChannelAdmin_SupplierAdmin':oe_tc(obtain_push_consumer)), - ?nomatch(undefined, 'CosEventChannelAdmin_SupplierAdmin':oe_tc(obtain_pull_consumer)), - ?match(undefined, 'CosEventChannelAdmin_SupplierAdmin':oe_tc(undefined)), - ?match([_|_], 'CosEventChannelAdmin_SupplierAdmin':oe_get_interface()), - ?match("IDL:omg.org/CosEventChannelAdmin/SupplierAdmin:1.0", - 'CosEventChannelAdmin_SupplierAdmin':typeID()), - check_tc('CosEventChannelAdmin_SupplierAdmin':oe_get_interface()), - ?match(true, 'CosEventChannelAdmin_SupplierAdmin':oe_is_a('CosEventChannelAdmin_SupplierAdmin':typeID())), - ?match(false, 'CosEventChannelAdmin_SupplierAdmin':oe_is_a("wrong")), - ok. - -%%----------------------------------------------------------------- -%% Test Case: 'oe_CosEventComm_CAdmin' -%% Description: -%%----------------------------------------------------------------- -'oe_CosEventComm_CAdmin'(_) -> - ?nomatch(undefined, 'oe_CosEventComm_CAdmin':oe_tc(obtain_push_supplier)), - ?nomatch(undefined, 'oe_CosEventComm_CAdmin':oe_tc(obtain_pull_supplier)), - ?nomatch(undefined, 'oe_CosEventComm_CAdmin':oe_tc(send)), - ?nomatch(undefined, 'oe_CosEventComm_CAdmin':oe_tc(send_sync)), - ?match(undefined, 'oe_CosEventComm_CAdmin':oe_tc(undefined)), - ?match([_|_], 'oe_CosEventComm_CAdmin':oe_get_interface()), - ?match("IDL:oe_CosEventComm/CAdmin:1.0", - 'oe_CosEventComm_CAdmin':typeID()), - check_tc('oe_CosEventComm_CAdmin':oe_get_interface()), - ?match(true, 'oe_CosEventComm_CAdmin':oe_is_a('oe_CosEventComm_CAdmin':typeID())), - ?match(true, 'oe_CosEventComm_CAdmin':oe_is_a('CosEventChannelAdmin_ConsumerAdmin':typeID())), - ?match(true, 'oe_CosEventComm_CAdmin':oe_is_a('oe_CosEventComm_Event':typeID())), - ?match(false, 'oe_CosEventComm_CAdmin':oe_is_a("wrong")), - ok. - -%%----------------------------------------------------------------- -%% Test Case: 'oe_CosEventComm_Channel' -%% Description: -%%----------------------------------------------------------------- -'oe_CosEventComm_Channel'(_) -> - ?nomatch(undefined, 'oe_CosEventComm_Channel':oe_tc(for_consumers)), - ?nomatch(undefined, 'oe_CosEventComm_Channel':oe_tc(for_suppliers)), - ?nomatch(undefined, 'oe_CosEventComm_Channel':oe_tc(destroy)), - ?nomatch(undefined, 'oe_CosEventComm_Channel':oe_tc(send)), - ?nomatch(undefined, 'oe_CosEventComm_Channel':oe_tc(send_sync)), - ?match(undefined, 'oe_CosEventComm_Channel':oe_tc(undefined)), - ?match([_|_], 'oe_CosEventComm_Channel':oe_get_interface()), - ?match("IDL:oe_CosEventComm/Channel:1.0", - 'oe_CosEventComm_Channel':typeID()), - check_tc('oe_CosEventComm_Channel':oe_get_interface()), - ?match(true, 'oe_CosEventComm_Channel':oe_is_a('oe_CosEventComm_Channel':typeID())), - ?match(true, 'oe_CosEventComm_Channel':oe_is_a('CosEventChannelAdmin_EventChannel':typeID())), - ?match(true, 'oe_CosEventComm_Channel':oe_is_a('oe_CosEventComm_Event':typeID())), - ?match(false, 'oe_CosEventComm_Channel':oe_is_a("wrong")), - ok. - -%%----------------------------------------------------------------- -%% Test Case: 'oe_CosEventComm_Event' -%% Description: -%%----------------------------------------------------------------- -'oe_CosEventComm_Event'(_) -> - ?nomatch(undefined, 'oe_CosEventComm_Event':oe_tc(send)), - ?nomatch(undefined, 'oe_CosEventComm_Event':oe_tc(send_sync)), - ?match(undefined, 'oe_CosEventComm_Event':oe_tc(undefined)), - ?match([_|_], 'oe_CosEventComm_Event':oe_get_interface()), - ?match("IDL:oe_CosEventComm/Event:1.0", - 'oe_CosEventComm_Event':typeID()), - check_tc('oe_CosEventComm_Event':oe_get_interface()), - ?match(true, 'oe_CosEventComm_Event':oe_is_a('oe_CosEventComm_Event':typeID())), - ?match(false, 'oe_CosEventComm_Event':oe_is_a("wrong")), - ok. - -%%----------------------------------------------------------------- -%% Test Case: 'oe_CosEventComm_PullerS' -%% Description: -%%----------------------------------------------------------------- -'oe_CosEventComm_PullerS'(_) -> - ?nomatch(undefined, 'oe_CosEventComm_PullerS':oe_tc(connect_pull_consumer)), - ?nomatch(undefined, 'oe_CosEventComm_PullerS':oe_tc(pull)), - ?nomatch(undefined, 'oe_CosEventComm_PullerS':oe_tc(try_pull)), - ?nomatch(undefined, 'oe_CosEventComm_PullerS':oe_tc(disconnect_pull_supplier)), - ?nomatch(undefined, 'oe_CosEventComm_PullerS':oe_tc(send)), - ?nomatch(undefined, 'oe_CosEventComm_PullerS':oe_tc(send_sync)), - ?match(undefined, 'oe_CosEventComm_PullerS':oe_tc(undefined)), - ?match([_|_], 'oe_CosEventComm_PullerS':oe_get_interface()), - ?match("IDL:oe_CosEventComm/PullerS:1.0", - 'oe_CosEventComm_PullerS':typeID()), - check_tc('oe_CosEventComm_PullerS':oe_get_interface()), - ?match(true, 'oe_CosEventComm_PullerS':oe_is_a('oe_CosEventComm_PullerS':typeID())), - ?match(true, 'oe_CosEventComm_PullerS':oe_is_a('CosEventChannelAdmin_ProxyPullSupplier':typeID())), - ?match(true, 'oe_CosEventComm_PullerS':oe_is_a('CosEventComm_PullSupplier':typeID())), - ?match(true, 'oe_CosEventComm_PullerS':oe_is_a('oe_CosEventComm_Event':typeID())), - ?match(false, 'oe_CosEventComm_PullerS':oe_is_a("wrong")), - ok. - -%%----------------------------------------------------------------- -%% Test Case: 'oe_CosEventComm_PusherS' -%% Description: -%%----------------------------------------------------------------- -'oe_CosEventComm_PusherS'(_) -> - ?nomatch(undefined, 'oe_CosEventComm_PusherS':oe_tc(connect_push_consumer)), - ?nomatch(undefined, 'oe_CosEventComm_PusherS':oe_tc(disconnect_push_supplier)), - ?nomatch(undefined, 'oe_CosEventComm_PusherS':oe_tc(send)), - ?nomatch(undefined, 'oe_CosEventComm_PusherS':oe_tc(send_sync)), - ?match(undefined, 'oe_CosEventComm_PusherS':oe_tc(undefined)), - ?match([_|_], 'oe_CosEventComm_PusherS':oe_get_interface()), - ?match("IDL:oe_CosEventComm/PusherS:1.0", - 'oe_CosEventComm_PusherS':typeID()), - check_tc('oe_CosEventComm_PusherS':oe_get_interface()), - ?match(true, 'oe_CosEventComm_PusherS':oe_is_a('oe_CosEventComm_PusherS':typeID())), - ?match(true, 'oe_CosEventComm_PusherS':oe_is_a('CosEventChannelAdmin_ProxyPushSupplier':typeID())), - ?match(true, 'oe_CosEventComm_PusherS':oe_is_a('CosEventComm_PushSupplier':typeID())), - ?match(true, 'oe_CosEventComm_PusherS':oe_is_a('oe_CosEventComm_Event':typeID())), - ?match(false, 'oe_CosEventComm_PusherS':oe_is_a("wrong")), - ok. - -%%----------------------------------------------------------------- -%% Test Case: 'CosEventComm_PullConsumer' -%% Description: -%%----------------------------------------------------------------- -'CosEventComm_PullConsumer'(_) -> - ?nomatch(undefined, 'CosEventComm_PullConsumer':oe_tc(disconnect_pull_consumer)), - ?match(undefined, 'CosEventComm_PullConsumer':oe_tc(undefined)), - ?match([_|_], 'CosEventComm_PullConsumer':oe_get_interface()), - ?match("IDL:omg.org/CosEventComm/PullConsumer:1.0", - 'CosEventComm_PullConsumer':typeID()), - check_tc('CosEventComm_PullConsumer':oe_get_interface()), - ?match(true, 'CosEventComm_PullConsumer':oe_is_a('CosEventComm_PullConsumer':typeID())), - ?match(false, 'CosEventComm_PullConsumer':oe_is_a("wrong")), - ok. - -%%----------------------------------------------------------------- -%% Test Case: 'CosEventComm_PullSupplier' -%% Description: -%%----------------------------------------------------------------- -'CosEventComm_PullSupplier'(_) -> - ?nomatch(undefined, 'CosEventComm_PullSupplier':oe_tc(pull)), - ?nomatch(undefined, 'CosEventComm_PullSupplier':oe_tc(try_pull)), - ?nomatch(undefined, 'CosEventComm_PullSupplier':oe_tc(disconnect_pull_supplier)), - ?match(undefined, 'CosEventComm_PullSupplier':oe_tc(undefined)), - ?match([_|_], 'CosEventComm_PullSupplier':oe_get_interface()), - ?match("IDL:omg.org/CosEventComm/PullSupplier:1.0", - 'CosEventComm_PullSupplier':typeID()), - check_tc('CosEventComm_PullSupplier':oe_get_interface()), - ?match(true, 'CosEventComm_PullSupplier':oe_is_a('CosEventComm_PullSupplier':typeID())), - ?match(false, 'CosEventComm_PullSupplier':oe_is_a("wrong")), - ok. - -%%----------------------------------------------------------------- -%% Test Case: 'CosEventComm_PushConsumer' -%% Description: -%%----------------------------------------------------------------- -'CosEventComm_PushConsumer'(_) -> - ?nomatch(undefined, 'CosEventComm_PushConsumer':oe_tc(push)), - ?nomatch(undefined, 'CosEventComm_PushConsumer':oe_tc(disconnect_push_consumer)), - ?match(undefined, 'CosEventComm_PushConsumer':oe_tc(undefined)), - ?match([_|_], 'CosEventComm_PushConsumer':oe_get_interface()), - ?match("IDL:omg.org/CosEventComm/PushConsumer:1.0", - 'CosEventComm_PushConsumer':typeID()), - check_tc('CosEventComm_PushConsumer':oe_get_interface()), - ?match(true, 'CosEventComm_PushConsumer':oe_is_a('CosEventComm_PushConsumer':typeID())), - ?match(false, 'CosEventComm_PushConsumer':oe_is_a("wrong")), - ok. - -%%----------------------------------------------------------------- -%% Test Case: 'CosEventComm_PushSupplier' -%% Description: -%%----------------------------------------------------------------- -'CosEventComm_PushSupplier'(_) -> - ?nomatch(undefined, 'CosEventComm_PushSupplier':oe_tc(disconnect_push_supplier)), - ?match(undefined, 'CosEventComm_PushSupplier':oe_tc(undefined)), - ?match([_|_], 'CosEventComm_PushSupplier':oe_get_interface()), - ?match("IDL:omg.org/CosEventComm/PushSupplier:1.0", - 'CosEventComm_PushSupplier':typeID()), - check_tc('CosEventComm_PushSupplier':oe_get_interface()), - ?match(true, 'CosEventComm_PushSupplier':oe_is_a('CosEventComm_PushSupplier':typeID())), - ?match(false, 'CosEventComm_PushSupplier':oe_is_a("wrong")), - ok. - - - -%%----------------------------------------------------------------- -%% MISC functions -%%----------------------------------------------------------------- -check_tc([]) -> - ok; -check_tc([{Op, {RetType, InParameters, OutParameters}}|T]) -> - io:format("checked - ~s~n", [Op]), - lists:all(?checktc(Op), [RetType|InParameters]), - lists:all(?checktc(Op), OutParameters), - check_tc(T). - - diff --git a/lib/cosEvent/test/idl_output/.gitignore b/lib/cosEvent/test/idl_output/.gitignore deleted file mode 100644 index e69de29bb2..0000000000 --- a/lib/cosEvent/test/idl_output/.gitignore +++ /dev/null |