Changeset 146
- Timestamp:
- 08/27/10 02:50:21 (1 year ago)
- Files:
-
- trunk/bin/deferAssertTest_debug.exe (modified) (previous)
- trunk/src/semitwist/apps/tests/deferAssertTest/main.d (modified) (1 diff)
- trunk/src/semitwist/util/deferAssert.d (modified) (3 diffs)
- trunk/stbuild.conf (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/semitwist/apps/tests/deferAssertTest/main.d
r137 r146 54 54 Program output: 55 55 56 src\semitwist\apps\tests\deferAssertTest\main.d(3 7): Assert Failed (foo == 3 || foo > 5): foo is bad57 src\semitwist\apps\tests\deferAssertTest\main.d(3 9): Assert Failed (false)58 src\semitwist\apps\tests\deferAssertTest\main.d( 40): Assert Threw (throwsException()): Exceptions are handled:56 src\semitwist\apps\tests\deferAssertTest\main.d(36): Assert Failed (foo == 3 || foo > 5): foo is bad 57 src\semitwist\apps\tests\deferAssertTest\main.d(38): Assert Failed (false) 58 src\semitwist\apps\tests\deferAssertTest\main.d(39): Assert Threw (throwsException()): Exceptions are handled: 59 59 Threw: object.Exception: Some exception 60 src\semitwist\apps\tests\deferAssertTest\main.d(4 2): Ensure Failed: ensure foo failed60 src\semitwist\apps\tests\deferAssertTest\main.d(41): Ensure Failed: ensure foo failed 61 61 Expression 'foo': 62 62 Expected: _ == 3 || _ > 5 63 63 Actual: 2 64 src\semitwist\apps\tests\deferAssertTest\main.d(4 4): Ensure Failed64 src\semitwist\apps\tests\deferAssertTest\main.d(43): Ensure Failed 65 65 Expression 'bar': 66 66 Expected: _ == "hola" 67 67 Actual: hello 68 src\semitwist\apps\tests\deferAssertTest\main.d(4 6): Ensure Threw: Exceptions are handled:68 src\semitwist\apps\tests\deferAssertTest\main.d(45): Ensure Threw: Exceptions are handled: 69 69 Expression 'throwsException()': 70 70 Expected: !_ 71 71 Threw: object.Exception: Some exception 72 src\semitwist\apps\tests\deferAssertTest\main.d(4 7): Ensure Threw: Exceptions are handled:72 src\semitwist\apps\tests\deferAssertTest\main.d(46): Ensure Threw: Exceptions are handled: 73 73 Expression 'false': 74 74 Expected: _ == throwsException() 75 75 Threw: object.Exception: Some exception 76 src\semitwist\apps\tests\deferAssertTest\main.d( 50): Ensure Throw Failed: Wrong type thrown!76 src\semitwist\apps\tests\deferAssertTest\main.d(49): Ensure Throw Failed: Wrong type thrown! 77 77 Statement 'throw new Object();': 78 78 Expected: object.Exception 79 79 Actual: object.Object: object.Object 80 src\semitwist\apps\tests\deferAssertTest\main.d(5 1): Ensure Throw Failed: Wrong type thrown!80 src\semitwist\apps\tests\deferAssertTest\main.d(50): Ensure Throw Failed: Wrong type thrown! 81 81 Statement 'throw new Exception("Hello");': 82 82 Expected: object.Object 83 83 Actual: object.Exception: Hello 84 tango.core.Exception.AssertException@src\semitwist\util\deferAssert.d(170): 9 Assert Failures84 core.exception.AssertError@src\semitwist\util\deferAssert.d(171): 9 Assert Failures 85 85 86 86 +/ trunk/src/semitwist/util/deferAssert.d
r134 r146 62 62 Exception e = cast(Exception)thrown; 63 63 if(e) 64 write (thrown);64 writeln(thrown); 65 65 else 66 66 writefln("Object: type '%s': %s", thrown.classinfo.name, thrown); … … 112 112 Exception e = cast(Exception)thrown; 113 113 if(e) 114 write (thrown);114 writeln(thrown); 115 115 else 116 116 writefln("Object: type '%s': %s", thrown.classinfo.name, thrown); … … 144 144 file, line, msg=="" ? "" : ": " ~ msg, 145 145 stmtStr, TExpected.classinfo.name, actualType); 146 Exceptione = cast(Exception)thrown;146 Throwable e = cast(Exception)thrown; 147 147 if(e) 148 e.writeOut( (string msg) {Stdout(msg);} );148 writeln(e); //e.writeOut( (string msg) {Stdout(msg);} ); 149 149 else 150 150 writefln("%s: %s", actualType, thrown); trunk/stbuild.conf
r137 r146 39 39 flags -ofbin/$(TARGET)_$(MODE) _ 40 40 -debug -g _ 41 _#-C-unittest _41 -C-unittest _ 42 42 -C-wi 43 43
