about summary refs log tree commit diff
path: root/src/test.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-06-16T15·59+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-06-16T15·59+0000
commit2f04e7102eaad3159073019af96e6e5c4f2c9bcf (patch)
tree324814e02be135c03df6e456c1eec1227b3b85dc /src/test.cc
parenta09e66da5af348dc25e3b372ec9f518d3532f863 (diff)
* Path hashing.
Diffstat (limited to 'src/test.cc')
-rw-r--r--src/test.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test.cc b/src/test.cc
index 79468182ea..b37a16a1fe 100644
--- a/src/test.cc
+++ b/src/test.cc
@@ -19,6 +19,15 @@ void evalTest(Expr e)
 }
 
 
+struct MySink : DumpSink
+{
+    virtual void operator () (const unsigned char * data, unsigned int len)
+    {
+        cout.write((char *) data, len);
+    }
+};
+
+
 void runTests()
 {
     /* Hashing. */
@@ -36,6 +45,13 @@ void runTests()
         abort();
     } catch (BadRefError err) { };
 
+    /* Dumping. */
+
+#if 0
+    MySink sink;
+    dumpPath("scratch", sink);
+    cout << (string) hashPath("scratch") << endl;
+#endif
 
     /* Set up the test environment. */