Changeset 106

Show
Ignore:
Timestamp:
01/29/08 19:41:19 (1 year ago)
Author:
zork
Message:

bad sql should throw wxdba::SQLException

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/debea_1_2/wxdba/test/apitestcase.cpp

    r79 r106  
    6565 
    6666void  
     67APITestCase::sql_error() { 
     68  try { 
     69    wxdba::Transaction t(mArchive->CreateTransaction()); 
     70    t.GetIStream().SendQuery( 
     71      wxT("really bad sql") 
     72    ); 
     73  } catch (const wxdba::SQLException&) { 
     74    //error if not catched 
     75  }; 
     76}; 
     77 
     78 
     79void  
    6780APITestCase::tae(const char* pData, wxFontEncoding pEncoding) { 
    6881  wxString field(wxdba::Tools::AnsiToUnicode(pData,pEncoding)); 
  • branches/debea_1_2/wxdba/test/apitestcase.h

    r79 r106  
    2424      CPPUNIT_TEST(dbresult_conversion_utf8); 
    2525      CPPUNIT_TEST(dbresult_conversion_win1250); 
     26      CPPUNIT_TEST(sql_error); 
    2627    CPPUNIT_TEST_SUITE_END();     
    2728  public: 
     
    3233    void dbresult_conversion_utf8(); 
    3334    void dbresult_conversion_win1250() { tae("\277\363\263\167",wxFONTENCODING_CP1250); }; //"turtle" in polish 
     35    void sql_error(); 
    3436  private: 
    3537    wxdba::SQLArchive* mArchive;