1 //%/////////////////////////////////////////////////////////////////////////////
\r
3 // Copyright (c) 2000, 2001 The Open group, BMC Software, Tivoli Systems, IBM
\r
5 // Permission is hereby granted, free of charge, to any person obtaining a copy
\r
6 // of this software and associated documentation files (the "Software"), to
\r
7 // deal in the Software without restriction, including without limitation the
\r
8 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
\r
9 // sell copies of the Software, and to permit persons to whom the Software is
\r
10 // furnished to do so, subject to the following conditions:
\r
12 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
\r
13 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
\r
14 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
\r
15 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
\r
16 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
\r
17 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
\r
18 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
\r
19 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\r
21 //==============================================================================
\r
23 // Author: Mike Brasher (mbrasher@bmc.com)
\r
27 //%/////////////////////////////////////////////////////////////////////////////
\r
30 #include <Pegasus/Common/CIMReference.h>
\r
32 PEGASUS_USING_PEGASUS;
\r
35 void test(const String& instanceName)
\r
38 CIMReference reference = instanceName;
\r
39 assert(instanceName == reference.toString());
\r
46 CIMReference reference;
\r
47 String instanceName;
\r
49 test("X.key1=\"Hello World\"");
\r
50 test("X.key1=TRUE,key2=123");
\r
51 test("X.key1=TRUE,key2=123,key3=\"Hello World\"");
\r
54 catch (Exception& e)
\r
56 cout << "Exception: " << e.getMessage() << endl;
\r
60 cout << "+++++ passed all tests" << endl;
\r