allocate.c

v22.2b14/testsuite/single/tests/efuns/allocate.c · 211 B

From the archive beta.tar.gz

Download the archive   « Back to the archive contents

void do_tests() {
    for (int i = 0; i < 10; i++) {
	ASSERT(sizeof(allocate(i)) == i);
	ASSERT(filter(allocate(i), (: $1 :)) == ({}));
    }
    ASSERT(allocate(0) == ({}));
    ASSERT(catch(allocate(-10)));
}

Site Stats

Snippets: 1791
Codebases: 571