[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdepimlibs/kcal/tests
From:       Thomas McGuire <mcguire () kde ! org>
Date:       2009-09-22 0:56:13
Message-ID: 1253580973.530787.14654.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1026536 by tmcguire:

Add a test for the crash on exit I'm getting.
It is not the best of all tests, since it will simply segfault when it fails, but
it is better than nothing.

Fix for this will follow soon, after I figured this out.


 M  +2 -0      CMakeLists.txt  
 AM            data/test_relations.ics  
 M  +12 -0     testcalendarlocal.cpp  
 M  +1 -0      testcalendarlocal.h  


--- trunk/KDE/kdepimlibs/kcal/tests/CMakeLists.txt #1026535:1026536
@@ -5,6 +5,8 @@
  ${LIBICAL_INCLUDE_DIRS}
 )
 
+add_definitions( -DICALTESTDATADIR="\\"${CMAKE_SOURCE_DIR}/kcal/tests/data/\\"" )
+
 MACRO(KCAL_UNIT_TESTS)
   FOREACH(_testname ${ARGN})
     kde4_add_unit_test(${_testname} NOGUI ${_testname}.cpp)
** trunk/KDE/kdepimlibs/kcal/tests/data/test_relations.ics #property svn:eol-style
   + native
--- trunk/KDE/kdepimlibs/kcal/tests/testcalendarlocal.cpp #1026535:1026536
@@ -148,3 +148,15 @@
   cal.close();
   unlink( "foo.ics" );
 }
+
+void CalendarLocalTest::testRelationsCrash()
+{
+  // Currently, there is a crash that occurs only when reloading a calendar in which
+  // the incidences have special relations.
+  // This test tests that scenario, and will crash if it fails.
+  CalendarLocal cal( KDateTime::UTC );
+  cal.load( ICALTESTDATADIR "test_relations.ics" );
+  cal.load( ICALTESTDATADIR "test_relations.ics" );
+  cal.close();
+}
+
--- trunk/KDE/kdepimlibs/kcal/tests/testcalendarlocal.h #1026535:1026536
@@ -32,6 +32,7 @@
     void testSaveLoadSave();
     void testEvents();
     void testIncidences();
+    void testRelationsCrash();
 };
 
 #endif
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic