Mercurial > projects > dstress
changeset 435:ec6d35cccfb5
pre dmd-0.121 review
Walter <walter@digitalmars.com>
2005-04-15
mail:000e01c54203$22c0e850$0200a8c0@colossus
author | thomask |
---|---|
date | Sat, 16 Apr 2005 08:18:57 +0000 |
parents | 6a553efddc73 |
children | 5e210bace0f1 |
files | nocompile/alias_15.d nocompile/alias_16.d nocompile/debug_05.d nocompile/real_14.d nocompile/super_06.d nocompile/union_11.d nocompile/unittest_03.d run/alias_15.d run/alias_16.d run/bug_cgcs_353_C.d run/bug_cgcs_353_D.d run/bug_e2ir_141_A.d run/bug_e2ir_141_B.d run/bug_e2ir_141_C.d run/bug_e2ir_141_D.d run/const_16.d run/creal_04.d run/creal_09.d run/delete_02.d run/line_ending_unicode.d run/line_token_03.d run/line_token_04.d run/new_12.d run/typeid_23.d run/typeid_24.d run/typeid_50.d run/typeid_55.d run/typeid_70.d run/typeid_71.d run/typeid_72.d run/typeid_73.d run/typeid_74.d run/typeid_75.d run/typeid_76.d run/typeid_77.d run/typeid_78.d run/typeid_79.d run/typeid_80.d run/unittest_03.d |
diffstat | 39 files changed, 127 insertions(+), 151 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/alias_15.d Sat Apr 16 08:18:57 2005 +0000 @@ -0,0 +1,31 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Ilya Zaitseff <sark7@mail333.com> +// @date@ 2005-02-14 +// @uri@ news:opsl6xo4fhaaezs2@robingood +// @url@ nntp://news.digitalmars.com/digitalmars.D.bugs/2982 + +// __DSTRESS_ELINE__ 26 + +module dstress.nocompile.alias_15; + +class A{ + int foo; +} + +class B{ + A a; +} + +int main(){ + B b=new B(); + assert(b.a.foo==0); + with(b){ + alias b.a.foo bar; + bar++; + } + assert(b.a.foo==1); + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/alias_16.d Sat Apr 16 08:18:57 2005 +0000 @@ -0,0 +1,31 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Ilya Zaitseff <sark7@mail333.com> +// @date@ 2005-02-14 +// @uri@ news:opsl6xo4fhaaezs2@robingood +// @url@ nntp://news.digitalmars.com/digitalmars.D.bugs/2982 + +// __DSTRESS_ELINE__ 26 + +module dstress.nocompile.alias_16; + +class A{ + int foo; +} + +class B{ + A a; +} + +int main(){ + B b=new B(); + assert(b.a.foo==0); + { + alias b.a.foo bar; + bar++; + } + assert(b.a.foo==1); + return 0; +}
--- a/nocompile/debug_05.d Fri Apr 15 22:54:15 2005 +0000 +++ b/nocompile/debug_05.d Sat Apr 16 08:18:57 2005 +0000 @@ -2,6 +2,8 @@ // $Date$ // $Auhtor$ +// __DSTRESS_ELINE__ 13 + module dstress.nocompile.debug_05; template T(){
--- a/nocompile/real_14.d Fri Apr 15 22:54:15 2005 +0000 +++ b/nocompile/real_14.d Sat Apr 16 08:18:57 2005 +0000 @@ -8,5 +8,5 @@ int main(){ int i = real.size; - retrun 0; + return 0; }
--- a/nocompile/super_06.d Fri Apr 15 22:54:15 2005 +0000 +++ b/nocompile/super_06.d Sat Apr 16 08:18:57 2005 +0000 @@ -2,7 +2,7 @@ // $Date$ // $Base$ -// __DSTRESS_ELINE__ 15 +// __DSTRESS_ELINE__ 10 module dstress.nocompile.super_06;
--- a/nocompile/union_11.d Fri Apr 15 22:54:15 2005 +0000 +++ b/nocompile/union_11.d Sat Apr 16 08:18:57 2005 +0000 @@ -7,7 +7,7 @@ // @uri@ news:cn9vah$1shn$1@digitaldaemon.com // @url@ nntp://digitalmars.com/digitalmars.D.bugs/2270 -// __DSTRESS_ELINE__ 20 +// __DSTRESS_ELINE__ 14 module dstress.nocompile.union_11;
--- a/nocompile/unittest_03.d Fri Apr 15 22:54:15 2005 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ -// $HeadURL$ -// $Date$ -// $Author$ - -// according to dmd-0.105 documentation unittests are class member functions - -// __DSTRESS_ELINE__ 11 - -module dstress.nocompile.unittest_03; - -unittest{ -}
--- a/run/alias_15.d Fri Apr 15 22:54:15 2005 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -// $HeadURL$ -// $Date$ -// $Author$ - -// @author@ Ilya Zaitseff <sark7@mail333.com> -// @date@ 2005-02-14 -// @uri@ news:opsl6xo4fhaaezs2@robingood -// @url@ nntp://news.digitalmars.com/digitalmars.D.bugs/2982 - -module dstress.run.alias_15; - -class A{ - int foo; -} - -class B{ - A a; -} - -int main(){ - B b=new B(); - assert(b.a.foo==0); - with(b){ - alias b.a.foo bar; - bar++; - } - assert(b.a.foo==1); - return 0; -} \ No newline at end of file
--- a/run/alias_16.d Fri Apr 15 22:54:15 2005 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -// $HeadURL$ -// $Date$ -// $Author$ - -// @author@ Ilya Zaitseff <sark7@mail333.com> -// @date@ 2005-02-14 -// @uri@ news:opsl6xo4fhaaezs2@robingood -// @url@ nntp://news.digitalmars.com/digitalmars.D.bugs/2982 - -module dstress.run.alias_16; - -class A{ - int foo; -} - -class B{ - A a; -} - -int main(){ - B b=new B(); - assert(b.a.foo==0); - { - alias b.a.foo bar; - bar++; - } - assert(b.a.foo==1); - return 0; -} \ No newline at end of file
--- a/run/bug_cgcs_353_C.d Fri Apr 15 22:54:15 2005 +0000 +++ b/run/bug_cgcs_353_C.d Sat Apr 16 08:18:57 2005 +0000 @@ -25,6 +25,6 @@ MyStruct a; MyStruct b; assert(a==b); - assert(!(a===b)); + assert(&a!=&b); return 0; -} \ No newline at end of file +}
--- a/run/bug_cgcs_353_D.d Fri Apr 15 22:54:15 2005 +0000 +++ b/run/bug_cgcs_353_D.d Sat Apr 16 08:18:57 2005 +0000 @@ -27,6 +27,6 @@ MyStruct a; MyStruct b; assert(a==b); - assert(!(a===b)); + assert(&a!=&b); return 0; }
--- a/run/bug_e2ir_141_A.d Fri Apr 15 22:54:15 2005 +0000 +++ b/run/bug_e2ir_141_A.d Sat Apr 16 08:18:57 2005 +0000 @@ -14,12 +14,14 @@ } class MyClass{ + static MyStruct _s; + static MyStruct prop(){ - MyStruct s; - return s; + return _s; } static void prop(MyStruct s){ + _s=s; } } @@ -27,7 +29,7 @@ MyClass c = new MyClass(); c.prop = true ? MyClass.prop : MyClass.prop; assert(c.prop.i == 0); - c.prop.i == 7; + c.prop.i = 7; assert(c.prop.i == 7); return 0; }
--- a/run/bug_e2ir_141_B.d Fri Apr 15 22:54:15 2005 +0000 +++ b/run/bug_e2ir_141_B.d Sat Apr 16 08:18:57 2005 +0000 @@ -10,12 +10,14 @@ module dstress.run.bug_e2ir_141_B; class MyClass{ + static int _i; + static int prop(){ - int i; - return i; + return _i; } static void prop(int i){ + _i=i; } } @@ -23,7 +25,7 @@ MyClass c = new MyClass(); c.prop = true ? MyClass.prop : MyClass.prop; assert(c.prop == 0); - c.prop == 7; + c.prop = 7; assert(c.prop == 7); return 0; }
--- a/run/bug_e2ir_141_C.d Fri Apr 15 22:54:15 2005 +0000 +++ b/run/bug_e2ir_141_C.d Sat Apr 16 08:18:57 2005 +0000 @@ -15,6 +15,7 @@ } static void prop(MyClass o){ + dummy=o; } }
--- a/run/bug_e2ir_141_D.d Fri Apr 15 22:54:15 2005 +0000 +++ b/run/bug_e2ir_141_D.d Sat Apr 16 08:18:57 2005 +0000 @@ -16,15 +16,15 @@ class MyClass{ static MyUnion prop(){ - MyUnion u; - return u; + return dummy; } static void prop(MyUnion u){ + dummy=u; } } -MyClass dummy; +MyUnion dummy; int main(){ MyClass c = new MyClass();
--- a/run/const_16.d Fri Apr 15 22:54:15 2005 +0000 +++ b/run/const_16.d Sat Apr 16 08:18:57 2005 +0000 @@ -15,7 +15,7 @@ const int i = 15; const StructA s1 = { i+1 }; -const StructA s2 = { s1 }; +const StructA s2 = s1; int main(){ assert(s1.a == 16);
--- a/run/creal_04.d Fri Apr 15 22:54:15 2005 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ -// $HeadURL$ -// $Date$ -// $Author$ - -module dstress.run.creal_04; - -int main(){ - real x1 = 2.0; - real y1 = 3.0; - real x2 = 5.0; - real y2 = 7.0; - ireal i = 1.0i; - - creal a = x1 + y1*i; - creal b = x2 + y2*i; - creal c = a / b; - - creal d = ((x1*x2 + y1*y2) + i*(x2*y1 - x1*y2)) / (x2*x2 + y2*y2); - assert(c == d); - - d = ((x1 + i*y1)*(x2 - i*y2)) / ((x2 + i*y2)*(x2 - i*y2)); - assert(c == d); - - return 0; -}
--- a/run/creal_09.d Fri Apr 15 22:54:15 2005 +0000 +++ b/run/creal_09.d Sat Apr 16 08:18:57 2005 +0000 @@ -5,7 +5,7 @@ module dstress.run.creal_09; int main(){ - a=1.3L+9.7Li; + creal a=1.3L+9.7Li; assert(a.re == 1.3L); assert(a.im == 9.7L); return 0;
--- a/run/delete_02.d Fri Apr 15 22:54:15 2005 +0000 +++ b/run/delete_02.d Sat Apr 16 08:18:57 2005 +0000 @@ -19,9 +19,9 @@ } } -int test(){ +void test(){ MyStruct t; - return t.i; + delete t; } int main(){
--- a/run/line_ending_unicode.d Fri Apr 15 22:54:15 2005 +0000 +++ b/run/line_ending_unicode.d Sat Apr 16 08:18:57 2005 +0000 @@ -1,1 +1,1 @@ -// encoding: utf-8 // line ending: unicode int main(){ try{ assert(0); }catch(Exception e){ checkLineNumber(e); return 0; }catch(Error e){ checkLineNumber(e); return 0; } assert(-1); return 1; } /* * WARNING: this code depends on the phobos implementation. * char[]s returned by wrong assertions have to look like: * "blah blah (linenumber) blah blah" */ void checkLineNumber(Object o){ char[] string=o.toString(); int start; for(start=0; start<string.length; start++){if(string[start]=='('){break;}} int end; for(end=string.length-1; end>start; end--){if(string[end]==')'){break;} } assert(end-start==2); assert(string[start+1]=='5'); } \ No newline at end of file +// encoding: utf-8 // line ending: unicode int main(){ try{ assert(0); }catch(Object e){ checkLineNumber(e); return 0; } return 1; } /* * WARNING: this code depends on the phobos implementation. * char[]s returned by wrong assertions have to look like: * "blah blah (linenumber) blah blah" */ void checkLineNumber(Object o){ char[] string=o.toString(); int start; for(start=0; start<string.length; start++){if(string[start]=='('){break;}} int end; for(end=string.length-1; end>start; end--){if(string[end]==')'){break;} } assert(end-start==2); assert(string[start+1]=='5'); }
--- a/run/line_token_03.d Fri Apr 15 22:54:15 2005 +0000 +++ b/run/line_token_03.d Sat Apr 16 08:18:57 2005 +0000 @@ -26,18 +26,10 @@ int start; for(start=0; start<string.length; start++){ - if(string[start]=='"'){ + if(string[start]=='('){ break; } } - int end; - for(end=start+1; end<string.length; end++){ - if(string[end]=='"'){ - break; - } - } - - assert(end<string.length); - assert(end-start==1); + assert(string[start-1 .. start+3]==" (0)"); }
--- a/run/line_token_04.d Fri Apr 15 22:54:15 2005 +0000 +++ b/run/line_token_04.d Sat Apr 16 08:18:57 2005 +0000 @@ -19,24 +19,17 @@ /* * @WARNING@: this code depends on the phobos implementation. * char[]s returned by wrong assertions have to look like: - * "blah blah \"filename\" blah blah" + * "blah blah filename(123) blah blah" */ void checkFileSpec(Object o){ char[] string=o.toString(); int start; for(start=0; start<string.length; start++){ - if(string[start]=='"'){ + if(string[start]=='('){ break; } } - int end; - for(end=start+1; end<string.length; end++){ - if(string[end]=='"'){ - break; - } - } - - assert(string[start .. end]=="\"a"); + assert(string[start-2 .. start+3]==" a(0)"); }
--- a/run/new_12.d Fri Apr 15 22:54:15 2005 +0000 +++ b/run/new_12.d Sat Apr 16 08:18:57 2005 +0000 @@ -19,7 +19,7 @@ int main(){ assert(counter==0); - MyStruct m; + MyStruct m=new MyStruct; m.x=1; assert(counter==1); return 0;
--- a/run/typeid_23.d Fri Apr 15 22:54:15 2005 +0000 +++ b/run/typeid_23.d Sat Apr 16 08:18:57 2005 +0000 @@ -9,6 +9,6 @@ TypeInfo ti = typeid(ubyte[]); assert(!(ti is null)); assert(ti.tsize==(ubyte[]).sizeof); - assert(ti.toString()=="ubyte"); + assert(ti.toString()=="ubyte[]"); return 0; }
--- a/run/typeid_24.d Fri Apr 15 22:54:15 2005 +0000 +++ b/run/typeid_24.d Sat Apr 16 08:18:57 2005 +0000 @@ -9,6 +9,6 @@ TypeInfo ti = typeid(ubyte*); assert(!(ti is null)); assert(ti.tsize==(ubyte*).sizeof); - assert(ti.toString()=="byte*"); + assert(ti.toString()=="ubyte*"); return 0; }
--- a/run/typeid_50.d Fri Apr 15 22:54:15 2005 +0000 +++ b/run/typeid_50.d Sat Apr 16 08:18:57 2005 +0000 @@ -9,6 +9,6 @@ TypeInfo ti = typeid(ifloat*); assert(!(ti is null)); assert(ti.tsize==(ifloat*).sizeof); - assert(ti.toString()=="ifloat"); + assert(ti.toString()=="ifloat*"); return 0; }
--- a/run/typeid_55.d Fri Apr 15 22:54:15 2005 +0000 +++ b/run/typeid_55.d Sat Apr 16 08:18:57 2005 +0000 @@ -9,6 +9,6 @@ TypeInfo ti = typeid(cfloat); assert(!(ti is null)); assert(ti.tsize==(cfloat).sizeof); - assert(ti.toString()=="cloat"); + assert(ti.toString()=="cfloat"); return 0; }
--- a/run/typeid_70.d Fri Apr 15 22:54:15 2005 +0000 +++ b/run/typeid_70.d Sat Apr 16 08:18:57 2005 +0000 @@ -13,6 +13,6 @@ TypeInfo ti = typeid(MyStruct); assert(!(ti is null)); assert(ti.tsize==(MyStruct).sizeof); - assert(ti.toString()=="MyStruct"); + assert(ti.toString()=="dstress.run.typeid_70.MyStruct"); return 0; }
--- a/run/typeid_71.d Fri Apr 15 22:54:15 2005 +0000 +++ b/run/typeid_71.d Sat Apr 16 08:18:57 2005 +0000 @@ -13,6 +13,6 @@ TypeInfo ti = typeid(MyStruct[]); assert(!(ti is null)); assert(ti.tsize==(MyStruct[]).sizeof); - assert(ti.toString()=="MyStruct[]"); + assert(ti.toString()=="dstress.run.typeid_71.MyStruct[]"); return 0; }
--- a/run/typeid_72.d Fri Apr 15 22:54:15 2005 +0000 +++ b/run/typeid_72.d Sat Apr 16 08:18:57 2005 +0000 @@ -13,6 +13,6 @@ TypeInfo ti = typeid(MyStruct*); assert(!(ti is null)); assert(ti.tsize==(MyStruct*).sizeof); - assert(ti.toString()=="MyStruct*"); + assert(ti.toString()=="dstress.run.typeid_72.MyStruct*"); return 0; }
--- a/run/typeid_73.d Fri Apr 15 22:54:15 2005 +0000 +++ b/run/typeid_73.d Sat Apr 16 08:18:57 2005 +0000 @@ -13,6 +13,6 @@ TypeInfo ti = typeid(MyClass); assert(!(ti is null)); assert(ti.tsize==(MyClass).sizeof); - assert(ti.toString()=="MyClass"); + assert(ti.toString()=="dstress.run.typeid_73.MyClass"); return 0; }
--- a/run/typeid_74.d Fri Apr 15 22:54:15 2005 +0000 +++ b/run/typeid_74.d Sat Apr 16 08:18:57 2005 +0000 @@ -13,6 +13,6 @@ TypeInfo ti = typeid(MyClass*); assert(!(ti is null)); assert(ti.tsize==(MyClass*).sizeof); - assert(ti.toString()=="MyClass*"); + assert(ti.toString()=="dstress.run.typeid_74.MyClass*"); return 0; }
--- a/run/typeid_75.d Fri Apr 15 22:54:15 2005 +0000 +++ b/run/typeid_75.d Sat Apr 16 08:18:57 2005 +0000 @@ -14,6 +14,6 @@ TypeInfo ti = typeid(MyEnum); assert(!(ti is null)); assert(ti.tsize==(MyEnum).sizeof); - assert(ti.toString()=="MyEnum"); + assert(ti.toString()=="dstress.run.typeid_75.MyEnum"); return 0; }
--- a/run/typeid_76.d Fri Apr 15 22:54:15 2005 +0000 +++ b/run/typeid_76.d Sat Apr 16 08:18:57 2005 +0000 @@ -14,6 +14,6 @@ TypeInfo ti = typeid(MyEnum[]); assert(!(ti is null)); assert(ti.tsize==(MyEnum[]).sizeof); - assert(ti.toString()=="MyEnum[]"); + assert(ti.toString()=="dstress.run.typeid_76.MyEnum[]"); return 0; }
--- a/run/typeid_77.d Fri Apr 15 22:54:15 2005 +0000 +++ b/run/typeid_77.d Sat Apr 16 08:18:57 2005 +0000 @@ -14,6 +14,6 @@ TypeInfo ti = typeid(MyEnum*); assert(!(ti is null)); assert(ti.tsize==(MyEnum*).sizeof); - assert(ti.toString()=="MyEnum*"); + assert(ti.toString()=="dstress.run.typeid_77.MyEnum*"); return 0; }
--- a/run/typeid_78.d Fri Apr 15 22:54:15 2005 +0000 +++ b/run/typeid_78.d Sat Apr 16 08:18:57 2005 +0000 @@ -14,6 +14,6 @@ TypeInfo ti = typeid(MyUnion); assert(!(ti is null)); assert(ti.tsize==(MyUnion).sizeof); - assert(ti.toString()=="MyUnion"); + assert(ti.toString()=="dstress.run.typeid_78.MyUnion"); return 0; }
--- a/run/typeid_79.d Fri Apr 15 22:54:15 2005 +0000 +++ b/run/typeid_79.d Sat Apr 16 08:18:57 2005 +0000 @@ -14,6 +14,6 @@ TypeInfo ti = typeid(MyUnion[]); assert(!(ti is null)); assert(ti.tsize==(MyUnion[]).sizeof); - assert(ti.toString()=="MyUnion[]"); + assert(ti.toString()=="dstress.run.typeid_79.MyUnion[]"); return 0; }
--- a/run/typeid_80.d Fri Apr 15 22:54:15 2005 +0000 +++ b/run/typeid_80.d Sat Apr 16 08:18:57 2005 +0000 @@ -14,6 +14,6 @@ TypeInfo ti = typeid(MyUnion*); assert(!(ti is null)); assert(ti.tsize==(MyUnion*).sizeof); - assert(ti.toString()=="MyUnion*"); + assert(ti.toString()=="dstress.run.typeid_80.MyUnion*"); return 0; }