Mercurial > projects > dstress
changeset 303:1013f6410987
added __DATE__, __FILE__, __LINE__, __TIMESTAMP__ and __TIME tests
author | thomask |
---|---|
date | Sat, 12 Mar 2005 13:49:58 +0000 |
parents | 41de5acbb735 |
children | 472d7e8b2274 |
files | nocompile/__DATE__02.d nocompile/__FILE__02.d nocompile/__LINE__02.d nocompile/__TIMESTAMP__02.d nocompile/__TIME__02.d run/__DATE__01.d run/__FILE__01.d run/__LINE__01.d run/__TIMESTAMP__01.d run/__TIME__01.d |
diffstat | 10 files changed, 108 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/__DATE__02.d Sat Mar 12 13:49:58 2005 +0000 @@ -0,0 +1,9 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.nocompile.__DATE__02; + +void test(){ + __DATE__="1"; +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/__FILE__02.d Sat Mar 12 13:49:58 2005 +0000 @@ -0,0 +1,9 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.nocompile.__FILE__02; + +void test(){ + __FILE__="abc"; +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/__LINE__02.d Sat Mar 12 13:49:58 2005 +0000 @@ -0,0 +1,9 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.nocompile.__LINE__02; + +void test(){ + __LINE__=1; +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/__TIMESTAMP__02.d Sat Mar 12 13:49:58 2005 +0000 @@ -0,0 +1,9 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.nocompile.__TIMESTAMP__02; + +void test(){ + __TIMESTAMP__="1"; +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/__TIME__02.d Sat Mar 12 13:49:58 2005 +0000 @@ -0,0 +1,9 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.nocompile.__TIME__02; + +void test(){ + __TIME__="1"; +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/__DATE__01.d Sat Mar 12 13:49:58 2005 +0000 @@ -0,0 +1,12 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.__DATE__01; + +int main(){ + assert(__DATE__.length==11); + assert(__DATE__[3]==' '); + assert(__DATE__[6]==' '); + return 0; +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/__FILE__01.d Sat Mar 12 13:49:58 2005 +0000 @@ -0,0 +1,15 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.__FILE__01; + +int main(){ + char[] c = __FILE__; + version(Windows){ + assert(c==r"run\__FILE__01.d"); + }else{ + assert(c==r"run/__FILE__01.d"); + } + return 0; +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/__LINE__01.d Sat Mar 12 13:49:58 2005 +0000 @@ -0,0 +1,10 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.__LINE__01; + +int main(){ + assert(__LINE__==8); + return 0; +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/__TIMESTAMP__01.d Sat Mar 12 13:49:58 2005 +0000 @@ -0,0 +1,14 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.__TIMESTAMP__01; + +int main(){ + assert(__TIMESTAMP__.length==24); + assert(__TIMESTAMP__[3]==' '); + assert(__TIMESTAMP__[7]==' '); + assert(__TIMESTAMP__[10]==' '); + assert(__TIMESTAMP__[19]==' '); + return 0; +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/__TIME__01.d Sat Mar 12 13:49:58 2005 +0000 @@ -0,0 +1,12 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +module dstress.run.__TIME__01; + +int main(){ + assert(__TIME__.length==8); + assert(__TIME__[2]==':'); + assert(__TIME__[5]==':'); + return 0; +} \ No newline at end of file