sizeof.c

v22.2b14/testsuite/single/tests/efuns/sizeof.c · 292 B

From the archive beta.tar.gz

Download the archive   « Back to the archive contents

void do_tests() {
    ASSERT(sizeof(({ 1, 2, 3 })) == 3);
    ASSERT(sizeof(allocate(50)) == 50);
    ASSERT(sizeof(allocate_mapping(5)) == 0);
    ASSERT(sizeof( ([ 1 : 2, 3 : 4 ]) ) == 2);
    ASSERT(sizeof("foo") == 3);
    ASSERT(sizeof((: sizeof :)) == 0);
    ASSERT(sizeof(6) == 0);
}

Site Stats

Snippets: 1791
Codebases: 571