view tests/mini/aa7.d @ 1578:1dee66f6ec0b

Removed a chunk of code in favour of a shorter and more portable method
author Robert Clipsham <robert@octarineparrot.com>
date Tue, 08 Sep 2009 11:21:30 +0100
parents f8c979770af3
children
line wrap: on
line source

// adapted from dstress.run.a.associative_array_19_<n> to catch regressions early

module mini.aa7;

extern (C) int printf(char*, ...);
extern (C) void gc_collect();


int main(){
    char*[char] aa;

    char key = 'a';
    aa[key] = &key;
    gc_collect();
    assert(aa[key] == &key);
    assert(key in aa);

    return 0;
}