diff options
Diffstat (limited to 'lib/cosProperty')
-rw-r--r-- | lib/cosProperty/doc/src/notes.xml | 22 | ||||
-rw-r--r-- | lib/cosProperty/test/Makefile | 129 | ||||
-rw-r--r-- | lib/cosProperty/test/cosProperty.spec | 20 | ||||
-rw-r--r-- | lib/cosProperty/test/generated_SUITE.erl | 571 | ||||
-rw-r--r-- | lib/cosProperty/test/property_SUITE.erl | 747 | ||||
-rw-r--r-- | lib/cosProperty/vsn.mk | 12 |
6 files changed, 1487 insertions, 14 deletions
diff --git a/lib/cosProperty/doc/src/notes.xml b/lib/cosProperty/doc/src/notes.xml index e80c90849f..11e6205ee9 100644 --- a/lib/cosProperty/doc/src/notes.xml +++ b/lib/cosProperty/doc/src/notes.xml @@ -4,7 +4,7 @@ <chapter> <header> <copyright> - <year>2000</year><year>2009</year> + <year>2000</year><year>2010</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -13,12 +13,12 @@ compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at http://www.erlang.org/. - + Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. - + </legalnotice> <title>cosProperty Release Notes</title> @@ -32,6 +32,22 @@ </header> <section> + <title>cosProperty 1.1.12</title> + + <section> + <title>Improvements and New Features</title> + <list type="bulleted"> + <item> + <p> + Test suites published.</p> + <p> + Own Id: OTP-8543 Aux Id:</p> + </item> + </list> + </section> + </section> + + <section> <title>cosProperty 1.1.11</title> <section> diff --git a/lib/cosProperty/test/Makefile b/lib/cosProperty/test/Makefile new file mode 100644 index 0000000000..ac0f4e298d --- /dev/null +++ b/lib/cosProperty/test/Makefile @@ -0,0 +1,129 @@ +# +# %CopyrightBegin% +# +# Copyright Ericsson AB 2000-2009. All Rights Reserved. +# +# The contents of this file are subject to the Erlang Public License, +# Version 1.1, (the "License"); you may not use this file except in +# compliance with the License. You should have received a copy of the +# Erlang Public License along with this software. If not, it can be +# retrieved online at http://www.erlang.org/. +# +# Software distributed under the License is distributed on an "AS IS" +# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +# the License for the specific language governing rights 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=$(COSPROPERTY_VSN) +# ---------------------------------------------------- +# Release directory specification +# ---------------------------------------------------- +RELSYSDIR = $(RELEASE_PATH)/cosProperty_test + +# ---------------------------------------------------- +# Target Specs +# ---------------------------------------------------- +TEST_SPEC_FILE = cosProperty.spec + + +IDL_FILES = + +IDLOUTDIR = idl_output + +MODULES = \ + property_SUITE \ + generated_SUITE + +GEN_MODULES = \ + +GEN_HRL_FILES = \ + +ERL_FILES = $(MODULES:%=%.erl) + +HRL_FILES = + +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 +# ---------------------------------------------------- +LOCAL_CLASSPATH = $(ERL_TOP)lib/cosProperty/priv:$(ERL_TOP)lib/cosProperty/test +# ---------------------------------------------------- +# FLAGS +# ---------------------------------------------------- +ERL_IDL_FLAGS += -pa $(ERL_TOP)/lib/cosProperty/ebin \ + -pa $(ERL_TOP)/lib/cosProperty/src \ + -pa $(ERL_TOP)/lib/orber/ebin \ + -pa $(ERL_TOP)/lib/ic/ebin + +ERL_COMPILE_FLAGS += \ + $(ERL_IDL_FLAGS) \ + -pa $(ERL_TOP)/lib/orber/include \ + -pa $(ERL_TOP)/internal_tools/test_server/ebin \ + -pa $(ERL_TOP)/lib/cosProperty/ebin \ + -pa $(ERL_TOP)/lib/cosProperty/test/idl_output \ + -I$(ERL_TOP)/lib/orber/include \ + -I$(ERL_TOP)/lib/cosProperty/src \ + -I$(ERL_TOP)/lib/cosProperty \ + -I$(ERL_TOP)/lib/cosProperty/test/$(IDLOUTDIR) \ + -I$(ERL_TOP)/lib/test_server/include + +# ---------------------------------------------------- +# Targets +# ---------------------------------------------------- + + +tests debug opt: $(TARGET_FILES) + +clean: + rm -f idl_output/* + rm -f $(TARGET_FILES) + rm -f errs core *~ + +docs: + +# ---------------------------------------------------- +# Special Targets +# ---------------------------------------------------- + +# ---------------------------------------------------- +# 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) \ + $(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/cosProperty/test/cosProperty.spec b/lib/cosProperty/test/cosProperty.spec new file mode 100644 index 0000000000..d3e0001eef --- /dev/null +++ b/lib/cosProperty/test/cosProperty.spec @@ -0,0 +1,20 @@ +%% +%% %CopyrightBegin% +%% +%% Copyright Ericsson AB 2000-2010. All Rights Reserved. +%% +%% The contents of this file are subject to the Erlang Public License, +%% Version 1.1, (the "License"); you may not use this file except in +%% compliance with the License. You should have received a copy of the +%% Erlang Public License along with this software. If not, it can be +%% retrieved online at http://www.erlang.org/. +%% +%% Software distributed under the License is distributed on an "AS IS" +%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +%% the License for the specific language governing rights and limitations +%% under the License. +%% +%% %CopyrightEnd% +%% +{topcase, {dir, "../cosProperty_test"}}. + diff --git a/lib/cosProperty/test/generated_SUITE.erl b/lib/cosProperty/test/generated_SUITE.erl new file mode 100644 index 0000000000..80a7953949 --- /dev/null +++ b/lib/cosProperty/test/generated_SUITE.erl @@ -0,0 +1,571 @@ +%%----------------------------------------------------------------- +%% +%% %CopyrightBegin% +%% +%% Copyright Ericsson AB 2004-2009. All Rights Reserved. +%% +%% The contents of this file are subject to the Erlang Public License, +%% Version 1.1, (the "License"); you may not use this file except in +%% compliance with the License. You should have received a copy of the +%% Erlang Public License along with this software. If not, it can be +%% retrieved online at http://www.erlang.org/. +%% +%% Software distributed under the License is distributed on an "AS IS" +%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +%% the License for the specific language governing rights and limitations +%% under the License. +%% +%% %CopyrightEnd% +%% +%% +%%----------------------------------------------------------------- +%% File : generated_SUITE.erl +%% Purpose : +%%----------------------------------------------------------------- + +-module(generated_SUITE). + +-include("test_server.hrl"). +-include_lib("orber/include/corba.hrl"). + +-define(default_timeout, ?t:minutes(3)). + +-define(match(ExpectedRes, Expr), + fun() -> + AcTuAlReS = (catch (Expr)), + case AcTuAlReS of + ExpectedRes -> + AcTuAlReS; + _ -> + io:format("###### ERROR ERROR ######~n~p~n", + [AcTuAlReS]), + ?line exit(AcTuAlReS) + end + end()). + +-define(nomatch(Not, Expr), + fun() -> + AcTuAlReS = (catch (Expr)), + case AcTuAlReS of + Not -> + io:format("###### ERROR ERROR ######~n~p~n", + [AcTuAlReS]), + ?line 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]), + ?line exit(TC); + true -> + true + end + end). + +%%----------------------------------------------------------------- +%% External exports +%%----------------------------------------------------------------- +-export([all/1]). + +%%----------------------------------------------------------------- +%% Internal exports +%%----------------------------------------------------------------- +-export([]). +-compile(export_all). + +%%----------------------------------------------------------------- +%% Func: all/1 +%% Args: +%% Returns: +%%----------------------------------------------------------------- +all(doc) -> ["This suite is for testing IC generated files"]; +all(suite) -> + ['CosPropertyService_ConflictingProperty', 'CosPropertyService_ConstraintNotSupported', + 'CosPropertyService_FixedProperty', 'CosPropertyService_InvalidPropertyName', + 'CosPropertyService_MultipleExceptions', 'CosPropertyService_Properties', + 'CosPropertyService_Property', 'CosPropertyService_PropertyDef', + 'CosPropertyService_PropertyDefs', 'CosPropertyService_PropertyException', + 'CosPropertyService_PropertyExceptions', 'CosPropertyService_PropertyMode', + 'CosPropertyService_PropertyModes', 'CosPropertyService_PropertyNames', + 'CosPropertyService_PropertyNotFound', 'CosPropertyService_PropertyTypes', + 'CosPropertyService_ReadOnlyProperty', 'CosPropertyService_UnsupportedMode', + 'CosPropertyService_UnsupportedProperty', 'CosPropertyService_UnsupportedTypeCode', + 'CosPropertyService_PropertyNamesIterator', 'CosPropertyService_PropertiesIterator', + 'CosPropertyService_PropertySet', 'CosPropertyService_PropertySetDef', + 'CosPropertyService_PropertySetDefFactory', 'CosPropertyService_PropertySetFactory']. + + +%%----------------------------------------------------------------- +%% Init and cleanup functions. +%%----------------------------------------------------------------- +init_per_testcase(_Case, Config) -> + ?line Dog=test_server:timetrap(?default_timeout), + [{watchdog, Dog}|Config]. + + +fin_per_testcase(_Case, Config) -> + Dog = ?config(watchdog, Config), + test_server:timetrap_cancel(Dog), + ok. + + + + +%%----------------------------------------------------------------- +%% Test Case: 'CosPropertyService_ConflictingProperty' +%% Description: +%%----------------------------------------------------------------- +'CosPropertyService_ConflictingProperty'(doc) -> ["CosPropertyService_ConflictingProperty"]; +'CosPropertyService_ConflictingProperty'(suite) -> []; +'CosPropertyService_ConflictingProperty'(_) -> + ?match(true, orber_tc:check_tc('CosPropertyService_ConflictingProperty':tc())), + ?match("IDL:omg.org/CosPropertyService/ConflictingProperty:1.0", + 'CosPropertyService_ConflictingProperty':id()), + ?match("CosPropertyService_ConflictingProperty", + 'CosPropertyService_ConflictingProperty':name()), + ok. + + +%%----------------------------------------------------------------- +%% Test Case: 'CosPropertyService_ConstraintNotSupported' +%% Description: +%%----------------------------------------------------------------- +'CosPropertyService_ConstraintNotSupported'(doc) -> ["CosPropertyService_ConstraintNotSupported"]; +'CosPropertyService_ConstraintNotSupported'(suite) -> []; +'CosPropertyService_ConstraintNotSupported'(_) -> + ?match(true, orber_tc:check_tc('CosPropertyService_ConstraintNotSupported':tc())), + ?match("IDL:omg.org/CosPropertyService/ConstraintNotSupported:1.0", + 'CosPropertyService_ConstraintNotSupported':id()), + ?match("CosPropertyService_ConstraintNotSupported", + 'CosPropertyService_ConstraintNotSupported':name()), + ok. + + +%%----------------------------------------------------------------- +%% Test Case: 'CosPropertyService_FixedProperty' +%% Description: +%%----------------------------------------------------------------- +'CosPropertyService_FixedProperty'(doc) -> ["CosPropertyService_FixedProperty"]; +'CosPropertyService_FixedProperty'(suite) -> []; +'CosPropertyService_FixedProperty'(_) -> + ?match(true, orber_tc:check_tc('CosPropertyService_FixedProperty':tc())), + ?match("IDL:omg.org/CosPropertyService/FixedProperty:1.0", + 'CosPropertyService_FixedProperty':id()), + ?match("CosPropertyService_FixedProperty", + 'CosPropertyService_FixedProperty':name()), + ok. + + +%%----------------------------------------------------------------- +%% Test Case: 'CosPropertyService_InvalidPropertyName' +%% Description: +%%----------------------------------------------------------------- +'CosPropertyService_InvalidPropertyName'(doc) -> ["CosPropertyService_InvalidPropertyName"]; +'CosPropertyService_InvalidPropertyName'(suite) -> []; +'CosPropertyService_InvalidPropertyName'(_) -> + ?match(true, orber_tc:check_tc('CosPropertyService_InvalidPropertyName':tc())), + ?match("IDL:omg.org/CosPropertyService/InvalidPropertyName:1.0", + 'CosPropertyService_InvalidPropertyName':id()), + ?match("CosPropertyService_InvalidPropertyName", + 'CosPropertyService_InvalidPropertyName':name()), + ok. + + +%%----------------------------------------------------------------- +%% Test Case: 'CosPropertyService_MultipleExceptions' +%% Description: +%%----------------------------------------------------------------- +'CosPropertyService_MultipleExceptions'(doc) -> ["CosPropertyService_MultipleExceptions"]; +'CosPropertyService_MultipleExceptions'(suite) -> []; +'CosPropertyService_MultipleExceptions'(_) -> + ?match(true, orber_tc:check_tc('CosPropertyService_MultipleExceptions':tc())), + ?match("IDL:omg.org/CosPropertyService/MultipleExceptions:1.0", + 'CosPropertyService_MultipleExceptions':id()), + ?match("CosPropertyService_MultipleExceptions", + 'CosPropertyService_MultipleExceptions':name()), + ok. + + +%%----------------------------------------------------------------- +%% Test Case: 'CosPropertyService_Properties' +%% Description: +%%----------------------------------------------------------------- +'CosPropertyService_Properties'(doc) -> ["CosPropertyService_Properties"]; +'CosPropertyService_Properties'(suite) -> []; +'CosPropertyService_Properties'(_) -> + ?match(true, orber_tc:check_tc('CosPropertyService_Properties':tc())), + ?match("IDL:omg.org/CosPropertyService/Properties:1.0", + 'CosPropertyService_Properties':id()), + ?match("CosPropertyService_Properties", + 'CosPropertyService_Properties':name()), + ok. + + +%%----------------------------------------------------------------- +%% Test Case: 'CosPropertyService_Property' +%% Description: +%%----------------------------------------------------------------- +'CosPropertyService_Property'(doc) -> ["CosPropertyService_Property"]; +'CosPropertyService_Property'(suite) -> []; +'CosPropertyService_Property'(_) -> + ?match(true, orber_tc:check_tc('CosPropertyService_Property':tc())), + ?match("IDL:omg.org/CosPropertyService/Property:1.0", + 'CosPropertyService_Property':id()), + ?match("CosPropertyService_Property", + 'CosPropertyService_Property':name()), + ok. + + +%%----------------------------------------------------------------- +%% Test Case: 'CosPropertyService_PropertyDef' +%% Description: +%%----------------------------------------------------------------- +'CosPropertyService_PropertyDef'(doc) -> ["CosPropertyService_PropertyDef"]; +'CosPropertyService_PropertyDef'(suite) -> []; +'CosPropertyService_PropertyDef'(_) -> + ?match(true, orber_tc:check_tc('CosPropertyService_PropertyDef':tc())), + ?match("IDL:omg.org/CosPropertyService/PropertyDef:1.0", + 'CosPropertyService_PropertyDef':id()), + ?match("CosPropertyService_PropertyDef", + 'CosPropertyService_PropertyDef':name()), + ok. + + +%%----------------------------------------------------------------- +%% Test Case: 'CosPropertyService_PropertyDefs' +%% Description: +%%----------------------------------------------------------------- +'CosPropertyService_PropertyDefs'(doc) -> ["CosPropertyService_PropertyDefs"]; +'CosPropertyService_PropertyDefs'(suite) -> []; +'CosPropertyService_PropertyDefs'(_) -> + ?match(true, orber_tc:check_tc('CosPropertyService_PropertyDefs':tc())), + ?match("IDL:omg.org/CosPropertyService/PropertyDefs:1.0", + 'CosPropertyService_PropertyDefs':id()), + ?match("CosPropertyService_PropertyDefs", + 'CosPropertyService_PropertyDefs':name()), + ok. + + +%%----------------------------------------------------------------- +%% Test Case: 'CosPropertyService_PropertyException' +%% Description: +%%----------------------------------------------------------------- +'CosPropertyService_PropertyException'(doc) -> ["CosPropertyService_PropertyException"]; +'CosPropertyService_PropertyException'(suite) -> []; +'CosPropertyService_PropertyException'(_) -> + ?match(true, orber_tc:check_tc('CosPropertyService_PropertyException':tc())), + ?match("IDL:omg.org/CosPropertyService/PropertyException:1.0", + 'CosPropertyService_PropertyException':id()), + ?match("CosPropertyService_PropertyException", + 'CosPropertyService_PropertyException':name()), + ok. + + +%%----------------------------------------------------------------- +%% Test Case: 'CosPropertyService_PropertyExceptions' +%% Description: +%%----------------------------------------------------------------- +'CosPropertyService_PropertyExceptions'(doc) -> ["CosPropertyService_PropertyExceptions"]; +'CosPropertyService_PropertyExceptions'(suite) -> []; +'CosPropertyService_PropertyExceptions'(_) -> + ?match(true, orber_tc:check_tc('CosPropertyService_PropertyExceptions':tc())), + ?match("IDL:omg.org/CosPropertyService/PropertyExceptions:1.0", + 'CosPropertyService_PropertyExceptions':id()), + ?match("CosPropertyService_PropertyExceptions", + 'CosPropertyService_PropertyExceptions':name()), + ok. + + +%%----------------------------------------------------------------- +%% Test Case: 'CosPropertyService_PropertyMode' +%% Description: +%%----------------------------------------------------------------- +'CosPropertyService_PropertyMode'(doc) -> ["CosPropertyService_PropertyMode"]; +'CosPropertyService_PropertyMode'(suite) -> []; +'CosPropertyService_PropertyMode'(_) -> + ?match(true, orber_tc:check_tc('CosPropertyService_PropertyMode':tc())), + ?match("IDL:omg.org/CosPropertyService/PropertyMode:1.0", + 'CosPropertyService_PropertyMode':id()), + ?match("CosPropertyService_PropertyMode", + 'CosPropertyService_PropertyMode':name()), + ok. + + +%%----------------------------------------------------------------- +%% Test Case: 'CosPropertyService_PropertyModes' +%% Description: +%%----------------------------------------------------------------- +'CosPropertyService_PropertyModes'(doc) -> ["CosPropertyService_PropertyModes"]; +'CosPropertyService_PropertyModes'(suite) -> []; +'CosPropertyService_PropertyModes'(_) -> + ?match(true, orber_tc:check_tc('CosPropertyService_PropertyModes':tc())), + ?match("IDL:omg.org/CosPropertyService/PropertyModes:1.0", + 'CosPropertyService_PropertyModes':id()), + ?match("CosPropertyService_PropertyModes", + 'CosPropertyService_PropertyModes':name()), + ok. + + +%%----------------------------------------------------------------- +%% Test Case: 'CosPropertyService_PropertyNames' +%% Description: +%%----------------------------------------------------------------- +'CosPropertyService_PropertyNames'(doc) -> ["CosPropertyService_PropertyNames"]; +'CosPropertyService_PropertyNames'(suite) -> []; +'CosPropertyService_PropertyNames'(_) -> + ?match(true, orber_tc:check_tc('CosPropertyService_PropertyNames':tc())), + ?match("IDL:omg.org/CosPropertyService/PropertyNames:1.0", + 'CosPropertyService_PropertyNames':id()), + ?match("CosPropertyService_PropertyNames", + 'CosPropertyService_PropertyNames':name()), + ok. + +%%----------------------------------------------------------------- +%% Test Case: 'CosPropertyService_PropertyNotFound' +%% Description: +%%----------------------------------------------------------------- +'CosPropertyService_PropertyNotFound'(doc) -> ["CosPropertyService_PropertyNotFound"]; +'CosPropertyService_PropertyNotFound'(suite) -> []; +'CosPropertyService_PropertyNotFound'(_) -> + ?match(true, orber_tc:check_tc('CosPropertyService_PropertyNotFound':tc())), + ?match("IDL:omg.org/CosPropertyService/PropertyNotFound:1.0", + 'CosPropertyService_PropertyNotFound':id()), + ?match("CosPropertyService_PropertyNotFound", + 'CosPropertyService_PropertyNotFound':name()), + ok. + +%%----------------------------------------------------------------- +%% Test Case: 'CosPropertyService_PropertyTypes' +%% Description: +%%----------------------------------------------------------------- +'CosPropertyService_PropertyTypes'(doc) -> ["CosPropertyService_PropertyTypes"]; +'CosPropertyService_PropertyTypes'(suite) -> []; +'CosPropertyService_PropertyTypes'(_) -> + ?match(true, orber_tc:check_tc('CosPropertyService_PropertyTypes':tc())), + ?match("IDL:omg.org/CosPropertyService/PropertyTypes:1.0", + 'CosPropertyService_PropertyTypes':id()), + ?match("CosPropertyService_PropertyTypes", + 'CosPropertyService_PropertyTypes':name()), + ok. + +%%----------------------------------------------------------------- +%% Test Case: 'CosPropertyService_ReadOnlyProperty' +%% Description: +%%----------------------------------------------------------------- +'CosPropertyService_ReadOnlyProperty'(doc) -> ["CosPropertyService_ReadOnlyProperty"]; +'CosPropertyService_ReadOnlyProperty'(suite) -> []; +'CosPropertyService_ReadOnlyProperty'(_) -> + ?match(true, orber_tc:check_tc('CosPropertyService_ReadOnlyProperty':tc())), + ?match("IDL:omg.org/CosPropertyService/ReadOnlyProperty:1.0", + 'CosPropertyService_ReadOnlyProperty':id()), + ?match("CosPropertyService_ReadOnlyProperty", + 'CosPropertyService_ReadOnlyProperty':name()), + ok. + +%%----------------------------------------------------------------- +%% Test Case: 'CosPropertyService_UnsupportedMode' +%% Description: +%%----------------------------------------------------------------- +'CosPropertyService_UnsupportedMode'(doc) -> ["CosPropertyService_UnsupportedMode"]; +'CosPropertyService_UnsupportedMode'(suite) -> []; +'CosPropertyService_UnsupportedMode'(_) -> + ?match(true, orber_tc:check_tc('CosPropertyService_UnsupportedMode':tc())), + ?match("IDL:omg.org/CosPropertyService/UnsupportedMode:1.0", + 'CosPropertyService_UnsupportedMode':id()), + ?match("CosPropertyService_UnsupportedMode", + 'CosPropertyService_UnsupportedMode':name()), + ok. + +%%----------------------------------------------------------------- +%% Test Case: 'CosPropertyService_UnsupportedProperty' +%% Description: +%%----------------------------------------------------------------- +'CosPropertyService_UnsupportedProperty'(doc) -> ["CosPropertyService_UnsupportedProperty"]; +'CosPropertyService_UnsupportedProperty'(suite) -> []; +'CosPropertyService_UnsupportedProperty'(_) -> + ?match(true, orber_tc:check_tc('CosPropertyService_UnsupportedProperty':tc())), + ?match("IDL:omg.org/CosPropertyService/UnsupportedProperty:1.0", + 'CosPropertyService_UnsupportedProperty':id()), + ?match("CosPropertyService_UnsupportedProperty", + 'CosPropertyService_UnsupportedProperty':name()), + ok. + +%%----------------------------------------------------------------- +%% Test Case: 'CosPropertyService_UnsupportedTypeCode' +%% Description: +%%----------------------------------------------------------------- +'CosPropertyService_UnsupportedTypeCode'(doc) -> ["CosPropertyService_UnsupportedTypeCode"]; +'CosPropertyService_UnsupportedTypeCode'(suite) -> []; +'CosPropertyService_UnsupportedTypeCode'(_) -> + ?match(true, orber_tc:check_tc('CosPropertyService_UnsupportedTypeCode':tc())), + ?match("IDL:omg.org/CosPropertyService/UnsupportedTypeCode:1.0", + 'CosPropertyService_UnsupportedTypeCode':id()), + ?match("CosPropertyService_UnsupportedTypeCode", + 'CosPropertyService_UnsupportedTypeCode':name()), + ok. + +%%----------------------------------------------------------------- +%% Test Case: 'CosPropertyService_PropertyNamesIterator' +%% Description: +%%----------------------------------------------------------------- +'CosPropertyService_PropertyNamesIterator'(doc) -> ["CosPropertyService_PropertyNamesIterator"]; +'CosPropertyService_PropertyNamesIterator'(suite) -> []; +'CosPropertyService_PropertyNamesIterator'(_) -> + ?nomatch(undefined, 'CosPropertyService_PropertyNamesIterator':oe_tc(reset)), + ?nomatch(undefined, 'CosPropertyService_PropertyNamesIterator':oe_tc(next_one)), + ?nomatch(undefined, 'CosPropertyService_PropertyNamesIterator':oe_tc(next_n)), + ?nomatch(undefined, 'CosPropertyService_PropertyNamesIterator':oe_tc(destroy)), + ?match(undefined, 'CosPropertyService_PropertyNamesIterator':oe_tc(undefined)), + ?match([_|_], 'CosPropertyService_PropertyNamesIterator':oe_get_interface()), + ?match("IDL:omg.org/CosPropertyService/PropertyNamesIterator:1.0", + 'CosPropertyService_PropertyNamesIterator':typeID()), + check_tc('CosPropertyService_PropertyNamesIterator':oe_get_interface()), + ?match(true, 'CosPropertyService_PropertyNamesIterator':oe_is_a('CosPropertyService_PropertyNamesIterator':typeID())), + ?match(false, 'CosPropertyService_PropertyNamesIterator':oe_is_a("wrong")), + ok. + +%%----------------------------------------------------------------- +%% Test Case: 'CosPropertyService_PropertiesIterator' +%% Description: +%%----------------------------------------------------------------- +'CosPropertyService_PropertiesIterator'(doc) -> ["CosPropertyService_PropertiesIterator"]; +'CosPropertyService_PropertiesIterator'(suite) -> []; +'CosPropertyService_PropertiesIterator'(_) -> + ?nomatch(undefined, 'CosPropertyService_PropertiesIterator':oe_tc(reset)), + ?nomatch(undefined, 'CosPropertyService_PropertiesIterator':oe_tc(next_one)), + ?nomatch(undefined, 'CosPropertyService_PropertiesIterator':oe_tc(next_n)), + ?nomatch(undefined, 'CosPropertyService_PropertiesIterator':oe_tc(destroy)), + ?match(undefined, 'CosPropertyService_PropertiesIterator':oe_tc(undefined)), + ?match([_|_], 'CosPropertyService_PropertiesIterator':oe_get_interface()), + ?match("IDL:omg.org/CosPropertyService/PropertiesIterator:1.0", + 'CosPropertyService_PropertiesIterator':typeID()), + check_tc('CosPropertyService_PropertiesIterator':oe_get_interface()), + ?match(true, 'CosPropertyService_PropertiesIterator':oe_is_a('CosPropertyService_PropertiesIterator':typeID())), + ?match(false, 'CosPropertyService_PropertiesIterator':oe_is_a("wrong")), + ok. + + +%%----------------------------------------------------------------- +%% Test Case: 'CosPropertyService_PropertySet' +%% Description: +%%----------------------------------------------------------------- +'CosPropertyService_PropertySet'(doc) -> ["CosPropertyService_PropertySet"]; +'CosPropertyService_PropertySet'(suite) -> []; +'CosPropertyService_PropertySet'(_) -> + ?nomatch(undefined, 'CosPropertyService_PropertySet':oe_tc(define_property)), + ?nomatch(undefined, 'CosPropertyService_PropertySet':oe_tc(define_properties)), + ?nomatch(undefined, 'CosPropertyService_PropertySet':oe_tc(get_number_of_properties)), + ?nomatch(undefined, 'CosPropertyService_PropertySet':oe_tc(get_all_property_names)), + ?nomatch(undefined, 'CosPropertyService_PropertySet':oe_tc(get_property_value)), + ?nomatch(undefined, 'CosPropertyService_PropertySet':oe_tc(get_properties)), + ?nomatch(undefined, 'CosPropertyService_PropertySet':oe_tc(get_all_properties)), + ?nomatch(undefined, 'CosPropertyService_PropertySet':oe_tc(delete_property)), + ?nomatch(undefined, 'CosPropertyService_PropertySet':oe_tc(delete_properties)), + ?nomatch(undefined, 'CosPropertyService_PropertySet':oe_tc(delete_all_properties)), + ?nomatch(undefined, 'CosPropertyService_PropertySet':oe_tc(is_property_defined)), + ?match(undefined, 'CosPropertyService_PropertySet':oe_tc(undefined)), + ?match([_|_], 'CosPropertyService_PropertySet':oe_get_interface()), + ?match("IDL:omg.org/CosPropertyService/PropertySet:1.0", + 'CosPropertyService_PropertySet':typeID()), + check_tc('CosPropertyService_PropertySet':oe_get_interface()), + ?match(true, 'CosPropertyService_PropertySet':oe_is_a('CosPropertyService_PropertySet':typeID())), + ?match(false, 'CosPropertyService_PropertySet':oe_is_a("wrong")), + ok. + + +%%----------------------------------------------------------------- +%% Test Case: 'CosPropertyService_PropertySetDef' +%% Description: +%%----------------------------------------------------------------- +'CosPropertyService_PropertySetDef'(doc) -> ["CosPropertyService_PropertySetDef"]; +'CosPropertyService_PropertySetDef'(suite) -> []; +'CosPropertyService_PropertySetDef'(_) -> + ?nomatch(undefined, 'CosPropertyService_PropertySetDef':oe_tc(get_allowed_property_types)), + ?nomatch(undefined, 'CosPropertyService_PropertySetDef':oe_tc(get_allowed_properties)), + ?nomatch(undefined, 'CosPropertyService_PropertySetDef':oe_tc(define_property_with_mode)), + ?nomatch(undefined, 'CosPropertyService_PropertySetDef':oe_tc(define_properties_with_modes)), + ?nomatch(undefined, 'CosPropertyService_PropertySetDef':oe_tc(get_property_mode)), + ?nomatch(undefined, 'CosPropertyService_PropertySetDef':oe_tc(get_property_modes)), + ?nomatch(undefined, 'CosPropertyService_PropertySetDef':oe_tc(set_property_mode)), + ?nomatch(undefined, 'CosPropertyService_PropertySetDef':oe_tc(set_property_modes)), + ?nomatch(undefined, 'CosPropertyService_PropertySetDef':oe_tc(define_property)), + ?nomatch(undefined, 'CosPropertyService_PropertySetDef':oe_tc(define_properties)), + ?nomatch(undefined, 'CosPropertyService_PropertySetDef':oe_tc(get_number_of_properties)), + ?nomatch(undefined, 'CosPropertyService_PropertySetDef':oe_tc(get_all_property_names)), + ?nomatch(undefined, 'CosPropertyService_PropertySetDef':oe_tc(get_property_value)), + ?nomatch(undefined, 'CosPropertyService_PropertySetDef':oe_tc(get_properties)), + ?nomatch(undefined, 'CosPropertyService_PropertySetDef':oe_tc(get_all_properties)), + ?nomatch(undefined, 'CosPropertyService_PropertySetDef':oe_tc(delete_property)), + ?nomatch(undefined, 'CosPropertyService_PropertySetDef':oe_tc(delete_properties)), + ?nomatch(undefined, 'CosPropertyService_PropertySetDef':oe_tc(delete_all_properties)), + ?nomatch(undefined, 'CosPropertyService_PropertySetDef':oe_tc(is_property_defined)), + ?match(undefined, 'CosPropertyService_PropertySetDef':oe_tc(undefined)), + ?match([_|_], 'CosPropertyService_PropertySetDef':oe_get_interface()), + ?match("IDL:omg.org/CosPropertyService/PropertySetDef:1.0", + 'CosPropertyService_PropertySetDef':typeID()), + check_tc('CosPropertyService_PropertySetDef':oe_get_interface()), + ?match(true, 'CosPropertyService_PropertySetDef':oe_is_a('CosPropertyService_PropertySetDef':typeID())), + ?match(true, 'CosPropertyService_PropertySetDef':oe_is_a('CosPropertyService_PropertySet':typeID())), + ?match(false, 'CosPropertyService_PropertySetDef':oe_is_a("wrong")), + ok. + + +%%----------------------------------------------------------------- +%% Test Case: 'CosPropertyService_PropertySetDefFactory' +%% Description: +%%----------------------------------------------------------------- +'CosPropertyService_PropertySetDefFactory'(doc) -> ["CosPropertyService_PropertySetDefFactory"]; +'CosPropertyService_PropertySetDefFactory'(suite) -> []; +'CosPropertyService_PropertySetDefFactory'(_) -> + ?nomatch(undefined, 'CosPropertyService_PropertySetDefFactory':oe_tc(create_propertysetdef)), + ?nomatch(undefined, 'CosPropertyService_PropertySetDefFactory':oe_tc(create_constrained_propertysetdef)), + ?nomatch(undefined, 'CosPropertyService_PropertySetDefFactory':oe_tc(create_initial_propertysetdef)), + ?match(undefined, 'CosPropertyService_PropertySetDefFactory':oe_tc(undefined)), + ?match([_|_], 'CosPropertyService_PropertySetDefFactory':oe_get_interface()), + ?match("IDL:omg.org/CosPropertyService/PropertySetDefFactory:1.0", + 'CosPropertyService_PropertySetDefFactory':typeID()), + check_tc('CosPropertyService_PropertySetDefFactory':oe_get_interface()), + ?match(true, 'CosPropertyService_PropertySetDefFactory':oe_is_a('CosPropertyService_PropertySetDefFactory':typeID())), + ?match(false, 'CosPropertyService_PropertySetDefFactory':oe_is_a("wrong")), + ok. + + +%%----------------------------------------------------------------- +%% Test Case: 'CosPropertyService_PropertySetFactory' +%% Description: +%%----------------------------------------------------------------- +'CosPropertyService_PropertySetFactory'(doc) -> ["CosPropertyService_PropertySetFactory"]; +'CosPropertyService_PropertySetFactory'(suite) -> []; +'CosPropertyService_PropertySetFactory'(_) -> + ?nomatch(undefined, 'CosPropertyService_PropertySetFactory':oe_tc(create_propertyset)), + ?nomatch(undefined, 'CosPropertyService_PropertySetFactory':oe_tc(create_constrained_propertyset)), + ?nomatch(undefined, 'CosPropertyService_PropertySetFactory':oe_tc(create_initial_propertyset)), + ?match(undefined, 'CosPropertyService_PropertySetFactory':oe_tc(undefined)), + ?match([_|_], 'CosPropertyService_PropertySetFactory':oe_get_interface()), + ?match("IDL:omg.org/CosPropertyService/PropertySetFactory:1.0", + 'CosPropertyService_PropertySetFactory':typeID()), + check_tc('CosPropertyService_PropertySetFactory':oe_get_interface()), + ?match(true, 'CosPropertyService_PropertySetFactory':oe_is_a('CosPropertyService_PropertySetFactory':typeID())), + ?match(false, 'CosPropertyService_PropertySetFactory':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/cosProperty/test/property_SUITE.erl b/lib/cosProperty/test/property_SUITE.erl new file mode 100644 index 0000000000..8fed3128ef --- /dev/null +++ b/lib/cosProperty/test/property_SUITE.erl @@ -0,0 +1,747 @@ +%%---------------------------------------------------------------------- +%% +%% %CopyrightBegin% +%% +%% Copyright Ericsson AB 2000-2009. All Rights Reserved. +%% +%% The contents of this file are subject to the Erlang Public License, +%% Version 1.1, (the "License"); you may not use this file except in +%% compliance with the License. You should have received a copy of the +%% Erlang Public License along with this software. If not, it can be +%% retrieved online at http://www.erlang.org/. +%% +%% Software distributed under the License is distributed on an "AS IS" +%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +%% the License for the specific language governing rights and limitations +%% under the License. +%% +%% %CopyrightEnd% +%% +%% +%%---------------------------------------------------------------------- +%% File : property_SUITE.erl +%% Description : +%% +%%---------------------------------------------------------------------- +-module(property_SUITE). + + +%%--------------- INCLUDES ----------------------------------- +-include_lib("orber/include/corba.hrl"). +-include_lib("orber/src/orber_iiop.hrl"). +-include_lib("cosProperty/src/cosProperty.hrl"). +-include_lib("cosProperty/include/CosPropertyService.hrl"). + +-include("test_server.hrl"). + +%%--------------- DEFINES ------------------------------------ +-define(default_timeout, ?t:minutes(20)). +-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()). + +-define(match_inverse(NotExpectedRes, Expr), + fun() -> + AcTuAlReS = (catch (Expr)), + case AcTuAlReS of + NotExpectedRes -> + io:format("###### ERROR ERROR ######~n ~p~n", + [AcTuAlReS]), + exit(AcTuAlReS); + _ -> + io:format("------ CORRECT RESULT ------~n~p~n", + [AcTuAlReS]), + AcTuAlReS + end + end()). + + +-define(val1, #any{typecode=tk_short, value=1}). +-define(val2, #any{typecode=tk_short, value=2}). +-define(val3, #any{typecode=tk_short, value=3}). +-define(val4, #any{typecode=tk_short, value=4}). +-define(val5, #any{typecode=tk_long, value=5}). +-define(badval, #any{typecode=tk_shirt, value=5}). + +-define(id1, "id1"). +-define(id2, "id2"). +-define(id3, "id3"). +-define(id4, "id4"). +-define(id5, "id5"). +-define(badid, ""). + + +%%----------------------------------------------------------------- +%% External exports +%%----------------------------------------------------------------- +%% Fixed exports +-export([all/1, cases/0, init_all/1, finish_all/1, + init_per_testcase/2, fin_per_testcase/2]). +%% Test cases +-export([create_setdef_api/1, create_set_api/1, define_with_mode_api/1, + define_api/1, names_iterator_api/1, properties_iterator_api/1, + app_test/1]). + +%%----------------------------------------------------------------- +%% Func: all/1 +%% Args: +%% Returns: +%%----------------------------------------------------------------- +all(doc) -> ["API tests for the cosProperty interfaces", ""]; +all(suite) -> {req, + [mnesia, orber], + {conf, init_all, cases(), finish_all}}. + +cases() -> + [create_setdef_api, create_set_api, define_with_mode_api, define_api, + names_iterator_api, properties_iterator_api, app_test]. + + + +%%----------------------------------------------------------------- +%% Init and cleanup functions. +%%----------------------------------------------------------------- + +init_per_testcase(_Case, Config) -> + Path = code:which(?MODULE), + code:add_pathz(filename:join(filename:dirname(Path), "idl_output")), + ?line Dog=test_server:timetrap(?default_timeout), + [{watchdog, Dog}|Config]. + + +fin_per_testcase(_Case, Config) -> + Path = code:which(?MODULE), + code:del_path(filename:join(filename:dirname(Path), "idl_output")), + Dog = ?config(watchdog, Config), + test_server:timetrap_cancel(Dog), + ok. + +init_all(Config) -> + Path = code:which(?MODULE), + code:add_pathz(filename:join(filename:dirname(Path), "idl_output")), + orber:jump_start(), + cosProperty:install(), + cosProperty:install_db(), + ?line ?match(ok, application:start(cosProperty)), + if + is_list(Config) -> + Config; + true -> + exit("Config not a list") + end. + +finish_all(Config) -> + Path = code:which(?MODULE), + code:del_path(filename:join(filename:dirname(Path), "idl_output")), + application:stop(cosProperty), + cosProperty:uninstall_db(), + cosProperty:uninstall(), + orber:jump_stop(), + Config. + +%%----------------------------------------------------------------- +%% Tests app file +%%----------------------------------------------------------------- +app_test(doc) -> []; +app_test(suite) -> []; +app_test(_Config) -> + ok=test_server:app_test(cosProperty), + ok. + + +%%----------------------------------------------------------------- +%% CosPropertyService_PropertySetDefFactory API tests +%%----------------------------------------------------------------- +create_setdef_api(doc) -> ["CosPropertyService_PropertySetDefFactory API tests.", + ""]; +create_setdef_api(suite) -> []; +create_setdef_api(_Config) -> + + ValidDefs = [#'CosPropertyService_PropertyDef' + {property_name = ?id1, + property_value = ?val1, + property_mode = normal}, + #'CosPropertyService_PropertyDef' + {property_name = ?id2, + property_value = ?val2, + property_mode = normal}], + InvalidDefs = [#'CosPropertyService_PropertyDef' + {property_name = ?id1, + property_value = ?val1, + property_mode = normal}, + #'CosPropertyService_PropertyDef' + {property_name = ?badid, + property_value = ?badval, + property_mode = normal}], + + Fac = ?match({_,pseudo,_,_,_,_}, cosProperty:start_SetDefFactory()), + + Obj1 = ?match({_,pseudo,_,_,_,_}, 'CosPropertyService_PropertySetDefFactory': + create_propertysetdef(Fac)), + 'CosPropertyService_PropertySetDef_impl':dump(), + corba:dispose(Obj1), + + + Obj2 = ?match({_,pseudo,_,_,_,_}, 'CosPropertyService_PropertySetDefFactory': + create_constrained_propertysetdef(Fac, [tk_short], ValidDefs)), + 'CosPropertyService_PropertySetDef_impl':dump(), + corba:dispose(Obj2), + + %% Both arguments correct but 'ValidDefs' contain other TC:s than + %% tk_null. + ?match({'EXCEPTION', _}, 'CosPropertyService_PropertySetDefFactory': + create_constrained_propertysetdef(Fac, [tk_null], ValidDefs)), + 'CosPropertyService_PropertySetDef_impl':dump(), + + ?match({'EXCEPTION', _}, 'CosPropertyService_PropertySetDefFactory': + create_constrained_propertysetdef(Fac, [tk_null], InvalidDefs)), + 'CosPropertyService_PropertySetDef_impl':dump(), + + %% The allowed TC not supported. + ?match({'EXCEPTION', _}, 'CosPropertyService_PropertySetDefFactory': + create_constrained_propertysetdef(Fac, [tk_noll], ValidDefs)), + 'CosPropertyService_PropertySetDef_impl':dump(), + + Obj4 = ?match({_,pseudo,_,_,_,_}, 'CosPropertyService_PropertySetDefFactory': + create_initial_propertysetdef(Fac, ValidDefs)), + 'CosPropertyService_PropertySetDef_impl':dump(), + corba:dispose(Obj4), + + ?match({'EXCEPTION', _}, 'CosPropertyService_PropertySetDefFactory': + create_initial_propertysetdef(Fac, InvalidDefs)), + + ?match(ok, cosProperty:stop_SetDefFactory(Fac)), + + ok. + + +%%----------------------------------------------------------------- +%% CosPropertyService_PropertySetFactory API tests +%%----------------------------------------------------------------- +create_set_api(doc) -> ["CosPropertyService_PropertySetFactory API tests.", + ""]; +create_set_api(suite) -> []; +create_set_api(_Config) -> + Valid = [#'CosPropertyService_Property' + {property_name = ?id1, + property_value = ?val1}, + #'CosPropertyService_Property' + {property_name = ?id2, + property_value = ?val2}], + Invalid = [#'CosPropertyService_Property' + {property_name = ?id1, + property_value = ?val1}, + #'CosPropertyService_Property' + {property_name = ?badid, + property_value = ?badval}], + + Fac = ?match({_,pseudo,_,_,_,_}, cosProperty:start_SetFactory()), + Obj1 = ?match({_,pseudo,_,_,_,_}, 'CosPropertyService_PropertySetFactory': + create_propertyset(Fac)), + 'CosPropertyService_PropertySetDef_impl':dump(), + corba:dispose(Obj1), + + + Obj2 = ?match({_,pseudo,_,_,_,_}, 'CosPropertyService_PropertySetFactory': + create_constrained_propertyset(Fac, [tk_short], Valid)), + 'CosPropertyService_PropertySetDef_impl':dump(), + corba:dispose(Obj2), + + %% Both arguments correct but 'Valid' contain other TC:s than + %% tk_null. + ?match({'EXCEPTION', _}, 'CosPropertyService_PropertySetFactory': + create_constrained_propertyset(Fac, [tk_null], Valid)), + 'CosPropertyService_PropertySetDef_impl':dump(), + + ?match({'EXCEPTION', _}, 'CosPropertyService_PropertySetFactory': + create_constrained_propertyset(Fac, [tk_null], Invalid)), + 'CosPropertyService_PropertySetDef_impl':dump(), + + %% The allowed TC not supported. + ?match({'EXCEPTION', _}, 'CosPropertyService_PropertySetFactory': + create_constrained_propertyset(Fac, [tk_noll], Valid)), + 'CosPropertyService_PropertySetDef_impl':dump(), + + Obj4 = ?match({_,pseudo,_,_,_,_}, 'CosPropertyService_PropertySetFactory': + create_initial_propertyset(Fac, Valid)), + 'CosPropertyService_PropertySetDef_impl':dump(), + corba:dispose(Obj4), + + ?match({'EXCEPTION', _}, 'CosPropertyService_PropertySetFactory': + create_initial_propertyset(Fac, Invalid)), + ?match(ok, cosProperty:stop_SetFactory(Fac)), + ok. + +%%----------------------------------------------------------------- +%% CosPropertyService_PropertySetDef API tests +%%----------------------------------------------------------------- +define_api(doc) -> ["CosPropertyService_PropertySet API tests.", + ""]; +define_api(suite) -> []; +define_api(_Config) -> + ValidDefs = [#'CosPropertyService_Property' + {property_name = ?id1, + property_value = ?val1}, + #'CosPropertyService_Property' + {property_name = ?id2, + property_value = ?val2}, + #'CosPropertyService_Property' + {property_name = ?id3, + property_value = ?val3}], + + Fac = ?match({_,pseudo,_,_,_,_}, cosProperty:start_SetFactory()), + + io:format("@@@@ Testing PropertySet returned by the factory operation create_propertyset/1 @@@@", []), + Obj = ?match({_,pseudo,_,_,_,_}, 'CosPropertyService_PropertySetFactory': + create_propertyset(Fac)), + ?match(ok, 'CosPropertyService_PropertySet':define_property(Obj, ?id1, ?val1)), + ?match(ok, 'CosPropertyService_PropertySet':define_property(Obj, ?id1, ?val1)), + + ?match(1, 'CosPropertyService_PropertySet':get_number_of_properties(Obj)), + ?match(ok, 'CosPropertyService_PropertySet': + define_properties(Obj, [#'CosPropertyService_Property'{property_name = ?id2, + property_value = ?val2}, + #'CosPropertyService_Property'{property_name = ?id3, + property_value = ?val3}])), + + ?match(3, 'CosPropertyService_PropertySet':get_number_of_properties(Obj)), + + ?match({true, [_]}, 'CosPropertyService_PropertySet':get_properties(Obj, [?id1])), + ?match({true, [_, _, _]}, 'CosPropertyService_PropertySet':get_properties(Obj, [?id1, ?id2, ?id3])), + ?match({false,[_, _, _]}, 'CosPropertyService_PropertySet':get_properties(Obj, [?id1, "wrong", ?id3])), + + ?match(?val2, 'CosPropertyService_PropertySet':get_property_value(Obj, ?id2)), + ?match(ok, 'CosPropertyService_PropertySet':delete_property(Obj, ?id1)), + + ?match(2, 'CosPropertyService_PropertySet':get_number_of_properties(Obj)), + + ?match(ok, 'CosPropertyService_PropertySet':define_property(Obj, ?id1, ?val1)), + ?match(ok, 'CosPropertyService_PropertySet':define_property(Obj, ?id2, ?val2)), + ?match(ok, 'CosPropertyService_PropertySet':define_property(Obj, ?id3, ?val3)), + + ?match(true, 'CosPropertyService_PropertySet':delete_all_properties(Obj)), + ?match(0, 'CosPropertyService_PropertySet':get_number_of_properties(Obj)), + + ?match(ok, 'CosPropertyService_PropertySet': + define_properties(Obj, [#'CosPropertyService_Property'{property_name = ?id1, + property_value = ?val1}, + #'CosPropertyService_Property'{property_name = ?id2, + property_value = ?val2}, + #'CosPropertyService_Property'{property_name = ?id3, + property_value = ?val3}])), + + ?match(3, 'CosPropertyService_PropertySet':get_number_of_properties(Obj)), + ?match(?val2, 'CosPropertyService_PropertySet':get_property_value(Obj, ?id2)), + + ?match({'EXCEPTION',{'CosPropertyService_PropertyNotFound',_}}, + 'CosPropertyService_PropertySet':get_property_value(Obj, "wrongID")), + ?match({'EXCEPTION',{'CosPropertyService_InvalidPropertyName',_}}, + 'CosPropertyService_PropertySet':get_property_value(Obj, "")), + ?match({'EXCEPTION',{'CosPropertyService_InvalidPropertyName',_}}, + 'CosPropertyService_PropertySet':is_property_defined(Obj, "")), + ?match(false, 'CosPropertyService_PropertySet':is_property_defined(Obj, "wrongID")), + ?match(true, 'CosPropertyService_PropertySet':is_property_defined(Obj, ?id1)), + + %% This function is not supported by PropertySet. + ?match({'EXCEPTION',{'NO_IMPLEMENT',_,_,_}}, + 'CosPropertyService_PropertySetDef':get_property_modes(Obj, [?id1, ?id2, ?id3])), + + ?match({'EXCEPTION',{'CosPropertyService_MultipleExceptions',_,_}}, + 'CosPropertyService_PropertySet':delete_properties(Obj, [?id1, ?id2, ?id3, "wrongID"])), + ?match(0, 'CosPropertyService_PropertySet':get_number_of_properties(Obj)), + corba:dispose(Obj), + + io:format("@@@@ Testing PropertySet returned by the factory operation create_constrained_propertyset/3 @@@@", []), + Obj2 = ?match({_,pseudo,_,_,_,_}, 'CosPropertyService_PropertySetFactory': + create_constrained_propertyset(Fac, [tk_short], ValidDefs)), + + ?match(0, 'CosPropertyService_PropertySet':get_number_of_properties(Obj2)), + ?match({'EXCEPTION', {'CosPropertyService_UnsupportedProperty',_}}, + 'CosPropertyService_PropertySet':define_property(Obj2, ?id4, ?val4)), + ?match({'EXCEPTION', {'CosPropertyService_UnsupportedTypeCode',_}}, + 'CosPropertyService_PropertySet':define_property(Obj2, ?id1, ?val5)), + ?match(ok, 'CosPropertyService_PropertySet':define_property(Obj2, ?id1, ?val1)), + ?match(1, 'CosPropertyService_PropertySet':get_number_of_properties(Obj2)), + ?match({'EXCEPTION',{'CosPropertyService_MultipleExceptions',_,_}}, + 'CosPropertyService_PropertySet': + define_properties(Obj2, [#'CosPropertyService_Property'{property_name = ?id2, + property_value = ?val2}, + #'CosPropertyService_Property'{property_name = ?id3, + property_value = ?val3}, + #'CosPropertyService_Property'{property_name = "wrongId", + property_value = ?val2}])), + ?match(ok,'CosPropertyService_PropertySet': + define_properties(Obj2, [#'CosPropertyService_Property'{property_name = ?id2, + property_value = ?val2}, + #'CosPropertyService_Property'{property_name = ?id3, + property_value = ?val3}])), + ?match(3, 'CosPropertyService_PropertySet':get_number_of_properties(Obj2)), + ?match({'EXCEPTION',{'CosPropertyService_PropertyNotFound',_}}, + 'CosPropertyService_PropertySet':get_property_value(Obj2, "wrongID")), + ?match(?val2, 'CosPropertyService_PropertySet':get_property_value(Obj2, ?id2)), + ?match({'EXCEPTION',{'CosPropertyService_InvalidPropertyName',_}}, + 'CosPropertyService_PropertySet':get_property_value(Obj2, "")), + ?match({'EXCEPTION',{'CosPropertyService_InvalidPropertyName',_}}, + 'CosPropertyService_PropertySet':is_property_defined(Obj2, "")), + ?match(false, 'CosPropertyService_PropertySet':is_property_defined(Obj2, "wrongID")), + ?match(true, 'CosPropertyService_PropertySet':is_property_defined(Obj2, ?id1)), + + + ?match({'EXCEPTION',{'CosPropertyService_PropertyNotFound',_}}, + 'CosPropertyService_PropertySet':delete_property(Obj2, "wrongID")), + ?match(3, 'CosPropertyService_PropertySet':get_number_of_properties(Obj2)), + ?match(ok, 'CosPropertyService_PropertySet':delete_property(Obj2, ?id1)), + ?match(2, 'CosPropertyService_PropertySet':get_number_of_properties(Obj2)), + + ?match(ok, 'CosPropertyService_PropertySet':delete_properties(Obj2, [?id2])), + ?match(1, 'CosPropertyService_PropertySet':get_number_of_properties(Obj2)), + + ?match({'EXCEPTION',{'CosPropertyService_MultipleExceptions',_,_}}, + 'CosPropertyService_PropertySet':delete_properties(Obj2, [?id3, "wrongID"])), + ?match(0, 'CosPropertyService_PropertySet':get_number_of_properties(Obj2)), + corba:dispose(Obj2), + + io:format("@@@@ Testing PropertySet returned by the factory operation create_initial_propertyset/2 @@@@", []), + Obj3 = ?match({_,pseudo,_,_,_,_}, 'CosPropertyService_PropertySetFactory': + create_initial_propertyset(Fac, ValidDefs)), + ?match(3, 'CosPropertyService_PropertySet':get_number_of_properties(Obj3)), + + ?match(ok, 'CosPropertyService_PropertySet':define_property(Obj3, ?id4, ?val4)), + ?match(4, 'CosPropertyService_PropertySet':get_number_of_properties(Obj3)), + + ?match(ok,'CosPropertyService_PropertySet': + define_properties(Obj3, [#'CosPropertyService_Property'{property_name = ?id5, + property_value = ?val5}])), + + ?match(5, 'CosPropertyService_PropertySet':get_number_of_properties(Obj3)), + + ?match({'EXCEPTION',{'CosPropertyService_PropertyNotFound',_}}, + 'CosPropertyService_PropertySet':get_property_value(Obj3, "wrongID")), + ?match(?val2, 'CosPropertyService_PropertySet':get_property_value(Obj3, ?id2)), + ?match({'EXCEPTION',{'CosPropertyService_InvalidPropertyName',_}}, + 'CosPropertyService_PropertySet':get_property_value(Obj3, "")), + ?match({'EXCEPTION',{'CosPropertyService_InvalidPropertyName',_}}, + 'CosPropertyService_PropertySet':is_property_defined(Obj3, "")), + ?match(false, 'CosPropertyService_PropertySet':is_property_defined(Obj3, "wrongID")), + ?match(true, 'CosPropertyService_PropertySet':is_property_defined(Obj3, ?id1)), + + ?match({'EXCEPTION',{'CosPropertyService_PropertyNotFound',_}}, + 'CosPropertyService_PropertySet':delete_property(Obj3, "wrongId")), + ?match(ok, 'CosPropertyService_PropertySet':delete_property(Obj3, ?id5)), + ?match(4, 'CosPropertyService_PropertySet':get_number_of_properties(Obj3)), + + ?match({'EXCEPTION',{'CosPropertyService_MultipleExceptions',_,_}}, + 'CosPropertyService_PropertySet':delete_properties(Obj3, [?id1, ?id2, ?id3, "wrongID"])), + ?match(1, 'CosPropertyService_PropertySet':get_number_of_properties(Obj3)), + + ?match(true, 'CosPropertyService_PropertySet':delete_all_properties(Obj3)), + ?match(0, 'CosPropertyService_PropertySet':get_number_of_properties(Obj3)), + + corba:dispose(Obj3), + ?match(ok, cosProperty:stop_SetFactory(Fac)), + + ok. + +%%----------------------------------------------------------------- +%% CosPropertyService_PropertySetDef API tests +%%----------------------------------------------------------------- +define_with_mode_api(doc) -> ["CosPropertyService_PropertySetDef API tests.", + ""]; +define_with_mode_api(suite) -> []; +define_with_mode_api(_Config) -> + ValidDefs = [#'CosPropertyService_PropertyDef' + {property_name = ?id1, + property_value = ?val1, + property_mode = normal}, + #'CosPropertyService_PropertyDef' + {property_name = ?id2, + property_value = ?val2, + property_mode = normal}, + #'CosPropertyService_PropertyDef' + {property_name = ?id3, + property_value = ?val3, + property_mode = normal}], + + Fac = ?match({_,pseudo,_,_,_,_}, cosProperty:start_SetDefFactory()), + + io:format("@@@@ Testing PropertySetDef returned by the factory operation create_propertysetdef/1 @@@@", []), + Obj = ?match({_,pseudo,_,_,_,_}, 'CosPropertyService_PropertySetDefFactory': + create_propertysetdef(Fac)), + + %% Initally no prop's created and no restrictions at all + ?match(0, 'CosPropertyService_PropertySetDef':get_number_of_properties(Obj)), + ?match({ok, []}, 'CosPropertyService_PropertySetDef':get_allowed_property_types(Obj)), + ?match({ok, []}, 'CosPropertyService_PropertySetDef':get_allowed_properties(Obj)), + + %% Add two properties. + ?match(ok, 'CosPropertyService_PropertySetDef':define_property_with_mode(Obj, ?id4, ?val4, read_only)), + ?match(ok, 'CosPropertyService_PropertySetDef':define_property_with_mode(Obj, ?id5, ?val5, normal)), + %% Try to add the same property again (shouldn't add another since using the sam Id). + ?match(ok, 'CosPropertyService_PropertySetDef':define_property_with_mode(Obj, ?id5, ?val5, normal)), + + %% Try to add another identical proprty with wrong TC. + ?match({'EXCEPTION',{'CosPropertyService_ConflictingProperty',_}}, + 'CosPropertyService_PropertySetDef':define_property_with_mode(Obj, ?id5, ?val4, normal)), + + + %% Should be two now. + ?match(2, 'CosPropertyService_PropertySetDef':get_number_of_properties(Obj)), + + ?match(read_only, 'CosPropertyService_PropertySetDef':get_property_mode(Obj, ?id4)), + ?match(normal, 'CosPropertyService_PropertySetDef':get_property_mode(Obj, ?id5)), + ?match(ok, 'CosPropertyService_PropertySetDef': + define_properties_with_modes(Obj, + [#'CosPropertyService_PropertyDef'{property_name = ?id1, + property_value = ?val1, + property_mode = normal}, + #'CosPropertyService_PropertyDef'{property_name = ?id2, + property_value = ?val2, + property_mode = normal}, + #'CosPropertyService_PropertyDef'{property_name = ?id3, + property_value = ?val3, + property_mode = normal}])), + %% Should be five now. + ?match(5, 'CosPropertyService_PropertySetDef':get_number_of_properties(Obj)), + ?match({true, [_,_]}, 'CosPropertyService_PropertySetDef':get_property_modes(Obj, [?id1, ?id3])), + ?match({false, [_,_,_]}, 'CosPropertyService_PropertySetDef':get_property_modes(Obj, [?id1, ?id3, "wrongID"])), + + ?match(ok, 'CosPropertyService_PropertySetDef':set_property_mode(Obj, ?id1, read_only)), + ?match(read_only, 'CosPropertyService_PropertySetDef':get_property_mode(Obj, ?id1)), + + ?match({'EXCEPTION',{'CosPropertyService_PropertyNotFound',_}}, + 'CosPropertyService_PropertySetDef':set_property_mode(Obj, "wrongID", read_only)), + + ?match({'EXCEPTION',{'CosPropertyService_MultipleExceptions',_,_}}, + 'CosPropertyService_PropertySetDef': + set_property_modes(Obj, + [#'CosPropertyService_PropertyMode'{property_name = ?id2, + property_mode = read_only}, + #'CosPropertyService_PropertyMode'{property_name = ?id3, + property_mode = read_only}, + #'CosPropertyService_PropertyMode'{property_name = "wrongID", + property_mode = read_only}])), + ?match(normal, 'CosPropertyService_PropertySetDef':get_property_mode(Obj, ?id2)), + ?match(ok, + 'CosPropertyService_PropertySetDef': + set_property_modes(Obj, + [#'CosPropertyService_PropertyMode'{property_name = ?id2, + property_mode = read_only}, + #'CosPropertyService_PropertyMode'{property_name = ?id3, + property_mode = read_only}])), + ?match(read_only, 'CosPropertyService_PropertySetDef':get_property_mode(Obj, ?id2)), + + corba:dispose(Obj), + + + io:format("@@@@ Testing PropertySetDef returned by the factory operation create_constrained_propertysetdef/3 @@@@", []), + Obj2 = ?match({_,pseudo,_,_,_,_}, 'CosPropertyService_PropertySetDefFactory': + create_constrained_propertysetdef(Fac, [tk_short], ValidDefs)), + + %% Initally no prop's created and the restrictions that only Properties eq. to ValidDefs + %% may be handled. + ?match(0, 'CosPropertyService_PropertySetDef':get_number_of_properties(Obj2)), + ?match({ok, [tk_short]}, 'CosPropertyService_PropertySetDef':get_allowed_property_types(Obj2)), + %% We cannot be sure in which order it's returned. Hmm, that's not really true but it + %% may change in the future. + ?match({ok, [_,_,_]}, 'CosPropertyService_PropertySetDef':get_allowed_properties(Obj2)), + %% Try to add a Property with and Id not eq. to ?id1, ?id2 or ?id3; must fail. + ?match({'EXCEPTION', {'CosPropertyService_UnsupportedProperty',_}}, + 'CosPropertyService_PropertySetDef':define_property_with_mode(Obj2, ?id4, ?val4, read_only)), + %% To be sure that nothing was updated. + ?match(0, 'CosPropertyService_PropertySetDef':get_number_of_properties(Obj2)), + %% Add a valid Property. + ?match(ok, 'CosPropertyService_PropertySetDef':define_property_with_mode(Obj2, ?id1, ?val1, normal)), + ?match(1, 'CosPropertyService_PropertySetDef':get_number_of_properties(Obj2)), + %% Add a sequence of 1 valid and one invalid Prop's + ?match({'EXCEPTION', {'CosPropertyService_MultipleExceptions',_,_}}, + 'CosPropertyService_PropertySetDef': + define_properties_with_modes(Obj2, + [#'CosPropertyService_PropertyDef'{property_name = ?id2, + property_value = ?val2, + property_mode = normal}, + #'CosPropertyService_PropertyDef'{property_name = "wrongID", + property_value = ?val2, + property_mode = normal}])), + %% One should be added. + ?match(1, 'CosPropertyService_PropertySetDef':get_number_of_properties(Obj2)), + ?match(ok, 'CosPropertyService_PropertySetDef': + define_properties_with_modes(Obj2, + [#'CosPropertyService_PropertyDef'{property_name = ?id3, + property_value = ?val3, + property_mode = normal}])), + %% Add a sequence of 1 valid Prop. + ?match(2, 'CosPropertyService_PropertySetDef':get_number_of_properties(Obj2)), + ?match(normal, 'CosPropertyService_PropertySetDef':get_property_mode(Obj2, ?id1)), + ?match(normal, 'CosPropertyService_PropertySetDef':get_property_mode(Obj2, ?id3)), + + + ?match({true, [_,_]}, 'CosPropertyService_PropertySetDef':get_property_modes(Obj2, [?id1, ?id3])), + ?match({false, [_,_,_]}, 'CosPropertyService_PropertySetDef':get_property_modes(Obj2, [?id1, ?id3, "wrongID"])), + + ?match(ok, 'CosPropertyService_PropertySetDef':set_property_mode(Obj2, ?id1, read_only)), + ?match(read_only, 'CosPropertyService_PropertySetDef':get_property_mode(Obj2, ?id1)), + ?match(ok, 'CosPropertyService_PropertySetDef': + set_property_modes(Obj2, + [#'CosPropertyService_PropertyMode'{property_name = ?id1, + property_mode = read_only}, + #'CosPropertyService_PropertyMode'{property_name = ?id3, + property_mode = read_only}])), + ?match(read_only, 'CosPropertyService_PropertySetDef':get_property_mode(Obj2, ?id1)), + ?match(read_only, 'CosPropertyService_PropertySetDef':get_property_mode(Obj2, ?id3)), + ?match({'EXCEPTION',{'CosPropertyService_MultipleExceptions',_,_}}, + 'CosPropertyService_PropertySetDef': + set_property_modes(Obj2, + [#'CosPropertyService_PropertyMode'{property_name = ?id1, + property_mode = normal}, + #'CosPropertyService_PropertyMode'{property_name = ?id3, + property_mode = normal}, + #'CosPropertyService_PropertyMode'{property_name = "wrongID", + property_mode = normal}])), + + ?match(read_only, 'CosPropertyService_PropertySetDef':get_property_mode(Obj2, ?id1)), + ?match(read_only, 'CosPropertyService_PropertySetDef':get_property_mode(Obj2, ?id3)), + corba:dispose(Obj2), + + io:format("@@@@ Testing PropertySetDef returned by the factory operation create_initial_propertysetdef/2 @@@@", []), + Obj3 = ?match({_,pseudo,_,_,_,_}, 'CosPropertyService_PropertySetDefFactory': + create_initial_propertysetdef(Fac, ValidDefs)), + + %% Initally the supplied prop's are created and no restrictions. + ?match(3, 'CosPropertyService_PropertySetDef':get_number_of_properties(Obj3)), + ?match({ok, []}, 'CosPropertyService_PropertySetDef':get_allowed_property_types(Obj3)), + ?match({ok, []}, 'CosPropertyService_PropertySetDef':get_allowed_properties(Obj3)), + + %% Add a new properties an test if they have been inserted. + ?match(ok, 'CosPropertyService_PropertySetDef':define_property_with_mode(Obj3, ?id4, ?val4, read_only)), + ?match(4, 'CosPropertyService_PropertySetDef':get_number_of_properties(Obj3)), + ?match(ok, 'CosPropertyService_PropertySetDef':define_property_with_mode(Obj3, ?id5, ?val5, read_only)), + ?match(5, 'CosPropertyService_PropertySetDef':get_number_of_properties(Obj3)), + + %% Lookup each Property's mode. + ?match(normal, 'CosPropertyService_PropertySetDef':get_property_mode(Obj3, ?id1)), + ?match(normal, 'CosPropertyService_PropertySetDef':get_property_mode(Obj3, ?id2)), + ?match(normal, 'CosPropertyService_PropertySetDef':get_property_mode(Obj3, ?id3)), + ?match(read_only, 'CosPropertyService_PropertySetDef':get_property_mode(Obj3, ?id4)), + ?match(read_only, 'CosPropertyService_PropertySetDef':get_property_mode(Obj3, ?id5)), + + ?match({true, [_,_,_,_,_]}, + 'CosPropertyService_PropertySetDef':get_property_modes(Obj3, [?id1, ?id2, ?id3, ?id4, ?id5])), + ?match({false, [_,_]}, + 'CosPropertyService_PropertySetDef':get_property_modes(Obj3, [?id1, "wrongID"])), + ?match(ok, 'CosPropertyService_PropertySetDef':set_property_mode(Obj3, ?id4, normal)), + ?match(normal, 'CosPropertyService_PropertySetDef':get_property_mode(Obj3, ?id4)), + + ?match(ok, 'CosPropertyService_PropertySetDef': + set_property_modes(Obj3, + [#'CosPropertyService_PropertyMode'{property_name = ?id1, + property_mode = read_only}, + #'CosPropertyService_PropertyMode'{property_name = ?id2, + property_mode = read_only}])), + ?match(read_only, 'CosPropertyService_PropertySetDef':get_property_mode(Obj3, ?id1)), + ?match(read_only, 'CosPropertyService_PropertySetDef':get_property_mode(Obj3, ?id2)), + ?match({'EXCEPTION',{'CosPropertyService_MultipleExceptions',_,_}}, + 'CosPropertyService_PropertySetDef': + set_property_modes(Obj3, + [#'CosPropertyService_PropertyMode'{property_name = ?id3, + property_mode = read_only}, + #'CosPropertyService_PropertyMode'{property_name = ?id4, + property_mode = read_only}, + #'CosPropertyService_PropertyMode'{property_name = "wrongID", + property_mode = read_only}])), + + ?match(normal, 'CosPropertyService_PropertySetDef':get_property_mode(Obj3, ?id3)), + ?match(normal, 'CosPropertyService_PropertySetDef':get_property_mode(Obj3, ?id4)), + + corba:dispose(Obj3), + + ?match(ok, cosProperty:stop_SetDefFactory(Fac)), + + ok. + + + +%%----------------------------------------------------------------- +%% CosPropertyService_PropertyNamesIterator API tests +%%----------------------------------------------------------------- +names_iterator_api(doc) -> ["CosPropertyService_PropertyNamesIterator API tests.", + ""]; +names_iterator_api(suite) -> []; +names_iterator_api(_Config) -> + Fac = ?match({_,pseudo,_,_,_,_}, cosProperty:start_SetFactory()), + Obj = ?match({_,pseudo,_,_,_,_}, 'CosPropertyService_PropertySetFactory': + create_propertyset(Fac)), + ?match(ok, 'CosPropertyService_PropertySet': + define_properties(Obj, [#'CosPropertyService_Property'{property_name = ?id1, + property_value = ?val1}, + #'CosPropertyService_Property'{property_name = ?id2, + property_value = ?val2}, + #'CosPropertyService_Property'{property_name = ?id3, + property_value = ?val3}])), + + ?match(3, 'CosPropertyService_PropertySetDef':get_number_of_properties(Obj)), + {_, _,ItObj} = ?match({ok, [], _}, 'CosPropertyService_PropertySetDef':get_all_property_names(Obj, 0)), + ?match({false, [_,_,_]}, 'CosPropertyService_PropertyNamesIterator':next_n(ItObj,3)), + ?match(ok, 'CosPropertyService_PropertyNamesIterator':reset(ItObj)), + ?match({false, [_,_,_]}, 'CosPropertyService_PropertyNamesIterator':next_n(ItObj,4)), + ?match(ok, 'CosPropertyService_PropertyNamesIterator':reset(ItObj)), + ?match({true, [_]}, 'CosPropertyService_PropertyNamesIterator':next_n(ItObj,1)), + ?match({true, _}, 'CosPropertyService_PropertyNamesIterator':next_one(ItObj)), + ?match({true, _}, 'CosPropertyService_PropertyNamesIterator':next_one(ItObj)), + ?match({false, _}, 'CosPropertyService_PropertyNamesIterator':next_one(ItObj)), + ?match(ok, 'CosPropertyService_PropertyNamesIterator':destroy(ItObj)), + + corba:dispose(Obj), + ok. + +%%----------------------------------------------------------------- +%% CosPropertyService_PropertiesIterator API tests +%%----------------------------------------------------------------- +properties_iterator_api(doc) -> ["CosPropertyService_PropertiesIterator API tests.", + ""]; +properties_iterator_api(suite) -> []; +properties_iterator_api(_Config) -> + Fac = ?match({_,pseudo,_,_,_,_}, cosProperty:start_SetFactory()), + Obj = ?match({_,pseudo,_,_,_,_}, 'CosPropertyService_PropertySetFactory': + create_propertyset(Fac)), + + ?match(ok, 'CosPropertyService_PropertySet': + define_properties(Obj, [#'CosPropertyService_Property'{property_name = ?id1, + property_value = ?val1}, + #'CosPropertyService_Property'{property_name = ?id2, + property_value = ?val2}, + #'CosPropertyService_Property'{property_name = ?id3, + property_value = ?val3}])), + + ?match(3, 'CosPropertyService_PropertySetDef':get_number_of_properties(Obj)), + {_, _,ItObj} = ?match({ok, [], _}, + 'CosPropertyService_PropertySetDef':get_all_properties(Obj, 0)), + ?match({false, [_,_,_]}, 'CosPropertyService_PropertiesIterator':next_n(ItObj,3)), + ?match(ok, 'CosPropertyService_PropertiesIterator':reset(ItObj)), + ?match({false, [_,_,_]}, 'CosPropertyService_PropertiesIterator':next_n(ItObj,4)), + ?match(ok, 'CosPropertyService_PropertiesIterator':reset(ItObj)), + ?match({true, [_]}, 'CosPropertyService_PropertiesIterator':next_n(ItObj,1)), + ?match({true, {'CosPropertyService_Property',_,_}}, + 'CosPropertyService_PropertiesIterator':next_one(ItObj)), + ?match({true, {'CosPropertyService_Property',_,_}}, + 'CosPropertyService_PropertiesIterator':next_one(ItObj)), + ?match({false, {'CosPropertyService_Property',_,_}}, + 'CosPropertyService_PropertiesIterator':next_one(ItObj)), + ?match(ok, 'CosPropertyService_PropertiesIterator':destroy(ItObj)), + corba:dispose(Obj), + ok. + + +%%----------------------------------------------------------------- +%% END OF MODULE +%%----------------------------------------------------------------- diff --git a/lib/cosProperty/vsn.mk b/lib/cosProperty/vsn.mk index c221e6fa4a..ca9a7ca77e 100644 --- a/lib/cosProperty/vsn.mk +++ b/lib/cosProperty/vsn.mk @@ -1,11 +1 @@ -COSPROPERTY_VSN = 1.1.11 - -TICKETS = OTP-8355 - -TICKETS_1.1.10 = OTP-8201 - -TICKETS_1.1.9 = OTP-7987 - -TICKETS_1.1.8 = OTP-7837 - -TICKETS_1.1.7 = OTP-7595 +COSPROPERTY_VSN = 1.1.12 |