mirror of
https://github.com/NixOS/nix.git
synced 2025-11-17 07:52:43 +01:00
* Path hashing.
This commit is contained in:
parent
a09e66da5a
commit
2f04e7102e
5 changed files with 178 additions and 8 deletions
16
src/test.cc
16
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. */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue