#include "../../l1/core/VecU8_as_str.h"

int main(){
    {
        VecU8 res = VecU8_fmt("%i", 0);
        check(strings_in_spans_equal(VecU8_to_span(&res), cstr("0")));
        VecU8_drop(res);
    }
    {
        VecU8 res = VecU8_fmt("%i%i%i%i", -1LL, 0LL, 44LL, -231LL);
        check(strings_in_spans_equal(VecU8_to_span(&res), cstr("-1044-231")));
        VecU8_drop(res);
    }
    {
        VecU8 res = VecU8_fmt("%i", 44LL);
        check(strings_in_spans_equal(VecU8_to_span(&res), cstr("44")));
        VecU8_drop(res);
    }
    {
        VecU8 res = VecU8_fmt("%u", 44ULL);
        check(strings_in_spans_equal(VecU8_to_span(&res), cstr("44")));
        VecU8_drop(res);
    }
    {
        VecU8 res = VecU8_fmt("%u   %i", 18446744073709551615ULL, -1LL);
        check(strings_in_spans_equal(VecU8_to_span(&res), cstr("18446744073709551615   -1")));
        VecU8_drop(res);
    }
    {
        VecU8 res = VecU8_fmt("%i   %i", 9223372036854775807LL, -9223372036854775807LL-1);
        check(strings_in_spans_equal(VecU8_to_span(&res), cstr("9223372036854775807   -9223372036854775808")));
        VecU8_drop(res);
    }
    {
        VecU8 vec2 = vcstr("vec2");
        VecU8 res = VecU8_fmt("%i %v %i", -1230LL, vec2, 1340LL);
        check(strings_in_spans_equal(VecU8_to_span(&res), cstr("-1230 vec2 1340")));
        VecU8_drop(res);
    }
    return 0;
}