mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-19 16:47:28 +01:00
Delegate etc__status__string to used packages
This commit is contained in:
1 parent
fecd7b631c
commit
7e47f4cc7a
3 files changed
+44
-12
No files matched your search
@@ -67,6 +67,21 @@ golden_test zlib_pi_gt = {
|
||||
.src_filename = "../../testdata/pi.txt.zlib", //
|
||||
};
|
||||
|
||||
// ---------------- Basic Tests
|
||||
|
||||
void test_basic_status_used_package() {
|
||||
CHECK_FOCUS(__func__);
|
||||
// The function call here is from "std/zlib" but the argument is from
|
||||
// "std/deflate". The former package depends on the latter.
|
||||
const char* s0 =
|
||||
wuffs_zlib__status__string(WUFFS_DEFLATE__ERROR_BAD_DISTANCE);
|
||||
const char* t0 = "deflate: bad distance";
|
||||
if (strcmp(s0, t0)) {
|
||||
FAIL("got \"%s\", want \"%s\"", s0, t0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------- Adler32 Tests
|
||||
|
||||
void test_wuffs_adler32() {
|
||||
@@ -300,6 +315,11 @@ void bench_mimic_zlib_decode_100k() {
|
||||
// The empty comments forces clang-format to place one element per line.
|
||||
proc tests[] = {
|
||||
|
||||
// These basic tests are really testing the Wuffs compiler. They aren't
|
||||
// specific to the std/zlib code, but putting them here is as good as any
|
||||
// other place.
|
||||
test_basic_status_used_package, //
|
||||
|
||||
test_wuffs_adler32, //
|
||||
|
||||
test_wuffs_zlib_checksum_mismatch, //
|
||||
|
||||
Reference in new issue
Block a user