diff options
author | Benoit Foucher <benoit@zeroc.com> | 2002-11-20 20:17:12 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2002-11-20 20:17:12 +0000 |
commit | 996a9ed826b78ec6b1852b66fccf0d84c16bdcc2 (patch) | |
tree | 84dc44a70e54318af1b3cdabbeec651829841aee /cpp/test/XMLTransform/transform/Populate.cpp | |
parent | adding BuiltinSequences schema (diff) | |
download | ice-996a9ed826b78ec6b1852b66fccf0d84c16bdcc2.tar.bz2 ice-996a9ed826b78ec6b1852b66fccf0d84c16bdcc2.tar.xz ice-996a9ed826b78ec6b1852b66fccf0d84c16bdcc2.zip |
- Added transactional method to Freeze DB API.
- Added sync() method to flush the memory pool to the disk.
- Improved XMLTransform tests.
Diffstat (limited to 'cpp/test/XMLTransform/transform/Populate.cpp')
-rw-r--r-- | cpp/test/XMLTransform/transform/Populate.cpp | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/cpp/test/XMLTransform/transform/Populate.cpp b/cpp/test/XMLTransform/transform/Populate.cpp index 33dadcfa980..257450eaceb 100644 --- a/cpp/test/XMLTransform/transform/Populate.cpp +++ b/cpp/test/XMLTransform/transform/Populate.cpp @@ -164,7 +164,7 @@ transformPrimitive(const DBEnvironmentPtr& dbEnv) emitSchemas("xs:long", "xs:byte"); transformer.transform(dbEnv, db, dummy, dummy, paths, paths, oldSchema, newSchema); db->close(); - db = 0; + db = 0; // // Transform float to double @@ -661,6 +661,15 @@ transformStruct(const DBEnvironmentPtr& dbEnv) { // Expected. } + + { + IntS1Map map(db); + for(IntS1Map::iterator p = map.begin(); p != map.end(); ++p) + { + Test::S1 s1 = p->second; + } + } + db->close(); db = 0; @@ -817,6 +826,15 @@ transformClass(const DBEnvironmentPtr& dbEnv) { // Expected. } + + { + IntC1Map map(db); + for(IntC1Map::iterator p = map.begin(); p != map.end(); ++p) + { + Test::C1Ptr c1 = p->second; + } + } + db->close(); db = 0; @@ -1024,6 +1042,9 @@ run(int argc, char* argv[], const CommunicatorPtr& communicator) { string dbEnvDir = "db"; + communicator->addObjectFactory(Test::C1::ice_factory(), Test::C1::ice_staticId()); + communicator->addObjectFactory(Test::C2::ice_factory(), Test::C2::ice_staticId()); + int idx = 1; while(idx < argc) { @@ -1073,7 +1094,7 @@ run(int argc, char* argv[], const CommunicatorPtr& communicator) try { - dbEnv = Freeze::initialize(communicator, dbEnvDir); + dbEnv = Freeze::initializeWithTxn(communicator, dbEnvDir); transformPrimitive(dbEnv); transformPrimitiveSequence(dbEnv); transformEnum(dbEnv); |