~ubuntu-branches/ubuntu/vivid/gloox/vivid-proposed

« back to all changes in this revision

Viewing changes to src/tests/presence/presence_test.cpp

  • Committer: Package Import Robot
  • Author(s): Vincent Cheng
  • Date: 2014-03-16 17:34:43 UTC
  • mfrom: (12.1.2 experimental)
  • mto: This revision was merged to the branch mainline in revision 15.
  • Revision ID: package-import@ubuntu.com-20140316173443-4s177dovzaz5dm8o
Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
      || i->status() != "the status" || i->priority() != 10 )
32
32
  {
33
33
    ++fail;
34
 
    printf( "test '%s' failed\n", name.c_str() );
 
34
    fprintf( stderr, "test '%s' failed\n", name.c_str() );
35
35
  }
36
36
  delete i;
37
37
  i = 0;
45
45
      || i->status() != "the status" || i->priority() != 10 )
46
46
  {
47
47
    ++fail;
48
 
    printf( "test '%s' failed\n", name.c_str() );
 
48
    fprintf( stderr, "test '%s' failed\n", name.c_str() );
49
49
  }
50
50
  delete i;
51
51
  i = 0;
59
59
      || i->status() != "the status" || i->priority() != 10 )
60
60
  {
61
61
    ++fail;
62
 
    printf( "test '%s' failed\n", name.c_str() );
 
62
    fprintf( stderr, "test '%s' failed\n", name.c_str() );
63
63
  }
64
64
  delete i;
65
65
  i = 0;
73
73
      || i->status() != "the status" || i->priority() != 10 )
74
74
  {
75
75
    ++fail;
76
 
    printf( "test '%s' failed\n", name.c_str() );
 
76
    fprintf( stderr, "test '%s' failed\n", name.c_str() );
77
77
  }
78
78
  delete i;
79
79
  i = 0;
87
87
      || i->status() != "the status" || i->priority() != 10 )
88
88
  {
89
89
    ++fail;
90
 
    printf( "test '%s' failed\n", name.c_str() );
 
90
    fprintf( stderr, "test '%s' failed\n", name.c_str() );
91
91
  }
92
92
  delete i;
93
93
  i = 0;
103
103
      || i->status() != "the status" || i->priority() != 10 )
104
104
  {
105
105
    ++fail;
106
 
    printf( "test '%s' failed\n", name.c_str() );
 
106
    fprintf( stderr, "test '%s' failed\n", name.c_str() );
107
107
  }
108
108
  delete i;
109
109
  i = 0;
118
118
      || i->status() != "the status" || i->priority() != 10 )
119
119
  {
120
120
    ++fail;
121
 
    printf( "test '%s' failed\n", name.c_str() );
 
121
    fprintf( stderr, "test '%s' failed\n", name.c_str() );
122
122
  }
123
123
  delete i;
124
124
  i = 0;
133
133
      || i->status() != "the status" || i->priority() != 10 )
134
134
  {
135
135
    ++fail;
136
 
    printf( "test '%s' failed\n", name.c_str() );
 
136
    fprintf( stderr, "test '%s' failed\n", name.c_str() );
137
137
  }
138
138
  delete i;
139
139
  i = 0;
148
148
      || i->status() != "the status" || i->priority() != 10 )
149
149
  {
150
150
    ++fail;
151
 
    printf( "test '%s' failed\n", name.c_str() );
 
151
    fprintf( stderr, "test '%s' failed\n", name.c_str() );
152
152
  }
153
153
  delete i;
154
154
  i = 0;
167
167
        || i->hasAttribute( "type" ) )
168
168
    {
169
169
      ++fail;
170
 
      printf( "test '%s' failed: %s\n", name.c_str(), i->xml().c_str() );
 
170
      fprintf( stderr, "test '%s' failed: %s\n", name.c_str(), i->xml().c_str() );
171
171
    }
172
172
    delete i;
173
173
  }
185
185
        || !i->hasChild( "status", "xml:lang", "the xmllang" ) )
186
186
    {
187
187
      ++fail;
188
 
      printf( "test '%s' failed: %s\n", name.c_str(), i->xml().c_str() );
 
188
      fprintf( stderr, "test '%s' failed: %s\n", name.c_str(), i->xml().c_str() );
189
189
    }
190
190
    delete i;
191
191
  }
204
204
        || !i->hasChildWithCData( "show", "chat" ) )
205
205
    {
206
206
      ++fail;
207
 
      printf( "test '%s' failed: %s\n", name.c_str(), i->xml().c_str() );
 
207
      fprintf( stderr, "test '%s' failed: %s\n", name.c_str(), i->xml().c_str() );
208
208
    }
209
209
    delete i;
210
210
  }
223
223
        || !i->hasChildWithCData( "show", "away" ) )
224
224
    {
225
225
      ++fail;
226
 
      printf( "test '%s' failed: %s\n", name.c_str(), i->xml().c_str() );
 
226
      fprintf( stderr, "test '%s' failed: %s\n", name.c_str(), i->xml().c_str() );
227
227
    }
228
228
    delete i;
229
229
  }
242
242
        || !i->hasChildWithCData( "show", "dnd" ) )
243
243
    {
244
244
      ++fail;
245
 
      printf( "test '%s' failed: %s\n", name.c_str(), i->xml().c_str() );
 
245
      fprintf( stderr, "test '%s' failed: %s\n", name.c_str(), i->xml().c_str() );
246
246
    }
247
247
    delete i;
248
248
  }
261
261
        || !i->hasChildWithCData( "show", "xa" ) )
262
262
    {
263
263
      ++fail;
264
 
      printf( "test '%s' failed: %s\n", name.c_str(), i->xml().c_str() );
 
264
      fprintf( stderr, "test '%s' failed: %s\n", name.c_str(), i->xml().c_str() );
265
265
    }
266
266
    delete i;
267
267
  }
280
280
        || !i->hasChildWithCData( "priority", "10" ) )
281
281
    {
282
282
      ++fail;
283
 
      printf( "test '%s' failed: %s\n", name.c_str(), i->xml().c_str() );
 
283
      fprintf( stderr, "test '%s' failed: %s\n", name.c_str(), i->xml().c_str() );
284
284
    }
285
285
    delete i;
286
286
  }
299
299
        || !i->hasChildWithCData( "priority", "10" ) )
300
300
    {
301
301
      ++fail;
302
 
      printf( "test '%s' failed: %s\n", name.c_str(), i->xml().c_str() );
 
302
      fprintf( stderr, "test '%s' failed: %s\n", name.c_str(), i->xml().c_str() );
303
303
    }
304
304
    delete i;
305
305
  }
316
316
  }
317
317
  else
318
318
  {
319
 
    printf( "Presence: %d test(s) failed\n", fail );
 
319
    fprintf( stderr, "Presence: %d test(s) failed\n", fail );
320
320
    return 1;
321
321
  }
322
322