~ubuntu-branches/ubuntu/vivid/akonadi/vivid

« back to all changes in this revision

Viewing changes to server/tests/unittest/handlerhelpertest.cpp

  • Committer: Package Import Robot
  • Author(s): Rohan Garg
  • Date: 2013-11-11 17:38:58 UTC
  • mfrom: (1.1.46)
  • Revision ID: package-import@ubuntu.com-20131111173858-kltz6s4ebjishfej
Tags: 1.10.80-0ubuntu1
* New upstream release
 - Update install files
 - Update disable_dbus_requiring_tests.diff

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
      c.setCachePolicyInherit( false );
44
44
      c.setCachePolicyCheckInterval( 1 );
45
45
      c.setCachePolicyCacheTimeout( 2 );
46
 
      c.setCachePolicyLocalParts( QLatin1String("PART1 PART2") );
 
46
      c.setCachePolicyLocalParts( QLatin1String( "PART1 PART2" ) );
47
47
      c.setCachePolicySyncOnDemand( true );
48
48
      QTest::newRow( "non-inherit" ) << c << QByteArray( "CACHEPOLICY (INHERIT false INTERVAL 1 CACHETIMEOUT 2 SYNCONDEMAND true LOCALPARTS (PART1 PART2))" );
49
49
    }
71
71
      Collection c;
72
72
 
73
73
      c.setId( 10 );
74
 
      c.setRemoteId( QLatin1String("sl\\ash") );
 
74
      c.setRemoteId( QLatin1String( "sl\\ash" ) );
75
75
      ancestors.push ( c );
76
76
      QTest::newRow( "slash" ) << 1 << ancestors << QByteArray( "ANCESTORS ((10 \"sl\\\\ash\"))" );
77
77
 
78
78
      ancestors.clear();
79
79
      c.setId( 1 );
80
 
      c.setRemoteId( QLatin1String("r1") );
 
80
      c.setRemoteId( QLatin1String( "r1" ) );
81
81
      ancestors.push( c );
82
82
      QTest::newRow( "one1" ) << 1 << ancestors << QByteArray( "ANCESTORS ((1 \"r1\"))" );
83
83
      QTest::newRow( "one2" ) << 2 << ancestors << QByteArray( "ANCESTORS ((1 \"r1\") (0 \"\"))" );
84
84
      QTest::newRow( "one3" ) << 3 << ancestors << QByteArray( "ANCESTORS ((1 \"r1\") (0 \"\"))" );
85
85
 
86
86
      c.setId( 2 );
87
 
      c.setRemoteId( QLatin1String("r2") );
 
87
      c.setRemoteId( QLatin1String( "r2" ) );
88
88
      ancestors.push( c );
89
89
      QTest::newRow( "two1" ) << 1 << ancestors << QByteArray( "ANCESTORS ((2 \"r2\"))" );
90
90
      QTest::newRow( "two2" ) << 2 << ancestors << QByteArray( "ANCESTORS ((2 \"r2\") (1 \"r1\"))" );
127
127
        const int result = HandlerHelper::parseDepth( input );
128
128
        QCOMPARE( result, output );
129
129
      } catch ( const ImapParserException &e ) {
130
 
        if ( success )
 
130
        if ( success ) {
131
131
          qDebug() << e.what();
 
132
        }
132
133
        didThrow = true;
133
134
      }
134
135
      QCOMPARE( didThrow, !success );