~yshurik/libmemcached/libmemcached-win

« back to all changes in this revision

Viewing changes to libtest/unittest.cc

  • Committer: Continuous Integration
  • Date: 2013-04-03 13:16:24 UTC
  • mfrom: (1100.1.1 libmemcached-1.2)
  • Revision ID: ci@tangent.org-20130403131624-j59dhv5z5l0lsdld
Merge lp:~tangent-org/libmemcached/1.2-build/ Build: jenkins-Libmemcached-250

Show diffs side-by-side

added added

removed removed

Lines of Context:
184
184
static test_return_t ASSERT_FALSE__TEST(void *)
185
185
{
186
186
  try {
187
 
    ASSERT_FALSE_(true, __func__);
188
 
  }
189
 
  catch (const libtest::__failure& e)
190
 
  {
191
 
    ASSERT_STREQ(e.what(), "Assertion '!true' [ ASSERT_FALSE__TEST ]");
192
 
    return TEST_SUCCESS;
193
 
  }
194
 
  catch (...)
195
 
  {
196
 
    return TEST_FAILURE;
197
 
  }
198
 
 
199
 
  return TEST_FAILURE;
 
187
    ASSERT_FALSE(true);
 
188
  }
 
189
  catch (const libtest::__failure& e)
 
190
  {
 
191
    ASSERT_STREQ(e.what(), "Assertion '!true'");
 
192
    return TEST_SUCCESS;
 
193
  }
 
194
  catch (...)
 
195
  {
 
196
    return TEST_FAILURE;
 
197
  }
 
198
 
 
199
  return TEST_FAILURE;
 
200
}
 
201
 
 
202
static test_return_t ASSERT_NEQ_FAIL_TEST(void *)
 
203
{
 
204
  try {
 
205
    ASSERT_NEQ(1,1);
 
206
  }
 
207
  catch (const libtest::__failure& e)
 
208
  {
 
209
    ASSERT_STREQ(e.what(), "Assertion '1' == '1'");
 
210
    return TEST_SUCCESS;
 
211
  }
 
212
  catch (...)
 
213
  {
 
214
    return TEST_FAILURE;
 
215
  }
 
216
 
 
217
  return TEST_FAILURE;
 
218
}
 
219
 
 
220
static test_return_t ASSERT_NEQ_TEST(void *)
 
221
{
 
222
  ASSERT_NEQ(1,0);
 
223
 
 
224
  return TEST_SUCCESS;
200
225
}
201
226
 
202
227
static test_return_t ASSERT_FALSE_TEST(void *)
1012
1037
  {"FAIL", false, test_throw_fail_TEST },
1013
1038
  {"ASSERT_FALSE_", false, ASSERT_FALSE__TEST },
1014
1039
  {"ASSERT_FALSE", false, ASSERT_FALSE_TEST },
 
1040
  {"ASSERT_NEQ", false, ASSERT_NEQ_TEST },
 
1041
  {"ASSERT_NEQ FAIL", false, ASSERT_NEQ_FAIL_TEST },
1015
1042
  {0, 0, 0}
1016
1043
};
1017
1044