Changeset 649

Show
Ignore:
Timestamp:
08/29/10 04:36:42 (1 year ago)
Author:
braddr
Message:

Updates to the test suite based on changes to dmd. Primarily 'auto' -> 'scope'.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/test/compilable/extra-files/header.di

    r624 r649  
    11// D import file generated from 'compilable/header.d' 
    22module foo.bar; 
    3 private  
    4 
    5     import std.stdio; 
    6 
     3private import std.stdio; 
     4 
    75pragma (lib, "test"); 
    86pragma (msg, "Hello World"); 
     
    261259} 
    262260} 
    263 static  
    264 
    265     char[] charArray = ['"','\'']; 
    266 
     261static char[] charArray = ['"','\'']; 
     262 
    267263class Point 
    268264{ 
  • trunk/test/compilable/extra-files/xheader.di

    r624 r649  
    2626class C3 
    2727{ 
    28     @property  
    29 
    30     int get() 
     28    @property int get() 
    3129{ 
    3230return 0; 
    3331} 
     32 
    3433} 
    35 } 
  • trunk/test/runnable/auto1.d

    r574 r649  
    44/******************************************/ 
    55 
    6 auto class Foo 
     6scope class Foo 
    77{ 
    88    static int x; 
     
    1717int test1x() 
    1818{ 
    19     auto Foo f = new Foo(); 
     19    scope Foo f = new Foo(); 
    2020    return 6; 
    2121} 
     
    2525{ 
    2626    { 
    27     auto Foo f = new Foo(); 
     27    scope Foo f = new Foo(); 
    2828    } 
    2929    int c; 
     
    3535 
    3636    if (c != 6) 
    37     auto Foo h = new Foo(); 
     37    scope Foo h = new Foo(); 
    3838    assert(Foo.x == 2); 
    3939 
    4040    if (c == 6) 
    41     auto Foo j = new Foo(); 
     41    scope Foo j = new Foo(); 
    4242    assert(Foo.x == 3); 
    4343 
    4444    { 
    45     auto Foo g = null, k = new Foo(); 
     45    scope Foo g = null, k = new Foo(); 
    4646    assert(Foo.x == 3); 
    4747    } 
     
    5353int ax; 
    5454 
    55 auto class A2 
     55scope class A2 
    5656{ 
    5757  this() 
     
    7272{ 
    7373  { 
    74     auto A2 a = new A2(); 
     74    scope A2 a = new A2(); 
    7575    printf("Hello world.\n"); 
    7676  } 
     
    8484int status3; 
    8585 
    86 auto class Parent3 
     86scope class Parent3 
    8787{ 
    8888} 
    8989 
    90 auto class Child3 : Parent3 
     90scope class Child3 : Parent3 
    9191{ 
    9292    this(){ 
     
    103103void foo3() 
    104104{ 
    105     auto Parent3 o = new Child3(); 
     105    scope Parent3 o = new Child3(); 
    106106    assert(status3==1); 
    107107} 
  • trunk/test/runnable/bug5.d

    r539 r649  
    44 
    55int test1() { 
    6     auto F f = new F(); // comment out and warning goes away 
     6    scope F f = new F(); // comment out and warning goes away 
    77    return 0; 
    88} 
  • trunk/test/runnable/interface.d

    r551 r649  
    5050 
    5151  { 
    52     auto I j = new C(); 
     52    scope I j = new C(); 
    5353  } 
    5454} 
  • trunk/test/runnable/test20.d

    r553 r649  
    213213/*****************************************/ 
    214214 
    215 auto class T11 
     215scope class T11 
    216216{ 
    217217    this(){} 
     
    221221void test11() 
    222222{ 
    223     auto T11 t=new T11(); 
     223    scope T11 t=new T11(); 
    224224    int i=1; 
    225225    switch(i) 
  • trunk/test/runnable/test23.d

    r553 r649  
    737737void foo33() 
    738738{ 
    739     auto Foo33 f = new(3) Foo33; 
     739    scope Foo33 f = new(3) Foo33; 
    740740} 
    741741 
  • trunk/test/runnable/test8.d

    r551 r649  
    893893class B44 : A44 { } 
    894894 
    895 void foo44() { auto B44 b = new B44; } 
     895void foo44() { scope B44 b = new B44; } 
    896896 
    897897void test44() 
  • trunk/test/runnable/testdstress.d

    r575 r649  
    450450/* ================================ */ 
    451451 
    452 auto class AutoClass{ 
     452scope class AutoClass{ 
    453453} 
    454454 
    455455void test22() 
    456456{ 
    457     auto AutoClass ac = new AutoClass(); 
     457    scope AutoClass ac = new AutoClass(); 
    458458 
    459459    with(ac){ 
     
    465465int status23; 
    466466 
    467 auto class C23{ 
     467scope class C23{ 
    468468    ~this(){ 
    469469        assert(status23==0); 
     
    475475void foo23(){ 
    476476    assert(status23==0); 
    477     auto C23 ac = new C23(); 
     477    scope C23 ac = new C23(); 
    478478} 
    479479 
     
    491491int status24; 
    492492 
    493 auto class C24{ 
     493scope class C24{ 
    494494    this(){ 
    495495        assert(status24==0); 
     
    504504 
    505505void check24(){ 
    506     auto C24 ac = new C24(); 
     506    scope C24 ac = new C24(); 
    507507    throw new Exception("check error"); 
    508508} 
     
    639639{ 
    640640    try{ 
    641         auto C30 m = new C30(); 
     641        scope C30 m = new C30(); 
    642642        assert(status30 == 1); 
    643643        delete m; 
  • trunk/test/runnable/testmmfile.d

    r575 r649  
    1212    write(name, s); 
    1313 
    14     {   auto MmFile mmf = new MmFile(name); 
     14    {   scope MmFile mmf = new MmFile(name); 
    1515    string p; 
    1616 
     
    2323    } 
    2424 
    25     {   auto MmFile mmf = new MmFile(name, MmFile.Mode.Read, 0, null); 
     25    {   scope MmFile mmf = new MmFile(name, MmFile.Mode.Read, 0, null); 
    2626    string p; 
    2727 
     
    3737    remove(name); 
    3838 
    39     {   auto MmFile mmf = new MmFile(name, MmFile.Mode.ReadWriteNew, 4, null); 
     39    {   scope MmFile mmf = new MmFile(name, MmFile.Mode.ReadWriteNew, 4, null); 
    4040    char[] p; 
    4141 
     
    5252    } 
    5353 
    54     {   auto MmFile mmf = new MmFile(name, MmFile.Mode.ReadWriteNew, 4, null); 
     54    {   scope MmFile mmf = new MmFile(name, MmFile.Mode.ReadWriteNew, 4, null); 
    5555    char[] p; 
    5656 
     
    6868    } 
    6969 
    70     {   auto MmFile mmf = new MmFile(name, MmFile.Mode.ReadWrite, 4, null); 
     70    {   scope MmFile mmf = new MmFile(name, MmFile.Mode.ReadWrite, 4, null); 
    7171    char[] p; 
    7272 
     
    8585    remove(name); 
    8686 
    87     {   auto MmFile mmf = new MmFile(name, MmFile.Mode.ReadWrite, 4, null); 
     87    {   scope MmFile mmf = new MmFile(name, MmFile.Mode.ReadWrite, 4, null); 
    8888    char[] p; 
    8989 
     
    9999    } 
    100100 
    101     {   auto MmFile mmf = new MmFile(name, MmFile.Mode.ReadCopyOnWrite, 4, null); 
     101    {   scope MmFile mmf = new MmFile(name, MmFile.Mode.ReadCopyOnWrite, 4, null); 
    102102    char[] p; 
    103103 
  • trunk/test/runnable/testscope.d

    r549 r649  
    3737    try 
    3838    { 
    39     auto Foo f = new Foo(); 
     39    scope Foo f = new Foo(); 
    4040    assert(0); 
    4141    } 
  • trunk/test/runnable/warning1.d

    r549 r649  
    77int foo() 
    88{ 
    9     auto F f = new F(); // comment out and warning goes away 
     9    scope F f = new F(); // comment out and warning goes away 
    1010    return 0; 
    1111}