Note: This website is archived. For up-to-date information about D projects and development, please visit wiki.dlang.org.

Changeset 806

Show
Ignore:
Timestamp:
12/14/10 05:42:48 (14 years ago)
Author:
braddr
Message:

Fix to work for both 32 and 64 bit alignment rules.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/test/runnable/testdstress.d

    r649 r806  
    842842{ 
    843843    C41 c; 
    844844    assert(counter41==0); 
    845845    c = new C41(); 
    846846    assert(counter41==3); 
    847847} 
    848848 
    849849/* ================================ */ 
    850850 
    851851struct S42{ 
    852852    int y; 
    853853    void* x; 
    854854} 
    855855 
    856856void test42() 
    857857{ 
    858858    size_t t; 
    859859    t = S42.y.offsetof; 
    860860    assert(t == 0); 
    861861    t = S42.x.offsetof; 
    862     assert(t == int.sizeof); 
     862    assert((t % (void*).sizeof) == 0); 
    863863} 
    864864 
    865865/* ================================ */ 
    866866 
    867867int main() 
    868868{ 
    869869    test1(); 
    870870    test2(); 
    871871    test3(); 
    872872    test4(); 
    873873    test5(); 
    874874    test6(); 
    875875    test7(); 
    876876    test8(); 
    877877    test9(); 
    878878    test10(); 
    879879    test11(); 
    880880    test12(); 
    881881    test13(); 
    882882    test14();