11cb0ef41Sopenharmony_ci'use strict'; 21cb0ef41Sopenharmony_ciconst common = require('../../common'); 31cb0ef41Sopenharmony_ciconst assert = require('assert'); 41cb0ef41Sopenharmony_ci 51cb0ef41Sopenharmony_ci// Test passing NULL to object-related N-APIs. 61cb0ef41Sopenharmony_ciconst { testNull } = require(`./build/${common.buildType}/test_string`); 71cb0ef41Sopenharmony_ci 81cb0ef41Sopenharmony_ciconst expectedResult = { 91cb0ef41Sopenharmony_ci envIsNull: 'Invalid argument', 101cb0ef41Sopenharmony_ci stringIsNullNonZeroLength: 'Invalid argument', 111cb0ef41Sopenharmony_ci stringIsNullZeroLength: 'napi_ok', 121cb0ef41Sopenharmony_ci resultIsNull: 'Invalid argument', 131cb0ef41Sopenharmony_ci}; 141cb0ef41Sopenharmony_ci 151cb0ef41Sopenharmony_ciassert.deepStrictEqual(expectedResult, testNull.test_create_latin1()); 161cb0ef41Sopenharmony_ciassert.deepStrictEqual(expectedResult, testNull.test_create_utf8()); 171cb0ef41Sopenharmony_ciassert.deepStrictEqual(expectedResult, testNull.test_create_utf16()); 18