diff options
author | JINMEI Tatuya <jinmei@isc.org> | 2010-04-14 00:57:19 +0200 |
---|---|---|
committer | JINMEI Tatuya <jinmei@isc.org> | 2010-04-14 00:57:19 +0200 |
commit | 4822e0332053eeec2ebd044040c1c41010a4fdf0 (patch) | |
tree | b5a5c2480ec6bca919563469d6c495f523f08c32 /src/lib/dns/tests/unittest_util.h | |
parent | cleanup: construct RRType from integer when possible. (diff) | |
download | kea-4822e0332053eeec2ebd044040c1c41010a4fdf0.tar.xz kea-4822e0332053eeec2ebd044040c1c41010a4fdf0.zip |
made test data paths dynamically configurable with the default path of @srcdir@/testdata. This will allow testdata to be referred to from a non-src build directory.
We can also specify mulitiple directories, which may happen if we generate some data files from spec at build time and run tests under a non-src directory.
git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1709 e5f2f494-b856-4b98-b285-d166d9295462
Diffstat (limited to 'src/lib/dns/tests/unittest_util.h')
-rw-r--r-- | src/lib/dns/tests/unittest_util.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/dns/tests/unittest_util.h b/src/lib/dns/tests/unittest_util.h index 2774602c53..a585426a33 100644 --- a/src/lib/dns/tests/unittest_util.h +++ b/src/lib/dns/tests/unittest_util.h @@ -31,10 +31,15 @@ public: /// /// read text format wire data from a file and put it to the given vector. /// - static void readWireData(const char*datafile, + static void readWireData(const char* datafile, std::vector<unsigned char>& data); /// + /// add a path that \c readWireData() will search for test data files. + /// + static void addDataPath(const std::string& directory); + + /// /// convert a sequence of hex strings into the corresponding list of /// 8-bit integers, and append them to the vector. /// |