13af6ab5fSopenharmony_ci/*
23af6ab5fSopenharmony_ci * Copyright (c) 2024 Huawei Device Co., Ltd.
33af6ab5fSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
43af6ab5fSopenharmony_ci * you may not use this file except in compliance with the License.
53af6ab5fSopenharmony_ci * You may obtain a copy of the License at
63af6ab5fSopenharmony_ci *
73af6ab5fSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
83af6ab5fSopenharmony_ci *
93af6ab5fSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
103af6ab5fSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
113af6ab5fSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
123af6ab5fSopenharmony_ci * See the License for the specific language governing permissions and
133af6ab5fSopenharmony_ci * limitations under the License.
143af6ab5fSopenharmony_ci */
153af6ab5fSopenharmony_ci
163af6ab5fSopenharmony_ciimport { ApiExtractor } from '../../../src/common/ApiExtractor';
173af6ab5fSopenharmony_ciimport {assert} from 'chai';
183af6ab5fSopenharmony_ciimport { readProjectPropertiesByCollectedPaths } from '../../../src/common/ApiReader';
193af6ab5fSopenharmony_ciimport { NameGeneratorType } from '../../../src/generator/NameFactory';
203af6ab5fSopenharmony_ci
213af6ab5fSopenharmony_cifunction collectApi(apiPath: string): void {
223af6ab5fSopenharmony_ci  clearAll();
233af6ab5fSopenharmony_ci  ApiExtractor.traverseApiFiles(apiPath, ApiExtractor.ApiType.API);
243af6ab5fSopenharmony_ci}
253af6ab5fSopenharmony_ci
263af6ab5fSopenharmony_cifunction clearAll(): void {
273af6ab5fSopenharmony_ci  ApiExtractor.mPropertySet.clear();
283af6ab5fSopenharmony_ci  ApiExtractor.mSystemExportSet.clear();
293af6ab5fSopenharmony_ci}
303af6ab5fSopenharmony_ci
313af6ab5fSopenharmony_cidescribe('test for ApiExtractor', function () {
323af6ab5fSopenharmony_ci  describe('test for visitExport', function () {
333af6ab5fSopenharmony_ci    it('export {ExportDeclarationClass1, ExportDeclarationClass2}', function () {
343af6ab5fSopenharmony_ci      let exportDeclarationAst: string = 'test/ut/utils/apiTest_visitExport/exportDeclarationAst.d.ts';
353af6ab5fSopenharmony_ci      collectApi(exportDeclarationAst);
363af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mSystemExportSet.has('ExportDeclarationClass1'), true);
373af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mSystemExportSet.has('ExportDeclarationClass2'), true);
383af6ab5fSopenharmony_ci      clearAll();
393af6ab5fSopenharmony_ci    });
403af6ab5fSopenharmony_ci
413af6ab5fSopenharmony_ci    it('export {ExportDeclarationClass1 as class1, ExportDeclarationClass2} from `./exportDeclarationFrom`',
423af6ab5fSopenharmony_ci     function () {
433af6ab5fSopenharmony_ci      let exportDeclarationFromAst: string = 'test/ut/utils/apiTest_visitExport/exportDeclarationFrom.d.ts';
443af6ab5fSopenharmony_ci      collectApi(exportDeclarationFromAst);
453af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mSystemExportSet.has('ExportDeclarationClass1'), false);
463af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mSystemExportSet.has('class1'), true);
473af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mSystemExportSet.has('ExportDeclarationClass2'), true);
483af6ab5fSopenharmony_ci      clearAll();
493af6ab5fSopenharmony_ci    });
503af6ab5fSopenharmony_ci
513af6ab5fSopenharmony_ci    it('export {default as name1, ExportDeclarationClass2, exportName} from `./exportDefaultDeclarationAst`',
523af6ab5fSopenharmony_ci     function () {
533af6ab5fSopenharmony_ci      let exportDeclarationDefault: string = 'test/ut/utils/apiTest_visitExport/exportDeclarationDefault.d.ts';
543af6ab5fSopenharmony_ci      collectApi(exportDeclarationDefault);
553af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mSystemExportSet.has('default'), false);
563af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mSystemExportSet.has('name1'), true);
573af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mSystemExportSet.has('ExportDeclarationClass2'), true);
583af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mSystemExportSet.has('exportName'), true);
593af6ab5fSopenharmony_ci      clearAll();
603af6ab5fSopenharmony_ci    });
613af6ab5fSopenharmony_ci
623af6ab5fSopenharmony_ci    it('export {ExportDeclarationClass1 as exportName, ExportDeclarationClass2, ExportDeclarationClass3 as default}',
633af6ab5fSopenharmony_ci     function () {
643af6ab5fSopenharmony_ci      let exportDefaultDeclarationAst: string = 'test/ut/utils/apiTest_visitExport/exportDefaultDeclarationAst.d.ts';
653af6ab5fSopenharmony_ci      collectApi(exportDefaultDeclarationAst);
663af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mSystemExportSet.has('ExportDeclarationClass1'), false);
673af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mSystemExportSet.has('exportName'), true);
683af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mSystemExportSet.has('ExportDeclarationClass2'), true);
693af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mSystemExportSet.has('ExportDeclarationClass3'), false);
703af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mSystemExportSet.has('default'), true);
713af6ab5fSopenharmony_ci      clearAll();
723af6ab5fSopenharmony_ci    });
733af6ab5fSopenharmony_ci
743af6ab5fSopenharmony_ci    it('export * as name1', function () {
753af6ab5fSopenharmony_ci      let exportAllAst: string = 'test/ut/utils/apiTest_visitExport/exportAll.d.ts';
763af6ab5fSopenharmony_ci      collectApi(exportAllAst);
773af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mSystemExportSet.has('name1'), true);
783af6ab5fSopenharmony_ci      clearAll();
793af6ab5fSopenharmony_ci    });
803af6ab5fSopenharmony_ci
813af6ab5fSopenharmony_ci    it('export * from `export*.ts`', function () {
823af6ab5fSopenharmony_ci      let exportFile: string = 'test/ut/utils/apiTest_visitExport/export.d.ts';
833af6ab5fSopenharmony_ci      collectApi(exportFile);
843af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mSystemExportSet.size === 0, true);
853af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.size === 0, true);
863af6ab5fSopenharmony_ci      clearAll();
873af6ab5fSopenharmony_ci    });
883af6ab5fSopenharmony_ci
893af6ab5fSopenharmony_ci    it('doubleUnderscoreTest', function () {
903af6ab5fSopenharmony_ci      let doubleUnderscoreTestAst: string = 'test/ut/utils/apiTest_visitExport/doubleUnderscoreTest.d.ts';
913af6ab5fSopenharmony_ci      collectApi(doubleUnderscoreTestAst);
923af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('__Admin'), true);
933af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('___Admin'), false);
943af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('__Moderator'), true);
953af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('___Moderator'), false);
963af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('__User'), true);
973af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('___User'), false);
983af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('__name'), true);
993af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('___name'), false);
1003af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('__Admin'), true);
1013af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('___Admin'), false);
1023af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('__age'), true);
1033af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('___age'), false);
1043af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('__greet'), true);
1053af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('___greet'), false);
1063af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('__typeProp1'), true);
1073af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('___typeProp1'), false);
1083af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('__typeProp2'), true);
1093af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('___typeProp2'), false);
1103af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('__speak'), true);
1113af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('___speak'), false);
1123af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('__appName'), true);
1133af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('___appName'), false);
1143af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('__version'), true);
1153af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('___version'), false);
1163af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('__logDetails'), true);
1173af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('___logDetails'), false);
1183af6ab5fSopenharmony_ci      clearAll();
1193af6ab5fSopenharmony_ci    });
1203af6ab5fSopenharmony_ci  });
1213af6ab5fSopenharmony_ci
1223af6ab5fSopenharmony_ci  describe('test for visitPropertyAndName', function () {
1233af6ab5fSopenharmony_ci    it('Class Test', function () {
1243af6ab5fSopenharmony_ci      let filePath: string = 'test/ut/utils/apiTest_visitPropertyAndName/classTest.d.ts';
1253af6ab5fSopenharmony_ci      collectApi(filePath);
1263af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mSystemExportSet.has('TestClass1'), true);
1273af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mSystemExportSet.has('TestClass2'), false);
1283af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mSystemExportSet.has('AbstractClass'), false);
1293af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('prop1'), true);
1303af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('prop2'), true);
1313af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('abstractProp'), true);
1323af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('foo1'), true);
1333af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('foo2'), true);
1343af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('param1'), true);
1353af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('param2'), false);
1363af6ab5fSopenharmony_ci      clearAll();
1373af6ab5fSopenharmony_ci    });
1383af6ab5fSopenharmony_ci
1393af6ab5fSopenharmony_ci    it('Interface Test', function () {
1403af6ab5fSopenharmony_ci      let filePath: string = 'test/ut/utils/apiTest_visitPropertyAndName/interfaceTest.d.ts';
1413af6ab5fSopenharmony_ci      collectApi(filePath);
1423af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mSystemExportSet.has('TestInterface1'), true);
1433af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mSystemExportSet.has('TestInterface2'), false);
1443af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('prop1'), true);
1453af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('prop2'), true);
1463af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('foo1'), true);
1473af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('foo2'), true);
1483af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('param1'), true);
1493af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('param2'), false);
1503af6ab5fSopenharmony_ci      clearAll();
1513af6ab5fSopenharmony_ci    });
1523af6ab5fSopenharmony_ci
1533af6ab5fSopenharmony_ci    it('TypeLiteral Test', function () {
1543af6ab5fSopenharmony_ci      let filePath: string = 'test/ut/utils/apiTest_visitPropertyAndName/typeLiteralTest.d.ts';
1553af6ab5fSopenharmony_ci      collectApi(filePath);
1563af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mSystemExportSet.has('TestType1'), true);
1573af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mSystemExportSet.has('TestType2'), false);
1583af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('collectProp1'), true);
1593af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('collectProp2'), true);
1603af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('testFunc1'), true);
1613af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('testFunc2'), true);
1623af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('message1'), true);
1633af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('message2'), false);
1643af6ab5fSopenharmony_ci      clearAll();
1653af6ab5fSopenharmony_ci    });
1663af6ab5fSopenharmony_ci
1673af6ab5fSopenharmony_ci    it('Enum Test', function () {
1683af6ab5fSopenharmony_ci      let filePath: string = 'test/ut/utils/apiTest_visitPropertyAndName/enumTest.d.ts';
1693af6ab5fSopenharmony_ci      collectApi(filePath);
1703af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mSystemExportSet.has('TestEnum1'), true);
1713af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mSystemExportSet.has('TestEnum2'), false);
1723af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('PARAM1'), true);
1733af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('PARAM2'), true);
1743af6ab5fSopenharmony_ci      clearAll();
1753af6ab5fSopenharmony_ci    });
1763af6ab5fSopenharmony_ci
1773af6ab5fSopenharmony_ci    it('ObjectLiteral Test', function () {
1783af6ab5fSopenharmony_ci      let filePath: string = 'test/ut/utils/apiTest_visitPropertyAndName/objectLiteral.d.ts';
1793af6ab5fSopenharmony_ci      collectApi(filePath);
1803af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mSystemExportSet.has('obj1'), true);
1813af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mSystemExportSet.has('obj2'), false);
1823af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('prop1'), true);
1833af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('prop2'), true);
1843af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('prop3'), true);
1853af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('prop4'), true);
1863af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('innerProp1'), true);
1873af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('innerProp2'), true);
1883af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('innerProp3'), true);
1893af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('innerProp4'), true);
1903af6ab5fSopenharmony_ci      clearAll();
1913af6ab5fSopenharmony_ci    });
1923af6ab5fSopenharmony_ci
1933af6ab5fSopenharmony_ci    it('Module Test', function () {
1943af6ab5fSopenharmony_ci      let filePath: string = 'test/ut/utils/apiTest_visitPropertyAndName/moduleTest.d.ts';
1953af6ab5fSopenharmony_ci      collectApi(filePath);
1963af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mSystemExportSet.has('ns1'), true);
1973af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mSystemExportSet.has('ns2'), false);
1983af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('TestClass1'), true);
1993af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('TestInterface1'), true);
2003af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('prop1'), true);
2013af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('prop2'), true);
2023af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('prop3'), true);
2033af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('TestClass2'), false);
2043af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('TestInterface2'), false);
2053af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('prop4'), true);
2063af6ab5fSopenharmony_ci      assert.strictEqual(ApiExtractor.mPropertySet.has('prop5'), true);
2073af6ab5fSopenharmony_ci      clearAll();
2083af6ab5fSopenharmony_ci    });
2093af6ab5fSopenharmony_ci  });
2103af6ab5fSopenharmony_ci
2113af6ab5fSopenharmony_ci  describe('test for visitProjectExport', function () {
2123af6ab5fSopenharmony_ci    const fileList: Set<string> = new Set([
2133af6ab5fSopenharmony_ci      "test/ut/utils/module_exports_test/exportFile1.js",
2143af6ab5fSopenharmony_ci      "test/ut/utils/oh_modules/exportFile.js"
2153af6ab5fSopenharmony_ci    ]);
2163af6ab5fSopenharmony_ci    it('test for module.exports(property)', function () {
2173af6ab5fSopenharmony_ci      let projectAndLibs = readProjectPropertiesByCollectedPaths(fileList,
2183af6ab5fSopenharmony_ci        {
2193af6ab5fSopenharmony_ci          mNameObfuscation: {
2203af6ab5fSopenharmony_ci            mEnable: true,
2213af6ab5fSopenharmony_ci            mReservedProperties: [],
2223af6ab5fSopenharmony_ci            mRenameProperties: true,
2233af6ab5fSopenharmony_ci            mKeepStringProperty: false,
2243af6ab5fSopenharmony_ci            mNameGeneratorType: NameGeneratorType.ORDERED,
2253af6ab5fSopenharmony_ci            mReservedNames: [], 
2263af6ab5fSopenharmony_ci            mReservedToplevelNames: []
2273af6ab5fSopenharmony_ci          },
2283af6ab5fSopenharmony_ci          mExportObfuscation: false,
2293af6ab5fSopenharmony_ci          mKeepFileSourceCode: {
2303af6ab5fSopenharmony_ci            mKeepSourceOfPaths: new Set(),
2313af6ab5fSopenharmony_ci            mkeepFilesAndDependencies: new Set(),
2323af6ab5fSopenharmony_ci          }
2333af6ab5fSopenharmony_ci        }, true);
2343af6ab5fSopenharmony_ci      let reservedProperties = projectAndLibs.exportNameAndPropSet == undefined? new Set<string> : projectAndLibs.exportNameAndPropSet;
2353af6ab5fSopenharmony_ci      let reservedExportNames = projectAndLibs.exportNameSet == undefined? new Set<string> : projectAndLibs.exportNameSet;
2363af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectPropertyAssignment1'), true);
2373af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectPropertyAssignment2'), true);
2383af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectPropertyAssignment3'), true);
2393af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectPropertyAssignment4'), true);
2403af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectIndirectObj'), false);
2413af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('indirectProp1'), true);
2423af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectShorthand'), true);
2433af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectShorthandProp'), true);
2443af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectMethod1'), true);
2453af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectMethod2'), true);
2463af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectMethod3'), true);
2473af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectGetProp1'), true);
2483af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectGetProp2'), true);
2493af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectGetProp3'), true);
2503af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectSetProp1'), true);
2513af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectSetProp2'), true);
2523af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectSetProp3'), true);
2533af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectExportElement1'), true);
2543af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectExportElement2'), true);
2553af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('indirectClass1'), false);
2563af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('indirectProp2'), true);
2573af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectExportElement3'), true);
2583af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('indirectClass2'), false);
2593af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('indirectProp3'), true);
2603af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectExportElement4'), true);
2613af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('indirectProp4'), true);
2623af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectExportElement5'), true);
2633af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectExportElement6'), true);
2643af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectExportElement7'), true);
2653af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('indirectClass3'), false);
2663af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('indirectProp5'), true);
2673af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectExportElement8'), true);
2683af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('indirectClass4'), false);
2693af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('indirectProp6'), true);
2703af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectExportElement9'), true);
2713af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('indirectProp7'), true);
2723af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohPropertyAssignment1'), true);
2733af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohPropertyAssignment2'), true);
2743af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohPropertyAssignment3'), true);
2753af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohPropertyAssignment4'), true);
2763af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohIndirectObj'), false);
2773af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohIndirectProp1'), true);
2783af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohShorthand'), true);
2793af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohShorthandProp'), true);
2803af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohMethod1'), true);
2813af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohMethod2'), true);
2823af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohMethod3'), true);
2833af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohGetProp1'), true);
2843af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohGetProp2'), true);
2853af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohGetProp3'), true);
2863af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohSetProp1'), true);
2873af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohSetProp2'), true);
2883af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohSetProp3'), true);
2893af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohExportElement1'), true);
2903af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohExportElement2'), true);
2913af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohIndirectClass1'), false);
2923af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohIndirectProp2'), true);
2933af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohExportElement3'), true);
2943af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohIndirectClass2'), false);
2953af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohIndirectProp3'), true);
2963af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohExportElement4'), true);
2973af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohIndirectProp4'), true);
2983af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohExportElement5'), true);
2993af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohExportElement6'), true);
3003af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohExportElement7'), true);
3013af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohIndirectClass3'), false);
3023af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohIndirectProp5'), true);
3033af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohExportElement8'), true);
3043af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohIndirectClass4'), false);
3053af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohIndirectProp6'), true);
3063af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.size === 0, true);
3073af6ab5fSopenharmony_ci    });
3083af6ab5fSopenharmony_ci
3093af6ab5fSopenharmony_ci    it('test for module.exports(export)', function () {
3103af6ab5fSopenharmony_ci      let projectAndLibs = readProjectPropertiesByCollectedPaths(fileList,
3113af6ab5fSopenharmony_ci        {
3123af6ab5fSopenharmony_ci          mNameObfuscation: {
3133af6ab5fSopenharmony_ci            mEnable: true,
3143af6ab5fSopenharmony_ci            mReservedProperties: [],
3153af6ab5fSopenharmony_ci            mRenameProperties: false,
3163af6ab5fSopenharmony_ci            mKeepStringProperty: false,
3173af6ab5fSopenharmony_ci            mNameGeneratorType: NameGeneratorType.ORDERED,
3183af6ab5fSopenharmony_ci            mReservedNames: [], 
3193af6ab5fSopenharmony_ci            mReservedToplevelNames: []
3203af6ab5fSopenharmony_ci          },
3213af6ab5fSopenharmony_ci          mExportObfuscation: true,
3223af6ab5fSopenharmony_ci          mKeepFileSourceCode: {
3233af6ab5fSopenharmony_ci            mKeepSourceOfPaths: new Set(),
3243af6ab5fSopenharmony_ci            mkeepFilesAndDependencies: new Set(["test/ut/utils/module_exports_test/exportFile3.js"]),
3253af6ab5fSopenharmony_ci          }
3263af6ab5fSopenharmony_ci        }, true);
3273af6ab5fSopenharmony_ci      let reservedProperties = projectAndLibs.exportNameAndPropSet == undefined? new Set<string> : projectAndLibs.exportNameAndPropSet;
3283af6ab5fSopenharmony_ci      let reservedExportNames = projectAndLibs.exportNameSet == undefined? new Set<string> : projectAndLibs.exportNameSet;
3293af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectPropertyAssignment1'), false);
3303af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectPropertyAssignment2'), false);
3313af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectPropertyAssignment3'), false);
3323af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectPropertyAssignment4'), false);
3333af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectIndirectObj'), false);
3343af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('indirectProp1'), false);
3353af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectShorthand'), false);
3363af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectShorthandProp'), false);
3373af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectMethod1'), false);
3383af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectMethod2'), false);
3393af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectMethod3'), false);
3403af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectGetProp1'), false);
3413af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectGetProp2'), false);
3423af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectGetProp3'), false);
3433af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectSetProp1'), false);
3443af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectSetProp2'), false);
3453af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectSetProp3'), false);
3463af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectExportElement1'), false);
3473af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectExportElement2'), false);
3483af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('indirectClass1'), false);
3493af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('indirectProp2'), false);
3503af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectExportElement3'), false);
3513af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('indirectClass2'), false);
3523af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('indirectProp3'), false);
3533af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectExportElement4'), false);
3543af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('indirectProp4'), false);
3553af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectExportElement5'), false);
3563af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectExportElement6'), false);
3573af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectExportElement7'), false);
3583af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('indirectClass3'), false);
3593af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('indirectProp5'), false);
3603af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectExportElement8'), false);
3613af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('indirectClass4'), false);
3623af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('indirectProp6'), false);
3633af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectExportElement9'), false);
3643af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('indirectProp7'), false);
3653af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohPropertyAssignment1'), true);
3663af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohPropertyAssignment2'), true);
3673af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohPropertyAssignment3'), true);
3683af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohPropertyAssignment4'), true);
3693af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohIndirectObj'), false);
3703af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohIndirectProp1'), false);
3713af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohShorthand'), true);
3723af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohShorthandProp'), false);
3733af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohMethod1'), true);
3743af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohMethod2'), true);
3753af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohMethod3'), true);
3763af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohGetProp1'), true);
3773af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohGetProp2'), true);
3783af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohGetProp3'), true);
3793af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohSetProp1'), true);
3803af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohSetProp2'), true);
3813af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohSetProp3'), true);
3823af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohExportElement1'), true);
3833af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohExportElement2'), true);
3843af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohIndirectClass1'), true);
3853af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohIndirectProp2'), false);
3863af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohExportElement3'), true);
3873af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohIndirectClass2'), false);
3883af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohIndirectProp3'), false);
3893af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohExportElement4'), true);
3903af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohIndirectProp4'), false);
3913af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohExportElement5'), true);
3923af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohExportElement6'), true);
3933af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohExportElement7'), true);
3943af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohIndirectClass3'), true);
3953af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohIndirectProp5'), false);
3963af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohExportElement8'), true);
3973af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohIndirectClass4'), false);
3983af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohIndirectProp6'), false);
3993af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohExportElement9'), true);
4003af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohIndirectProp7'), false);
4013af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.size === 0, true);
4023af6ab5fSopenharmony_ci    });
4033af6ab5fSopenharmony_ci
4043af6ab5fSopenharmony_ci    it('test for module.exports(property + export)', function () {
4053af6ab5fSopenharmony_ci      let projectAndLibs = readProjectPropertiesByCollectedPaths(fileList,
4063af6ab5fSopenharmony_ci        {
4073af6ab5fSopenharmony_ci          mNameObfuscation: {
4083af6ab5fSopenharmony_ci            mEnable: true,
4093af6ab5fSopenharmony_ci            mReservedProperties: [],
4103af6ab5fSopenharmony_ci            mRenameProperties: true,
4113af6ab5fSopenharmony_ci            mKeepStringProperty: false,
4123af6ab5fSopenharmony_ci            mNameGeneratorType: NameGeneratorType.ORDERED,
4133af6ab5fSopenharmony_ci            mReservedNames: [], 
4143af6ab5fSopenharmony_ci            mReservedToplevelNames: []
4153af6ab5fSopenharmony_ci          },
4163af6ab5fSopenharmony_ci          mExportObfuscation: true,
4173af6ab5fSopenharmony_ci          mKeepFileSourceCode: {
4183af6ab5fSopenharmony_ci            mKeepSourceOfPaths: new Set(),
4193af6ab5fSopenharmony_ci            mkeepFilesAndDependencies: new Set(["test/ut/utils/module_exports_test/exportFile3.js"]),
4203af6ab5fSopenharmony_ci          }
4213af6ab5fSopenharmony_ci        }, true);
4223af6ab5fSopenharmony_ci      let reservedProperties = projectAndLibs.exportNameAndPropSet == undefined? new Set<string> : projectAndLibs.exportNameAndPropSet;
4233af6ab5fSopenharmony_ci      let reservedExportNames = projectAndLibs.exportNameSet == undefined? new Set<string> : projectAndLibs.exportNameSet;
4243af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectPropertyAssignment1'), false);
4253af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectPropertyAssignment2'), false);
4263af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectPropertyAssignment3'), false);
4273af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectPropertyAssignment4'), false);
4283af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectIndirectObj'), false);
4293af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('indirectProp1'), false);
4303af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectShorthand'), false);
4313af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectShorthandProp'), false);
4323af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectMethod1'), false);
4333af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectMethod2'), false);
4343af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectMethod3'), false);
4353af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectGetProp1'), false);
4363af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectGetProp2'), false);
4373af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectGetProp3'), false);
4383af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectSetProp1'), false);
4393af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectSetProp2'), false);
4403af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectSetProp3'), false);
4413af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectExportElement1'), false);
4423af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectExportElement2'), false);
4433af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('indirectClass1'), false);
4443af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('indirectProp2'), false);
4453af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectExportElement3'), false);
4463af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('indirectClass2'), false);
4473af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('indirectProp3'), false);
4483af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectExportElement4'), false);
4493af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('indirectProp4'), false);
4503af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectExportElement5'), false);
4513af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectExportElement6'), false);
4523af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectExportElement7'), false);
4533af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('indirectClass3'), false);
4543af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('indirectProp5'), false);
4553af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectExportElement8'), false);
4563af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('indirectClass4'), false);
4573af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('indirectProp6'), false);
4583af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('projectExportElement9'), false);
4593af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('indirectProp7'), false);
4603af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohPropertyAssignment1'), true);
4613af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohPropertyAssignment2'), true);
4623af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohPropertyAssignment3'), true);
4633af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohPropertyAssignment4'), true);
4643af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohIndirectObj'), false);
4653af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohIndirectProp1'), true);
4663af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohShorthand'), true);
4673af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohShorthandProp'), true);
4683af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohMethod1'), true);
4693af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohMethod2'), true);
4703af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohMethod3'), true);
4713af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohGetProp1'), true);
4723af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohGetProp2'), true);
4733af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohGetProp3'), true);
4743af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohSetProp1'), true);
4753af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohSetProp2'), true);
4763af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohSetProp3'), true);
4773af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohExportElement1'), true);
4783af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohExportElement2'), true);
4793af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohIndirectClass1'), false);
4803af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohIndirectProp2'), true);
4813af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohExportElement3'), true);
4823af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohIndirectClass2'), false);
4833af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohIndirectProp3'), true);
4843af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohExportElement4'), true);
4853af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohIndirectProp4'), true);
4863af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohExportElement5'), true);
4873af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohExportElement6'), true);
4883af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohExportElement7'), true);
4893af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohIndirectClass3'), false);
4903af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohIndirectProp5'), true);
4913af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohExportElement8'), true);
4923af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohIndirectClass4'), false);
4933af6ab5fSopenharmony_ci      assert.strictEqual(reservedProperties.has('ohIndirectProp6'), true);
4943af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectPropertyAssignment1'), false);
4953af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectPropertyAssignment2'), false);
4963af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectPropertyAssignment3'), false);
4973af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectPropertyAssignment4'), false);
4983af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectIndirectObj'), false);
4993af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('indirectProp1'), false);
5003af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectShorthand'), false);
5013af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectShorthandProp'), false);
5023af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectMethod1'), false);
5033af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectMethod2'), false);
5043af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectMethod3'), false);
5053af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectGetProp1'), false);
5063af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectGetProp2'), false);
5073af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectGetProp3'), false);
5083af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectSetProp1'), false);
5093af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectSetProp2'), false);
5103af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectSetProp3'), false);
5113af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectExportElement1'), false);
5123af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectExportElement2'), false);
5133af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('indirectClass1'), false);
5143af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('indirectProp2'), false);
5153af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectExportElement3'), false);
5163af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('indirectClass2'), false);
5173af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('indirectProp3'), false);
5183af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectExportElement4'), false);
5193af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('indirectProp4'), false);
5203af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectExportElement5'), false);
5213af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectExportElement6'), false);
5223af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectExportElement7'), false);
5233af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('indirectClass3'), false);
5243af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('indirectProp5'), false);
5253af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectExportElement8'), false);
5263af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('indirectClass4'), false);
5273af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('indirectProp6'), false);
5283af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('projectExportElement9'), false);
5293af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('indirectProp7'), false);
5303af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohPropertyAssignment1'), true);
5313af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohPropertyAssignment2'), true);
5323af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohPropertyAssignment3'), true);
5333af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohPropertyAssignment4'), true);
5343af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohIndirectObj'), false);
5353af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohIndirectProp1'), false);
5363af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohShorthand'), true);
5373af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohShorthandProp'), false);
5383af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohMethod1'), true);
5393af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohMethod2'), true);
5403af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohMethod3'), true);
5413af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohGetProp1'), true);
5423af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohGetProp2'), true);
5433af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohGetProp3'), true);
5443af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohSetProp1'), true);
5453af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohSetProp2'), true);
5463af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohSetProp3'), true);
5473af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohExportElement1'), true);
5483af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohExportElement2'), true);
5493af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohIndirectClass1'), true);
5503af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohIndirectProp2'), false);
5513af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohExportElement3'), true);
5523af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohIndirectClass2'), false);
5533af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohIndirectProp3'), false);
5543af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohExportElement4'), true);
5553af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohIndirectProp4'), false);
5563af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohExportElement5'), true);
5573af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohExportElement6'), true);
5583af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohExportElement7'), true);
5593af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohIndirectClass3'), true);
5603af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohIndirectProp5'), false);
5613af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohExportElement8'), true);
5623af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohIndirectClass4'), false);
5633af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohIndirectProp6'), false);
5643af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohExportElement9'), true);
5653af6ab5fSopenharmony_ci      assert.strictEqual(reservedExportNames.has('ohIndirectProp7'), false);
5663af6ab5fSopenharmony_ci    });
5673af6ab5fSopenharmony_ci  });
5683af6ab5fSopenharmony_ci});