Changeset 146

Show
Ignore:
Timestamp:
08/27/10 02:50:21 (1 year ago)
Author:
Abscissa
Message:

(NB) deferAssertTest: Works now.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/semitwist/apps/tests/deferAssertTest/main.d

    r137 r146  
    5454Program output: 
    5555 
    56 src\semitwist\apps\tests\deferAssertTest\main.d(37): Assert Failed (foo == 3 || foo > 5): foo is bad 
    57 src\semitwist\apps\tests\deferAssertTest\main.d(39): Assert Failed (false) 
    58 src\semitwist\apps\tests\deferAssertTest\main.d(40): Assert Threw (throwsException()): Exceptions are handled: 
     56src\semitwist\apps\tests\deferAssertTest\main.d(36): Assert Failed (foo == 3 || foo > 5): foo is bad 
     57src\semitwist\apps\tests\deferAssertTest\main.d(38): Assert Failed (false) 
     58src\semitwist\apps\tests\deferAssertTest\main.d(39): Assert Threw (throwsException()): Exceptions are handled: 
    5959Threw: object.Exception: Some exception 
    60 src\semitwist\apps\tests\deferAssertTest\main.d(42): Ensure Failed: ensure foo failed 
     60src\semitwist\apps\tests\deferAssertTest\main.d(41): Ensure Failed: ensure foo failed 
    6161Expression 'foo': 
    6262Expected: _ == 3 || _ > 5 
    6363Actual: 2 
    64 src\semitwist\apps\tests\deferAssertTest\main.d(44): Ensure Failed 
     64src\semitwist\apps\tests\deferAssertTest\main.d(43): Ensure Failed 
    6565Expression 'bar': 
    6666Expected: _ == "hola" 
    6767Actual: hello 
    68 src\semitwist\apps\tests\deferAssertTest\main.d(46): Ensure Threw: Exceptions are handled: 
     68src\semitwist\apps\tests\deferAssertTest\main.d(45): Ensure Threw: Exceptions are handled: 
    6969Expression 'throwsException()': 
    7070Expected: !_ 
    7171Threw: object.Exception: Some exception 
    72 src\semitwist\apps\tests\deferAssertTest\main.d(47): Ensure Threw: Exceptions are handled: 
     72src\semitwist\apps\tests\deferAssertTest\main.d(46): Ensure Threw: Exceptions are handled: 
    7373Expression 'false': 
    7474Expected: _ == throwsException() 
    7575Threw: object.Exception: Some exception 
    76 src\semitwist\apps\tests\deferAssertTest\main.d(50): Ensure Throw Failed: Wrong type thrown! 
     76src\semitwist\apps\tests\deferAssertTest\main.d(49): Ensure Throw Failed: Wrong type thrown! 
    7777Statement 'throw new Object();': 
    7878Expected: object.Exception 
    7979Actual:   object.Object: object.Object 
    80 src\semitwist\apps\tests\deferAssertTest\main.d(51): Ensure Throw Failed: Wrong type thrown! 
     80src\semitwist\apps\tests\deferAssertTest\main.d(50): Ensure Throw Failed: Wrong type thrown! 
    8181Statement 'throw new Exception("Hello");': 
    8282Expected: object.Object 
    8383Actual:   object.Exception: Hello 
    84 tango.core.Exception.AssertException@src\semitwist\util\deferAssert.d(170): 9 Assert Failures 
     84core.exception.AssertError@src\semitwist\util\deferAssert.d(171): 9 Assert Failures 
    8585 
    8686+/ 
  • trunk/src/semitwist/util/deferAssert.d

    r134 r146  
    6262    Exception e = cast(Exception)thrown; 
    6363    if(e) 
    64         write(thrown); 
     64        writeln(thrown); 
    6565    else 
    6666        writefln("Object: type '%s': %s", thrown.classinfo.name, thrown); 
     
    112112    Exception e = cast(Exception)thrown; 
    113113    if(e) 
    114         write(thrown); 
     114        writeln(thrown); 
    115115    else 
    116116        writefln("Object: type '%s': %s", thrown.classinfo.name, thrown); 
     
    144144               file, line, msg=="" ? "" : ": " ~ msg, 
    145145               stmtStr, TExpected.classinfo.name, actualType); 
    146         Exception e = cast(Exception)thrown; 
     146        Throwable e = cast(Exception)thrown; 
    147147        if(e) 
    148             e.writeOut( (string msg) {Stdout(msg);} ); 
     148            writeln(e); //e.writeOut( (string msg) {Stdout(msg);} ); 
    149149        else 
    150150            writefln("%s: %s", actualType, thrown); 
  • trunk/stbuild.conf

    r137 r146  
    3939flags -ofbin/$(TARGET)_$(MODE) _ 
    4040      -debug -g _ 
    41       _#-C-unittest _ 
     41      -C-unittest _ 
    4242      -C-wi 
    4343