Changeset 649
- Timestamp:
- 08/29/10 04:36:42 (1 year ago)
- Files:
-
- trunk/test/compilable/extra-files/header.di (modified) (2 diffs)
- trunk/test/compilable/extra-files/xheader.di (modified) (1 diff)
- trunk/test/fail_compilation/fail255.d (deleted)
- trunk/test/runnable/auto1.d (modified) (8 diffs)
- trunk/test/runnable/bug5.d (modified) (1 diff)
- trunk/test/runnable/interface.d (modified) (1 diff)
- trunk/test/runnable/test20.d (modified) (2 diffs)
- trunk/test/runnable/test23.d (modified) (1 diff)
- trunk/test/runnable/test8.d (modified) (1 diff)
- trunk/test/runnable/testdstress.d (modified) (6 diffs)
- trunk/test/runnable/testmmfile.d (modified) (7 diffs)
- trunk/test/runnable/testscope.d (modified) (1 diff)
- trunk/test/runnable/warning1.d (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/test/compilable/extra-files/header.di
r624 r649 1 1 // D import file generated from 'compilable/header.d' 2 2 module foo.bar; 3 private 4 { 5 import std.stdio; 6 } 3 private import std.stdio; 4 7 5 pragma (lib, "test"); 8 6 pragma (msg, "Hello World"); … … 261 259 } 262 260 } 263 static 264 { 265 char[] charArray = ['"','\'']; 266 } 261 static char[] charArray = ['"','\'']; 262 267 263 class Point 268 264 { trunk/test/compilable/extra-files/xheader.di
r624 r649 26 26 class C3 27 27 { 28 @property 29 { 30 int get() 28 @property int get() 31 29 { 32 30 return 0; 33 31 } 32 34 33 } 35 }trunk/test/runnable/auto1.d
r574 r649 4 4 /******************************************/ 5 5 6 autoclass Foo6 scope class Foo 7 7 { 8 8 static int x; … … 17 17 int test1x() 18 18 { 19 autoFoo f = new Foo();19 scope Foo f = new Foo(); 20 20 return 6; 21 21 } … … 25 25 { 26 26 { 27 autoFoo f = new Foo();27 scope Foo f = new Foo(); 28 28 } 29 29 int c; … … 35 35 36 36 if (c != 6) 37 autoFoo h = new Foo();37 scope Foo h = new Foo(); 38 38 assert(Foo.x == 2); 39 39 40 40 if (c == 6) 41 autoFoo j = new Foo();41 scope Foo j = new Foo(); 42 42 assert(Foo.x == 3); 43 43 44 44 { 45 autoFoo g = null, k = new Foo();45 scope Foo g = null, k = new Foo(); 46 46 assert(Foo.x == 3); 47 47 } … … 53 53 int ax; 54 54 55 autoclass A255 scope class A2 56 56 { 57 57 this() … … 72 72 { 73 73 { 74 autoA2 a = new A2();74 scope A2 a = new A2(); 75 75 printf("Hello world.\n"); 76 76 } … … 84 84 int status3; 85 85 86 autoclass Parent386 scope class Parent3 87 87 { 88 88 } 89 89 90 autoclass Child3 : Parent390 scope class Child3 : Parent3 91 91 { 92 92 this(){ … … 103 103 void foo3() 104 104 { 105 autoParent3 o = new Child3();105 scope Parent3 o = new Child3(); 106 106 assert(status3==1); 107 107 } trunk/test/runnable/bug5.d
r539 r649 4 4 5 5 int test1() { 6 autoF f = new F(); // comment out and warning goes away6 scope F f = new F(); // comment out and warning goes away 7 7 return 0; 8 8 } trunk/test/runnable/interface.d
r551 r649 50 50 51 51 { 52 autoI j = new C();52 scope I j = new C(); 53 53 } 54 54 } trunk/test/runnable/test20.d
r553 r649 213 213 /*****************************************/ 214 214 215 autoclass T11215 scope class T11 216 216 { 217 217 this(){} … … 221 221 void test11() 222 222 { 223 autoT11 t=new T11();223 scope T11 t=new T11(); 224 224 int i=1; 225 225 switch(i) trunk/test/runnable/test23.d
r553 r649 737 737 void foo33() 738 738 { 739 autoFoo33 f = new(3) Foo33;739 scope Foo33 f = new(3) Foo33; 740 740 } 741 741 trunk/test/runnable/test8.d
r551 r649 893 893 class B44 : A44 { } 894 894 895 void foo44() { autoB44 b = new B44; }895 void foo44() { scope B44 b = new B44; } 896 896 897 897 void test44() trunk/test/runnable/testdstress.d
r575 r649 450 450 /* ================================ */ 451 451 452 autoclass AutoClass{452 scope class AutoClass{ 453 453 } 454 454 455 455 void test22() 456 456 { 457 autoAutoClass ac = new AutoClass();457 scope AutoClass ac = new AutoClass(); 458 458 459 459 with(ac){ … … 465 465 int status23; 466 466 467 autoclass C23{467 scope class C23{ 468 468 ~this(){ 469 469 assert(status23==0); … … 475 475 void foo23(){ 476 476 assert(status23==0); 477 autoC23 ac = new C23();477 scope C23 ac = new C23(); 478 478 } 479 479 … … 491 491 int status24; 492 492 493 autoclass C24{493 scope class C24{ 494 494 this(){ 495 495 assert(status24==0); … … 504 504 505 505 void check24(){ 506 autoC24 ac = new C24();506 scope C24 ac = new C24(); 507 507 throw new Exception("check error"); 508 508 } … … 639 639 { 640 640 try{ 641 autoC30 m = new C30();641 scope C30 m = new C30(); 642 642 assert(status30 == 1); 643 643 delete m; trunk/test/runnable/testmmfile.d
r575 r649 12 12 write(name, s); 13 13 14 { autoMmFile mmf = new MmFile(name);14 { scope MmFile mmf = new MmFile(name); 15 15 string p; 16 16 … … 23 23 } 24 24 25 { autoMmFile mmf = new MmFile(name, MmFile.Mode.Read, 0, null);25 { scope MmFile mmf = new MmFile(name, MmFile.Mode.Read, 0, null); 26 26 string p; 27 27 … … 37 37 remove(name); 38 38 39 { autoMmFile mmf = new MmFile(name, MmFile.Mode.ReadWriteNew, 4, null);39 { scope MmFile mmf = new MmFile(name, MmFile.Mode.ReadWriteNew, 4, null); 40 40 char[] p; 41 41 … … 52 52 } 53 53 54 { autoMmFile mmf = new MmFile(name, MmFile.Mode.ReadWriteNew, 4, null);54 { scope MmFile mmf = new MmFile(name, MmFile.Mode.ReadWriteNew, 4, null); 55 55 char[] p; 56 56 … … 68 68 } 69 69 70 { autoMmFile mmf = new MmFile(name, MmFile.Mode.ReadWrite, 4, null);70 { scope MmFile mmf = new MmFile(name, MmFile.Mode.ReadWrite, 4, null); 71 71 char[] p; 72 72 … … 85 85 remove(name); 86 86 87 { autoMmFile mmf = new MmFile(name, MmFile.Mode.ReadWrite, 4, null);87 { scope MmFile mmf = new MmFile(name, MmFile.Mode.ReadWrite, 4, null); 88 88 char[] p; 89 89 … … 99 99 } 100 100 101 { autoMmFile mmf = new MmFile(name, MmFile.Mode.ReadCopyOnWrite, 4, null);101 { scope MmFile mmf = new MmFile(name, MmFile.Mode.ReadCopyOnWrite, 4, null); 102 102 char[] p; 103 103 trunk/test/runnable/testscope.d
r549 r649 37 37 try 38 38 { 39 autoFoo f = new Foo();39 scope Foo f = new Foo(); 40 40 assert(0); 41 41 } trunk/test/runnable/warning1.d
r549 r649 7 7 int foo() 8 8 { 9 autoF f = new F(); // comment out and warning goes away9 scope F f = new F(); // comment out and warning goes away 10 10 return 0; 11 11 }
