Commit Graph

5 Commits

Author SHA1 Message Date
David Reiss
f2abcf9a56 THRIFT-929. cpp: Use boost::lognormal_distribution in ZlibTest
This way we no longer have to have a huge hard-coded list of numbers in
the source code.  The distribution is randomly generated for each run.
(Although the --seed argument can be used for repeatablity.)

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1005150 13f79535-47bb-0310-9956-ffa450edef68
2010-10-06 17:10:24 +00:00
David Reiss
9a961e7750 THRIFT-929. cpp: Convert ZlibTest to use the boost unit test framework
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1005149 13f79535-47bb-0310-9956-ffa450edef68
2010-10-06 17:10:23 +00:00
David Reiss
3cc9dab229 THRIFT-929. cpp: Remove TZlibTest dependency on filesystem data
Previously, ZlibTest read a file from disk to get data to test with.
It would fail unless gen-cpp/DebugProtoTest_types.tcc was present in the
current directory and was at least 32kB long.

Now ZlibTest simply generates 3 separate buffers to test with.  The
first buffer is just all "a"s, the second is some random sequential
runs, and the third is completely random.  They usually seem to have
compression ratios of around 315:1, 4:1, and 1:1, respectively.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1005148 13f79535-47bb-0310-9956-ffa450edef68
2010-10-06 17:10:21 +00:00
David Reiss
56cb796bce THRIFT-929. cpp: Fix a couple minor issues in ZlibTest
- Add a necessary cast.
- Check buffer sizes more carefully to allow for different read/write
  size distributions.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1005147 13f79535-47bb-0310-9956-ffa450edef68
2010-10-06 17:10:20 +00:00
David Reiss
351e22b52a THRIFT-503. cpp: Move the tests built by "make check" under lib/cpp
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@991246 13f79535-47bb-0310-9956-ffa450edef68
2010-08-31 16:51:19 +00:00