Problem while writing test cases for api_termgen

Olly Betts olly at survex.com
Wed Mar 6 06:42:27 GMT 2019


On Wed, Mar 06, 2019 at 01:56:54PM +0800, outdream wrote:
> I added a case for mixed CJK numbers to test_simple,
> as the example mentioned in #699:
> > { "", "2千3百", "2[1] 千[2] 3[3] 百[4]"}
> 
> But it unexpectedly failed.
[...]
> I guess the order of terms in 'expect' string is fixed, is that right?
> And if my guess is right, how to predicate the order?

They appear in ascending Unicode codepoint order, so "2" and "3" would come
first, then the two Chinese characters, I think in the order given.

> How to print the args of TEST_STRINGS_EQUAL?

If you pass -v to apitest it'll give more verbose output.  You can also
set environment variable VERBOSE for the same effect.

There's a "Running test programs" section in xapian-core/HACKING which
covers this and more.

Cheers,
    Olly



More information about the Xapian-devel mailing list