Mercurial > projects > dstress
changeset 569:15b52e26c8f4
updated "delete associativeArray[key]" to "associativeArray.remove(key)"
author | thomask |
---|---|
date | Wed, 08 Jun 2005 17:25:48 +0000 |
parents | d762fe5e4b49 |
children | 32f7f8ce5e51 |
files | nocompile/r/remove_02.d nocompile/r/remove_03.d nocompile/r/remove_04.d nocompile/r/remove_05.d run/delete_09.d run/r/remove_01.d run/this_03.d |
diffstat | 7 files changed, 85 insertions(+), 34 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/r/remove_02.d Wed Jun 08 17:25:48 2005 +0000 @@ -0,0 +1,12 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// __DSTRESS_ELINE__ 11 + +module dstress.nocompile.r.remove_02; + +void main(){ + Object o; + o.remove(); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/r/remove_03.d Wed Jun 08 17:25:48 2005 +0000 @@ -0,0 +1,15 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// __DSTRESS_ELINE__ 14 + +module dstress.nocompile.r.remove_03; + +struct S{ +} + +void main(){ + S s*; + s.remove(); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/r/remove_04.d Wed Jun 08 17:25:48 2005 +0000 @@ -0,0 +1,12 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// __DSTRESS_ELINE__ 11 + +module dstress.nocompile.r.remove_04; + +void main(){ + int[] i; + i.remove(1); +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/r/remove_05.d Wed Jun 08 17:25:48 2005 +0000 @@ -0,0 +1,12 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// __DSTRESS_ELINE__ 11 + +module dstress.nocompile.r.remove_05; + +void main(){ + int [][] i; + i.remove(0); +}
--- a/run/delete_09.d Mon Jun 06 05:41:24 2005 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -// $HeadURL$ -// $Date$ -// $Author$ - -module dstress.run.delete_09; - -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)!==null); - - delete array["zwei"]; - - assert(("zwei" in array)===null); - assert(b!==null); - - return 0; -}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/r/remove_01.d Wed Jun 08 17:25:48 2005 +0000 @@ -0,0 +1,33 @@ +// $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; +}