diff options
author | orangefour <thirdorange@gmx.com> | 2018-11-01 11:49:04 +0100 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2018-11-01 06:49:04 -0400 |
commit | 20f82c067e587a7cd74d0a4dbc9faa8ee1502aff (patch) | |
tree | f97696b6729fa334077f10cb465953c6384f0997 /validat0.cpp | |
parent | 7c5da3e1ca1235022f6b04e1f1a1609813827b88 (diff) | |
download | cryptopp-git-20f82c067e587a7cd74d0a4dbc9faa8ee1502aff.tar.gz |
Add VectorSource (GH #730)
Diffstat (limited to 'validat0.cpp')
-rw-r--r-- | validat0.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/validat0.cpp b/validat0.cpp index d9c445f1..1e2fc9b5 100644 --- a/validat0.cpp +++ b/validat0.cpp @@ -1513,7 +1513,13 @@ bool TestStringSink() std::vector<byte> vec;
StringSource s2(in, true, new VectorSink(vec));
- return str.size() == vec.size() && std::equal(str.begin(), str.end(), vec.begin());
+ std::vector<byte> vec2;
+ VectorSource s3(vec, true, new VectorSink(vec2));
+
+ return str.size() == vec.size() &&
+ std::equal(str.begin(), str.end(), vec.begin()) &&
+ vec.size() == vec2.size() &&
+ std::equal(vec.begin(), vec.end(), vec2.begin());
}
catch(const std::exception&)
{
|