Ticket #112: xapian-omtostring-test.patch
File xapian-omtostring-test.patch, 1.2 KB (added by , 18 years ago) |
---|
-
tests/internaltest.cc
37 37 #include "serialise.h" 38 38 #include "serialise-double.h" 39 39 #include "omqueryinternal.h" 40 #include "utils.h" 40 41 41 42 static bool test_except1() 42 43 { … … 190 191 return true; 191 192 } 192 193 194 static bool test_omtostring1() 195 { 196 string str; 197 str = om_tostring(10); 198 TEST_EQUAL(str, "10"); 199 200 #ifdef __WIN32__ 201 /* Test the 64 bit integer conversion to string. 202 * (Currently only exists for windows.) 203 */ 204 str = om_tostring(10ll); 205 TEST_EQUAL(str, "10"); 206 207 str = om_tostring(0x200000000ll); 208 TEST_EQUAL(str, "8589934592"); 209 #endif 210 211 return true; 212 } 213 193 214 #ifdef XAPIAN_HAS_REMOTE_BACKEND 194 215 // Check serialisation of lengths. 195 216 static bool test_serialiselength1() … … 351 372 {"stringcomp1", test_stringcomp1}, 352 373 {"temporarydtor1", test_temporarydtor1}, 353 374 {"omstringstream1", test_omstringstream1}, 375 {"omtostring1", test_omtostring1}, 354 376 {"serialisedouble1", test_serialisedouble1}, 355 377 #ifdef XAPIAN_HAS_REMOTE_BACKEND 356 378 {"serialiselength1", test_serialiselength1},