diff options
author | Nico Kruber <[email protected]> | 2013-01-25 16:12:41 +0100 |
---|---|---|
committer | Fredrik Gustafsson <[email protected]> | 2013-02-04 09:52:34 +0100 |
commit | 9239bca48cad7653b43f89f71c49b3d0be682c51 (patch) | |
tree | 6ae33e05457f01ffce635b548b100c1aeeb278f6 /lib/jinterface/test/nc_SUITE.erl | |
parent | 8e5e2a11f069935644ff5404ffd8758773834f29 (diff) | |
download | otp-9239bca48cad7653b43f89f71c49b3d0be682c51.tar.gz otp-9239bca48cad7653b43f89f71c49b3d0be682c51.tar.bz2 otp-9239bca48cad7653b43f89f71c49b3d0be682c51.zip |
jinterface: don't return compressed external term if bigger than uncompressed
Now, OtpOutputStream#write_compressed() uses the same mechanism as erts_term_to_binary() in external.c: it tries to compress the given term into a buffer of the size of the uncompressed term and if this is not possible, i.e. the compression plus headers is bigger, it uses the uncompressed external term format instead.
Diffstat (limited to 'lib/jinterface/test/nc_SUITE.erl')
-rw-r--r-- | lib/jinterface/test/nc_SUITE.erl | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/jinterface/test/nc_SUITE.erl b/lib/jinterface/test/nc_SUITE.erl index 9c88400c2a..ba96ecf8a6 100644 --- a/lib/jinterface/test/nc_SUITE.erl +++ b/lib/jinterface/test/nc_SUITE.erl @@ -188,7 +188,10 @@ decompress_roundtrip(doc) -> []; decompress_roundtrip(suite) -> []; decompress_roundtrip(Config) when is_list(Config) -> Terms = - [0.0, + [{}, + {a,b,c}, + [], + 0.0, math:sqrt(2), <<1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,31:5>>, make_ref()], @@ -206,7 +209,10 @@ compress_roundtrip(doc) -> []; compress_roundtrip(suite) -> []; compress_roundtrip(Config) when is_list(Config) -> Terms = - [0.0, + [{}, + {a,b,c}, + [], + 0.0, math:sqrt(2), <<1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,31:5>>, make_ref()], |