test-core/src/unittest_schema.cpp
// over session and get/set comment/revision

over session and get/set comment/revision
over session and get / set comment / revision
BOOST_AUTO_TEST_CASE(schema_1001)
{
#ifdef _WINDOWS
  og::core::CrtCheckMemory __check__;
#endif
  og::og_session cleaned_session_;
  cleaned_session_.open(DBPATH);
  cleaned_session_.purge();
  cleaned_session_.schema()->purge();
  string OTYPE = "Document1001";
  string ONAME = "Dcument-Name1001";
  string oid;
  {
    og::og_schema_object_ptr soptr = cleaned_session_.schema()->create_object(OTYPE,
                                     ONAME);
    soptr->set_comment("hogehoge");
    soptr->set_name("foobar");
    oid = soptr->get_id();
  }
  {
    og::og_session ses2;
    ses2.open(DBPATH);
    optional<og::og_schema_object_ptr> soptr2(ses2.schema()->get_object(oid));
    _check_schema_object(soptr2.get(), oid, OTYPE, "foobar");
    BOOST_REQUIRE_EQUAL(soptr2->get()->get_comment(), "hogehoge");
  }
}
BOOST_AUTO_TEST_CASE ( schema_1001 ) { #ifdef _WINDOWS og :: core :: CrtCheckMemory __check__ ; #endif og :: og_session cleaned_session_ ; cleaned_session_ . open ( DBPATH ) ; cleaned_session_ . purge ( ) ; cleaned_session_ . schema ( ) -> purge ( ) ; string OTYPE = " " ; string ONAME = " " ; string oid ; { og :: og_schema_object_ptr soptr = cleaned_session_ . schema ( ) -> create_object ( OTYPE , ONAME ) ; soptr -> set_comment ( " " ) ; soptr -> set_name ( " " ) ; oid = soptr -> get_id ( ) ; } { og :: og_session ses2 ; ses2 . open ( DBPATH ) ; optional < og :: og_schema_object_ptr > soptr2 ( ses2 . schema ( ) -> get_object ( oid ) ) ; _check_schema_object ( soptr2 . get ( ) , oid , OTYPE , " " ) ; BOOST_REQUIRE_EQUAL ( soptr2 -> get ( ) -> get_comment ( ) , " " ) ; } }
over session and get/set comment/revision
over session and get / set comment / revision
// initialize db
 // get object id
 // get_object_id
