diff --git a/libethereum/BlockChain.cpp b/libethereum/BlockChain.cpp
index d8dbd266f..be3449a60 100644
--- a/libethereum/BlockChain.cpp
+++ b/libethereum/BlockChain.cpp
@@ -273,7 +273,7 @@ void BlockChain::rebuild(std::string const& _path, std::function.
+*/
+/** @file core.cpp
+ * @author Dimitry Khokhlov
+ * @date 2014
+ * CORE test functions.
+ */
+
+#include
+#include
+#include
+
+BOOST_AUTO_TEST_SUITE(CoreLibTests)
+
+BOOST_AUTO_TEST_CASE(byteRef)
+{
+ cnote << "bytesRef copyTo and toString...";
+ dev::bytes originalSequence = dev::fromHex("0102030405060708091011121314151617181920212223242526272829303132");
+ dev::bytesRef out(&originalSequence.at(0), 32);
+ dev::h256 hash32("1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347");
+ hash32.ref().copyTo(out);
+
+ BOOST_CHECK_MESSAGE(out.size() == 32, "Error wrong result size when h256::ref().copyTo(dev::bytesRef out)");
+ BOOST_CHECK_MESSAGE(out.toBytes() == originalSequence, "Error when h256::ref().copyTo(dev::bytesRef out)");
+}
+
+BOOST_AUTO_TEST_SUITE_END()