X-Git-Url: https://git.distorted.org.uk/~mdw/mLib/blobdiff_plain/31d0247cc58abc0b0720aa7e9972011c5a66995c..c81c35dfd10050ffef85d57dc2ad73f52f38a3f2:/test/t/tvec-test.c diff --git a/test/t/tvec-test.c b/test/t/tvec-test.c index ac316b6..aaa4465 100644 --- a/test/t/tvec-test.c +++ b/test/t/tvec-test.c @@ -131,7 +131,7 @@ static const struct tvec_urange range_32 = { 0, 31 }; _(fenum, RFE, fenum, p, &fenum_info) \ _(penum, RPE, penum, p, &penum_info) \ _(flags, RF, flags, p, &attr_info) \ - _(string, RSTR, string, p, &range_32) \ + _(text, RTXT, text, p, &range_32) \ _(bytes, RBY, bytes, p, &tvrange_byte) \ _(buffer, RBUF, buffer, p, 0) @@ -221,18 +221,18 @@ static void test_copy_simple (const struct tvec_reg *in, struct tvec_reg *out, void *ctx) { out->v = in->v; } -static void test_copy_string +static void test_copy_text (const struct tvec_reg *in, struct tvec_reg *out, void *ctx) { - tvec_allocstring(&out->v, in->v.str.sz); - memcpy(out->v.str.p, in->v.str.p, in->v.str.sz); + tvec_alloctext(&out->v, in->v.text.sz); + memcpy(out->v.text.p, in->v.text.p, in->v.text.sz); } static void test_copy_bytes (const struct tvec_reg *in, struct tvec_reg *out, void *ctx) { - tvec_allocstring(&out->v, in->v.str.sz); - memcpy(out->v.str.p, in->v.str.p, in->v.str.sz); + tvec_allocbytes(&out->v, in->v.bytes.sz); + memcpy(out->v.bytes.p, in->v.bytes.p, in->v.bytes.sz); } #define test_copy_int test_copy_simple @@ -394,8 +394,8 @@ static void test_multi_serialize ? 0 : (/*unconst*/ void *) ((const struct tvec_penuminfo *)rd->arg.p)->av[0].p; - else if (rd->ty == &tvty_string) - { if (rv->str.sz) rv->str.p[0] ^= 1; } + else if (rd->ty == &tvty_text) + { if (rv->text.sz) rv->text.p[0] ^= 1; } else if (rd->ty == &tvty_bytes) { if (rv->bytes.sz) rv->bytes.p[0] ^= 1; } }