Mercurial > projects > dstress
changeset 672:ec3124ba366f
AJG <AJG@nospam.com>
2005-09-18
news:dgj92k$226p$1@digitaldaemon.com
author | thomask |
---|---|
date | Mon, 19 Sep 2005 07:37:25 +0000 |
parents | 34fae7a0f2ed |
children | ec20058de094 |
files | run/o/opCat_16_A.d run/o/opCat_16_B.d run/o/opCat_16_C.d run/o/opCat_16_D.d run/o/opCat_16_E.d run/o/opCat_16_G.d run/o/opCat_16_H.d |
diffstat | 7 files changed, 134 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/o/opCat_16_A.d Mon Sep 19 07:37:25 2005 +0000 @@ -0,0 +1,18 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ AJG <AJG@nospam.com> +// @date@ 2005-09-18 +// @uri@ news:dgj92k$226p$1@digitaldaemon.com + +module dstress.run.o.opCat_16_A; + +int main(){ + const static char[][] strings = ["Foo"]; + const static char[] test = "Bar"; + assert((strings ~ test).length==2); + assert((strings ~ test)[0] == "Foo"); + assert((strings ~ test)[1] == "Bar"); + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/o/opCat_16_B.d Mon Sep 19 07:37:25 2005 +0000 @@ -0,0 +1,18 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ AJG <AJG@nospam.com> +// @date@ 2005-09-18 +// @uri@ news:dgj92k$226p$1@digitaldaemon.com + +module dstress.run.o.opCat_16_B; + +int main(){ + static char[][] strings = ["Foo"]; + static char[] test = "Bar"; + assert((strings ~ test).length==2); + assert((strings ~ test)[0] == "Foo"); + assert((strings ~ test)[1] == "Bar"); + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/o/opCat_16_C.d Mon Sep 19 07:37:25 2005 +0000 @@ -0,0 +1,20 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ AJG <AJG@nospam.com> +// @date@ 2005-09-18 +// @uri@ news:dgj92k$226p$1@digitaldaemon.com + +module dstress.run.o.opCat_16_C; + +int main(){ + char[][] strings; + strings.length = 1; + strings[0] = "Foo"; + char[] test = "Bar"; + assert((strings ~ test).length==2); + assert((strings ~ test)[0] == "Foo"); + assert((strings ~ test)[1] == "Bar"); + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/o/opCat_16_D.d Mon Sep 19 07:37:25 2005 +0000 @@ -0,0 +1,20 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ AJG <AJG@nospam.com> +// @date@ 2005-09-18 +// @uri@ news:dgj92k$226p$1@digitaldaemon.com + +module dstress.run.o.opCat_16_D; + +int main(){ + wchar[][] strings; + strings.length = 1; + strings[0] = "Foo"; + wchar[] test = "Bar"; + assert((strings ~ test).length==2); + assert((strings ~ test)[0] == "Foo"); + assert((strings ~ test)[1] == "Bar"); + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/o/opCat_16_E.d Mon Sep 19 07:37:25 2005 +0000 @@ -0,0 +1,20 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ AJG <AJG@nospam.com> +// @date@ 2005-09-18 +// @uri@ news:dgj92k$226p$1@digitaldaemon.com + +module dstress.run.o.opCat_16_E; + +int main(){ + dchar[][] strings; + strings.length = 1; + strings[0] = "Foo"; + dchar[] test = "Bar"; + assert((strings ~ test).length==2); + assert((strings ~ test)[0] == "Foo"); + assert((strings ~ test)[1] == "Bar"); + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/o/opCat_16_G.d Mon Sep 19 07:37:25 2005 +0000 @@ -0,0 +1,19 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ AJG <AJG@nospam.com> +// @date@ 2005-09-18 +// @uri@ news:dgj92k$226p$1@digitaldaemon.com + +module dstress.run.o.opCat_16_G; + +int main(){ + dchar[][] strings; + strings.length = 1; + strings[0] = "Foo"; + assert((strings ~ "Bar"d).length==2); + assert((strings ~ "Bar"d)[0] == "Foo"d); + assert((strings ~ "Bar"d)[1] == "Bar"d); + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/o/opCat_16_H.d Mon Sep 19 07:37:25 2005 +0000 @@ -0,0 +1,19 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ AJG <AJG@nospam.com> +// @date@ 2005-09-18 +// @uri@ news:dgj92k$226p$1@digitaldaemon.com + +module dstress.run.o.opCat_16_H; + +int main(){ + wchar[][] strings; + strings.length = 1; + strings[0] = "Foo"; + assert((strings ~ "Bar"w).length==2); + assert((strings ~ "Bar"w)[0] == "Foo"w); + assert((strings ~ "Bar"w)[1] == "Bar"w); + return 0; +}