Mercurial > projects > dstress
view run/r/remove_01.d @ 569:15b52e26c8f4
updated "delete associativeArray[key]" to "associativeArray.remove(key)"
author | thomask |
---|---|
date | Wed, 08 Jun 2005 17:25:48 +0000 |
parents | |
children |
line wrap: on
line source
// $HeadURL$ // $Date$ // $Author$ module dstress.run.r.remove_01; class Int{ this(int i){ this.i = i; } int i; } int main(){ Int[char[]] array; Int a = new Int(1); array["eins"]=a; Int b = new Int(2); array["zwei"]=b; Int c = new Int(3); array["drei"]=c; assert(("zwei" in array) !is null); array.remove("zwei"); assert(("zwei" in array) is null); assert(b !is null); return 0; }