[zlib] Re-land import canonical zlib inflate cover tests

There is a test suite in Canonical zlib that ensures correctness and
coverage of inflate/deflate: the inflate cover (infcover.c) suite.

This patch imports the inflate cover suite with the necessary changes
to make it build and run under Chromes's C++11 GTEST test system.

There are minimal changes (i.e. undefined 'local', miscellaneous C
casts to use C++ casts, etc) so we can build it as C++ code and hook
into GTEST e.g. use EXPECT_TRUE instead of C assert from <assert.h>.

Adds a patch file for these changes, that can be applied on Canonical
infcover should we need to sync with a new Canonical zlib release.

TODO: there's one test accessing a symbol that causes link errors so
comment that code out for now.

Bug: 1032721
Change-Id: I004a1357d46d909ad3a5a5bacc5f9ab9bfcb7809
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2168792
Reviewed-by: Adenilson Cavalcanti <cavalcantii@chromium.org>
Reviewed-by: Noel Gordon <noel@chromium.org>
Commit-Queue: Adenilson Cavalcanti <cavalcantii@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#763696}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 26b3182d7a40f33da10a95bc69199af925dedbcc
5 files changed