11cb0ef41Sopenharmony_ci/* eslint-disable strict */ 21cb0ef41Sopenharmony_cirequire('../common'); 31cb0ef41Sopenharmony_ciconst assert = require('assert'); 41cb0ef41Sopenharmony_ci 51cb0ef41Sopenharmony_ciconst zlib = require('zlib'); 61cb0ef41Sopenharmony_ci 71cb0ef41Sopenharmony_ciassert.strictEqual(zlib.constants.Z_OK, 0, 81cb0ef41Sopenharmony_ci [ 91cb0ef41Sopenharmony_ci 'Expected Z_OK to be 0;', 101cb0ef41Sopenharmony_ci `got ${zlib.constants.Z_OK}`, 111cb0ef41Sopenharmony_ci ].join(' ')); 121cb0ef41Sopenharmony_cizlib.constants.Z_OK = 1; 131cb0ef41Sopenharmony_ciassert.strictEqual(zlib.constants.Z_OK, 0, 141cb0ef41Sopenharmony_ci [ 151cb0ef41Sopenharmony_ci 'Z_OK should be immutable.', 161cb0ef41Sopenharmony_ci `Expected to get 0, got ${zlib.constants.Z_OK}`, 171cb0ef41Sopenharmony_ci ].join(' ')); 181cb0ef41Sopenharmony_ci 191cb0ef41Sopenharmony_ciassert.strictEqual(zlib.codes.Z_OK, 0, 201cb0ef41Sopenharmony_ci `Expected Z_OK to be 0; got ${zlib.codes.Z_OK}`); 211cb0ef41Sopenharmony_cizlib.codes.Z_OK = 1; 221cb0ef41Sopenharmony_ciassert.strictEqual(zlib.codes.Z_OK, 0, 231cb0ef41Sopenharmony_ci [ 241cb0ef41Sopenharmony_ci 'Z_OK should be immutable.', 251cb0ef41Sopenharmony_ci `Expected to get 0, got ${zlib.codes.Z_OK}`, 261cb0ef41Sopenharmony_ci ].join(' ')); 271cb0ef41Sopenharmony_cizlib.codes = { Z_OK: 1 }; 281cb0ef41Sopenharmony_ciassert.strictEqual(zlib.codes.Z_OK, 0, 291cb0ef41Sopenharmony_ci [ 301cb0ef41Sopenharmony_ci 'Z_OK should be immutable.', 311cb0ef41Sopenharmony_ci `Expected to get 0, got ${zlib.codes.Z_OK}`, 321cb0ef41Sopenharmony_ci ].join(' ')); 331cb0ef41Sopenharmony_ci 341cb0ef41Sopenharmony_ciassert.ok(Object.isFrozen(zlib.codes), 351cb0ef41Sopenharmony_ci [ 361cb0ef41Sopenharmony_ci 'Expected zlib.codes to be frozen, but Object.isFrozen', 371cb0ef41Sopenharmony_ci `returned ${Object.isFrozen(zlib.codes)}`, 381cb0ef41Sopenharmony_ci ].join(' ')); 39