Merge pull request #2222 from jwillemsen/jwi-dllexportwarning
[ACE_TAO.git] / TAO / tests / IDLv4 / maps / main.cpp
blobbaf07e4060c63bd80ee04c151fc70aeffc151113
1 #include "testC.h"
3 #include "ace/OS_NS_stdlib.h"
4 #include "ace/OS_main.h"
5 #include <string>
7 int ACE_TMAIN(int, ACE_TCHAR *[])
9 // No need to test the actual map works as it's just a typedef to std::map
10 DataStruct testData;
12 RecurseStruct rStruct;
13 rStruct.iMapR[10] = rStruct;
14 // rStruct.rMapI[rStruct] = 10; // Structs as keys aren't really valid, as they fail to compile when generated via tao_idl
16 TestStruct testStruct;
17 testStruct.id = 42;
18 testStruct.msg = "Hello World!";
20 TestStructMap testStructMap;
21 testStructMap[42] = testStruct;
23 TestIntStringMap testIntStringMap;
24 testIntStringMap[42] = "Hello World!";
26 TestStructSeq testStructSeq(1, 1, TestStructSeq::allocbuf(1));
27 testStructSeq[0] = testStruct;
29 testData.intIntMap[4] = 100;
30 testData.stringStructsMap["test"] = testStruct;
31 testData.stringSequenceMap["test"] = testStructSeq;
32 testData.stringMapMap["test"] = testStructMap;
33 testData.mapStringMap[testIntStringMap] = "Hello World";
35 return EXIT_SUCCESS;