Alien-libpanda

 view release on metacpan or  search on metacpan

t/string_test.h  view on Meta::CPAN

            REQUIRE_STR(s1, exp2);
            REQUIRE_STR(s2, exp1);
            s1 = EMPTY;
            CHECK_ALLOCS(0,0,1,EBUF_CHARS,0,0,1,exp2.size());
            s2 = EMPTY;
            CHECK_ALLOCS(0,0,1,EBUF_CHARS,0,0,1,exp1.size());
        }
    }

    static void test_copy () {
        String s(cstr("the password for my bank account is w74mnds320ft but i won't tell you the login)"));
        T t[500];
        size_t cnt;

        cnt = s.copy(t, 0);
        REQUIRE(cnt == 0);

        cnt = s.copy(t, 10);
        REQUIRE(cnt == 10);
        REQUIRE_STRM(String(t, cnt), mstr("the passwo"));



( run in 1.072 second using v1.01-cache-2.11-cpan-49f99fa48dc )