[dmd-internals] druntime + test suite issues

Brad Roberts braddr at puremagic.com
Tue May 25 00:28:10 PDT 2010


The new druntime defaults to adding stack traces to exceptions now, which causes
one test in the test suite to fail due to checking for an exact match in the
exception string.  Luckily it's easy enough to disable the handler:

diff --git a/testformat.d b/testformat.d
index 0a291d5..a6f8546 100644
--- a/testformat.d
+++ b/testformat.d
@@ -1,4 +1,5 @@

+import core.runtime;
 import std.stdio;
 import std.string;

@@ -76,6 +77,10 @@ void test2()

 void test3()
 {
+    //auto oldTH = Runtime.traceHandler;
+    Runtime.traceHandler = null;
+    //scope(exit) Runtime.traceHandler = oldTH;
+
     Object e = new Exception("hello");
     writeln(e.toString());
     assert(e.toString() == "object.Exception: hello");


See my latest comment to bug 1001 for the code to allow the two commented out lines.

Later,
Brad


More information about the dmd-internals mailing list