1fb726d48Sopenharmony_ci/* 2fb726d48Sopenharmony_ci * Copyright (C) 2022 Huawei Device Co., Ltd. 3fb726d48Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 4fb726d48Sopenharmony_ci * you may not use this file except in compliance with the License. 5fb726d48Sopenharmony_ci * You may obtain a copy of the License at 6fb726d48Sopenharmony_ci * 7fb726d48Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 8fb726d48Sopenharmony_ci * 9fb726d48Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 10fb726d48Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 11fb726d48Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12fb726d48Sopenharmony_ci * See the License for the specific language governing permissions and 13fb726d48Sopenharmony_ci * limitations under the License. 14fb726d48Sopenharmony_ci */ 15fb726d48Sopenharmony_ci 16fb726d48Sopenharmony_ciimport { 17fb726d48Sopenharmony_ci NativeHookStatistics, 18fb726d48Sopenharmony_ci NativeHookMalloc, 19fb726d48Sopenharmony_ci NativeEventHeap, 20fb726d48Sopenharmony_ci NativeHookProcess, 21fb726d48Sopenharmony_ci NativeHookStatisticsTableData, 22fb726d48Sopenharmony_ci NativeMemory, 23fb726d48Sopenharmony_ci NativeHookSamplerInfo, 24fb726d48Sopenharmony_ci NativeHookSampleQueryInfo, 25fb726d48Sopenharmony_ci NativeHookCallInfo, 26fb726d48Sopenharmony_ci NativeEvent, 27fb726d48Sopenharmony_ci} from '../../../src/trace/bean/NativeHook'; 28fb726d48Sopenharmony_cijest.mock('../../../src/trace/component/trace/base/TraceRow', () => { 29fb726d48Sopenharmony_ci return {}; 30fb726d48Sopenharmony_ci}); 31fb726d48Sopenharmony_ci 32fb726d48Sopenharmony_cidescribe('NativeHook Test', () => { 33fb726d48Sopenharmony_ci it('NativeHookStatisticsTest01', function () { 34fb726d48Sopenharmony_ci let nativeHookStatistics = new NativeHookStatistics(); 35fb726d48Sopenharmony_ci nativeHookStatistics = { 36fb726d48Sopenharmony_ci eventId: 0, 37fb726d48Sopenharmony_ci eventType: 'eventType', 38fb726d48Sopenharmony_ci subType: 'subType', 39fb726d48Sopenharmony_ci heapSize: 0, 40fb726d48Sopenharmony_ci addr: 'addr', 41fb726d48Sopenharmony_ci startTs: 0, 42fb726d48Sopenharmony_ci endTs: 0, 43fb726d48Sopenharmony_ci sumHeapSize: 0, 44fb726d48Sopenharmony_ci max: 0, 45fb726d48Sopenharmony_ci count: 0, 46fb726d48Sopenharmony_ci tid: 0, 47fb726d48Sopenharmony_ci isSelected: false, 48fb726d48Sopenharmony_ci }; 49fb726d48Sopenharmony_ci expect(nativeHookStatistics).not.toBeUndefined(); 50fb726d48Sopenharmony_ci expect(nativeHookStatistics).toMatchInlineSnapshot( 51fb726d48Sopenharmony_ci{ 52fb726d48Sopenharmony_ci eventId: expect.any(Number), 53fb726d48Sopenharmony_ci eventType: expect.any(String), 54fb726d48Sopenharmony_ci subType: expect.any(String), 55fb726d48Sopenharmony_ci heapSize: expect.any(Number), 56fb726d48Sopenharmony_ci addr: expect.any(String), 57fb726d48Sopenharmony_ci startTs: expect.any(Number), 58fb726d48Sopenharmony_ci endTs: expect.any(Number), 59fb726d48Sopenharmony_ci sumHeapSize: expect.any(Number), 60fb726d48Sopenharmony_ci max: expect.any(Number), 61fb726d48Sopenharmony_ci count: expect.any(Number), 62fb726d48Sopenharmony_ci tid: expect.any(Number), 63fb726d48Sopenharmony_ci isSelected: expect.any(Boolean) }, ` 64fb726d48Sopenharmony_ci{ 65fb726d48Sopenharmony_ci "addr": Any<String>, 66fb726d48Sopenharmony_ci "count": Any<Number>, 67fb726d48Sopenharmony_ci "endTs": Any<Number>, 68fb726d48Sopenharmony_ci "eventId": Any<Number>, 69fb726d48Sopenharmony_ci "eventType": Any<String>, 70fb726d48Sopenharmony_ci "heapSize": Any<Number>, 71fb726d48Sopenharmony_ci "isSelected": Any<Boolean>, 72fb726d48Sopenharmony_ci "max": Any<Number>, 73fb726d48Sopenharmony_ci "startTs": Any<Number>, 74fb726d48Sopenharmony_ci "subType": Any<String>, 75fb726d48Sopenharmony_ci "sumHeapSize": Any<Number>, 76fb726d48Sopenharmony_ci "tid": Any<Number>, 77fb726d48Sopenharmony_ci} 78fb726d48Sopenharmony_ci`); 79fb726d48Sopenharmony_ci }); 80fb726d48Sopenharmony_ci 81fb726d48Sopenharmony_ci it('NativeEventHeapTest02', function () { 82fb726d48Sopenharmony_ci let nativeHookMalloc = new NativeHookMalloc(); 83fb726d48Sopenharmony_ci nativeHookMalloc = { 84fb726d48Sopenharmony_ci eventType: 'eventType', 85fb726d48Sopenharmony_ci subType: 'subType', 86fb726d48Sopenharmony_ci heapSize: 0, 87fb726d48Sopenharmony_ci allocByte: 0, 88fb726d48Sopenharmony_ci allocCount: 0, 89fb726d48Sopenharmony_ci freeByte: 0, 90fb726d48Sopenharmony_ci freeCount: 0, 91fb726d48Sopenharmony_ci }; 92fb726d48Sopenharmony_ci expect(nativeHookMalloc).not.toBeUndefined(); 93fb726d48Sopenharmony_ci expect(nativeHookMalloc).toMatchInlineSnapshot( 94fb726d48Sopenharmony_ci{ 95fb726d48Sopenharmony_ci eventType: expect.any(String), 96fb726d48Sopenharmony_ci subType: expect.any(String), 97fb726d48Sopenharmony_ci heapSize: expect.any(Number), 98fb726d48Sopenharmony_ci allocByte: expect.any(Number), 99fb726d48Sopenharmony_ci allocCount: expect.any(Number), 100fb726d48Sopenharmony_ci freeByte: expect.any(Number), 101fb726d48Sopenharmony_ci freeCount: expect.any(Number) }, ` 102fb726d48Sopenharmony_ci{ 103fb726d48Sopenharmony_ci "allocByte": Any<Number>, 104fb726d48Sopenharmony_ci "allocCount": Any<Number>, 105fb726d48Sopenharmony_ci "eventType": Any<String>, 106fb726d48Sopenharmony_ci "freeByte": Any<Number>, 107fb726d48Sopenharmony_ci "freeCount": Any<Number>, 108fb726d48Sopenharmony_ci "heapSize": Any<Number>, 109fb726d48Sopenharmony_ci "subType": Any<String>, 110fb726d48Sopenharmony_ci} 111fb726d48Sopenharmony_ci`); 112fb726d48Sopenharmony_ci }); 113fb726d48Sopenharmony_ci 114fb726d48Sopenharmony_ci it('NativeEventHeapTest03', function () { 115fb726d48Sopenharmony_ci let nativeEventHeap = new NativeEventHeap(); 116fb726d48Sopenharmony_ci nativeEventHeap = { 117fb726d48Sopenharmony_ci eventType: 'eventType', 118fb726d48Sopenharmony_ci sumHeapSize: 0, 119fb726d48Sopenharmony_ci }; 120fb726d48Sopenharmony_ci expect(nativeEventHeap).not.toBeUndefined(); 121fb726d48Sopenharmony_ci expect(nativeEventHeap).toMatchInlineSnapshot( 122fb726d48Sopenharmony_ci{ 123fb726d48Sopenharmony_ci eventType: expect.any(String), 124fb726d48Sopenharmony_ci sumHeapSize: expect.any(Number) }, ` 125fb726d48Sopenharmony_ci{ 126fb726d48Sopenharmony_ci "eventType": Any<String>, 127fb726d48Sopenharmony_ci "sumHeapSize": Any<Number>, 128fb726d48Sopenharmony_ci} 129fb726d48Sopenharmony_ci`); 130fb726d48Sopenharmony_ci }); 131fb726d48Sopenharmony_ci 132fb726d48Sopenharmony_ci it('NativeHookProcessTest04', function () { 133fb726d48Sopenharmony_ci let nativeHookProcess = new NativeHookProcess(); 134fb726d48Sopenharmony_ci nativeHookProcess = { 135fb726d48Sopenharmony_ci ipid: 0, 136fb726d48Sopenharmony_ci pid: 0, 137fb726d48Sopenharmony_ci name: 'name', 138fb726d48Sopenharmony_ci }; 139fb726d48Sopenharmony_ci expect(nativeHookProcess).not.toBeUndefined(); 140fb726d48Sopenharmony_ci expect(nativeHookProcess).toMatchInlineSnapshot( 141fb726d48Sopenharmony_ci{ 142fb726d48Sopenharmony_ci ipid: expect.any(Number), 143fb726d48Sopenharmony_ci pid: expect.any(Number), 144fb726d48Sopenharmony_ci name: expect.any(String) }, ` 145fb726d48Sopenharmony_ci{ 146fb726d48Sopenharmony_ci "ipid": Any<Number>, 147fb726d48Sopenharmony_ci "name": Any<String>, 148fb726d48Sopenharmony_ci "pid": Any<Number>, 149fb726d48Sopenharmony_ci} 150fb726d48Sopenharmony_ci`); 151fb726d48Sopenharmony_ci }); 152fb726d48Sopenharmony_ci 153fb726d48Sopenharmony_ci it('NativeHookStatisticsTableDataTest05', function () { 154fb726d48Sopenharmony_ci let nativeHookStatisticsTableData = new NativeHookStatisticsTableData(); 155fb726d48Sopenharmony_ci nativeHookStatisticsTableData = { 156fb726d48Sopenharmony_ci memoryTap: '', 157fb726d48Sopenharmony_ci existing: 0, 158fb726d48Sopenharmony_ci existingString: '', 159fb726d48Sopenharmony_ci allocCount: 0, 160fb726d48Sopenharmony_ci freeCount: 0, 161fb726d48Sopenharmony_ci totalBytes: 0, 162fb726d48Sopenharmony_ci totalBytesString: '', 163fb726d48Sopenharmony_ci maxStr: '', 164fb726d48Sopenharmony_ci max: 0, 165fb726d48Sopenharmony_ci totalCount: 0, 166fb726d48Sopenharmony_ci }; 167fb726d48Sopenharmony_ci expect(nativeHookStatisticsTableData).not.toBeUndefined(); 168fb726d48Sopenharmony_ci expect(nativeHookStatisticsTableData).toMatchInlineSnapshot( 169fb726d48Sopenharmony_ci{ 170fb726d48Sopenharmony_ci memoryTap: expect.any(String), 171fb726d48Sopenharmony_ci existing: expect.any(Number), 172fb726d48Sopenharmony_ci existingString: expect.any(String), 173fb726d48Sopenharmony_ci allocCount: expect.any(Number), 174fb726d48Sopenharmony_ci freeCount: expect.any(Number), 175fb726d48Sopenharmony_ci totalBytes: expect.any(Number), 176fb726d48Sopenharmony_ci totalBytesString: expect.any(String), 177fb726d48Sopenharmony_ci maxStr: expect.any(String), 178fb726d48Sopenharmony_ci max: expect.any(Number), 179fb726d48Sopenharmony_ci totalCount: expect.any(Number) }, ` 180fb726d48Sopenharmony_ci{ 181fb726d48Sopenharmony_ci "allocCount": Any<Number>, 182fb726d48Sopenharmony_ci "existing": Any<Number>, 183fb726d48Sopenharmony_ci "existingString": Any<String>, 184fb726d48Sopenharmony_ci "freeCount": Any<Number>, 185fb726d48Sopenharmony_ci "max": Any<Number>, 186fb726d48Sopenharmony_ci "maxStr": Any<String>, 187fb726d48Sopenharmony_ci "memoryTap": Any<String>, 188fb726d48Sopenharmony_ci "totalBytes": Any<Number>, 189fb726d48Sopenharmony_ci "totalBytesString": Any<String>, 190fb726d48Sopenharmony_ci "totalCount": Any<Number>, 191fb726d48Sopenharmony_ci} 192fb726d48Sopenharmony_ci`); 193fb726d48Sopenharmony_ci }); 194fb726d48Sopenharmony_ci 195fb726d48Sopenharmony_ci it('NativeMemoryTest06', function () { 196fb726d48Sopenharmony_ci let nativeMemory = new NativeMemory(); 197fb726d48Sopenharmony_ci nativeMemory = { 198fb726d48Sopenharmony_ci index: 0, 199fb726d48Sopenharmony_ci eventId: 0, 200fb726d48Sopenharmony_ci eventType: 'eventType', 201fb726d48Sopenharmony_ci subType: 'subType', 202fb726d48Sopenharmony_ci addr: 'addr', 203fb726d48Sopenharmony_ci startTs: 0, 204fb726d48Sopenharmony_ci timestamp: 'timestamp', 205fb726d48Sopenharmony_ci heapSize: 0, 206fb726d48Sopenharmony_ci heapSizeUnit: 'heapSizeUnit', 207fb726d48Sopenharmony_ci symbol: 'symbol', 208fb726d48Sopenharmony_ci library: 'library', 209fb726d48Sopenharmony_ci isSelected: false, 210fb726d48Sopenharmony_ci }; 211fb726d48Sopenharmony_ci expect(nativeMemory).not.toBeUndefined(); 212fb726d48Sopenharmony_ci expect(nativeMemory).toMatchInlineSnapshot( 213fb726d48Sopenharmony_ci{ 214fb726d48Sopenharmony_ci index: expect.any(Number), 215fb726d48Sopenharmony_ci eventId: expect.any(Number), 216fb726d48Sopenharmony_ci eventType: expect.any(String), 217fb726d48Sopenharmony_ci subType: expect.any(String), 218fb726d48Sopenharmony_ci addr: expect.any(String), 219fb726d48Sopenharmony_ci startTs: expect.any(Number), 220fb726d48Sopenharmony_ci timestamp: expect.any(String), 221fb726d48Sopenharmony_ci heapSize: expect.any(Number), 222fb726d48Sopenharmony_ci heapSizeUnit: expect.any(String), 223fb726d48Sopenharmony_ci symbol: expect.any(String), 224fb726d48Sopenharmony_ci library: expect.any(String), 225fb726d48Sopenharmony_ci isSelected: expect.any(Boolean) }, ` 226fb726d48Sopenharmony_ci{ 227fb726d48Sopenharmony_ci "addr": Any<String>, 228fb726d48Sopenharmony_ci "eventId": Any<Number>, 229fb726d48Sopenharmony_ci "eventType": Any<String>, 230fb726d48Sopenharmony_ci "heapSize": Any<Number>, 231fb726d48Sopenharmony_ci "heapSizeUnit": Any<String>, 232fb726d48Sopenharmony_ci "index": Any<Number>, 233fb726d48Sopenharmony_ci "isSelected": Any<Boolean>, 234fb726d48Sopenharmony_ci "library": Any<String>, 235fb726d48Sopenharmony_ci "startTs": Any<Number>, 236fb726d48Sopenharmony_ci "subType": Any<String>, 237fb726d48Sopenharmony_ci "symbol": Any<String>, 238fb726d48Sopenharmony_ci "timestamp": Any<String>, 239fb726d48Sopenharmony_ci} 240fb726d48Sopenharmony_ci`); 241fb726d48Sopenharmony_ci }); 242fb726d48Sopenharmony_ci 243fb726d48Sopenharmony_ci it('NativeHookCallInfoTest07', function () { 244fb726d48Sopenharmony_ci let nativeHookSamplerInfo = new NativeHookSamplerInfo(); 245fb726d48Sopenharmony_ci nativeHookSamplerInfo = { 246fb726d48Sopenharmony_ci current: 'current', 247fb726d48Sopenharmony_ci currentSize: 0, 248fb726d48Sopenharmony_ci startTs: 0, 249fb726d48Sopenharmony_ci heapSize: 0, 250fb726d48Sopenharmony_ci snapshot: 'snapshot', 251fb726d48Sopenharmony_ci growth: 'growth', 252fb726d48Sopenharmony_ci total: 0, 253fb726d48Sopenharmony_ci totalGrowth: 'totalGrowth', 254fb726d48Sopenharmony_ci existing: 0, 255fb726d48Sopenharmony_ci timestamp: 'timestamp', 256fb726d48Sopenharmony_ci eventId: -1, 257fb726d48Sopenharmony_ci }; 258fb726d48Sopenharmony_ci expect(nativeHookSamplerInfo).not.toBeUndefined(); 259fb726d48Sopenharmony_ci expect(nativeHookSamplerInfo).toMatchInlineSnapshot( 260fb726d48Sopenharmony_ci{ 261fb726d48Sopenharmony_ci current: expect.any(String), 262fb726d48Sopenharmony_ci currentSize: expect.any(Number), 263fb726d48Sopenharmony_ci startTs: expect.any(Number), 264fb726d48Sopenharmony_ci heapSize: expect.any(Number), 265fb726d48Sopenharmony_ci snapshot: expect.any(String), 266fb726d48Sopenharmony_ci growth: expect.any(String), 267fb726d48Sopenharmony_ci total: expect.any(Number), 268fb726d48Sopenharmony_ci totalGrowth: expect.any(String), 269fb726d48Sopenharmony_ci existing: expect.any(Number), 270fb726d48Sopenharmony_ci timestamp: expect.any(String), 271fb726d48Sopenharmony_ci eventId: expect.any(Number) }, ` 272fb726d48Sopenharmony_ci{ 273fb726d48Sopenharmony_ci "current": Any<String>, 274fb726d48Sopenharmony_ci "currentSize": Any<Number>, 275fb726d48Sopenharmony_ci "eventId": Any<Number>, 276fb726d48Sopenharmony_ci "existing": Any<Number>, 277fb726d48Sopenharmony_ci "growth": Any<String>, 278fb726d48Sopenharmony_ci "heapSize": Any<Number>, 279fb726d48Sopenharmony_ci "snapshot": Any<String>, 280fb726d48Sopenharmony_ci "startTs": Any<Number>, 281fb726d48Sopenharmony_ci "timestamp": Any<String>, 282fb726d48Sopenharmony_ci "total": Any<Number>, 283fb726d48Sopenharmony_ci "totalGrowth": Any<String>, 284fb726d48Sopenharmony_ci} 285fb726d48Sopenharmony_ci`); 286fb726d48Sopenharmony_ci }); 287fb726d48Sopenharmony_ci 288fb726d48Sopenharmony_ci it('NativeHookCallInfoTest08', function () { 289fb726d48Sopenharmony_ci let nativeHookSampleQueryInfo = new NativeHookSampleQueryInfo(); 290fb726d48Sopenharmony_ci nativeHookSampleQueryInfo = { 291fb726d48Sopenharmony_ci eventId: -1, 292fb726d48Sopenharmony_ci current: 0, 293fb726d48Sopenharmony_ci eventType: 'eventType', 294fb726d48Sopenharmony_ci subType: 'subType', 295fb726d48Sopenharmony_ci growth: 0, 296fb726d48Sopenharmony_ci existing: 0, 297fb726d48Sopenharmony_ci addr: 'addr', 298fb726d48Sopenharmony_ci startTs: 0, 299fb726d48Sopenharmony_ci endTs: 0, 300fb726d48Sopenharmony_ci total: 0, 301fb726d48Sopenharmony_ci }; 302fb726d48Sopenharmony_ci 303fb726d48Sopenharmony_ci expect(nativeHookSampleQueryInfo).not.toBeUndefined(); 304fb726d48Sopenharmony_ci expect(nativeHookSampleQueryInfo).toMatchInlineSnapshot( 305fb726d48Sopenharmony_ci{ 306fb726d48Sopenharmony_ci eventId: expect.any(Number), 307fb726d48Sopenharmony_ci current: expect.any(Number), 308fb726d48Sopenharmony_ci eventType: expect.any(String), 309fb726d48Sopenharmony_ci subType: expect.any(String), 310fb726d48Sopenharmony_ci growth: expect.any(Number), 311fb726d48Sopenharmony_ci existing: expect.any(Number), 312fb726d48Sopenharmony_ci addr: expect.any(String), 313fb726d48Sopenharmony_ci startTs: expect.any(Number), 314fb726d48Sopenharmony_ci endTs: expect.any(Number), 315fb726d48Sopenharmony_ci total: expect.any(Number) }, ` 316fb726d48Sopenharmony_ci{ 317fb726d48Sopenharmony_ci "addr": Any<String>, 318fb726d48Sopenharmony_ci "current": Any<Number>, 319fb726d48Sopenharmony_ci "endTs": Any<Number>, 320fb726d48Sopenharmony_ci "eventId": Any<Number>, 321fb726d48Sopenharmony_ci "eventType": Any<String>, 322fb726d48Sopenharmony_ci "existing": Any<Number>, 323fb726d48Sopenharmony_ci "growth": Any<Number>, 324fb726d48Sopenharmony_ci "startTs": Any<Number>, 325fb726d48Sopenharmony_ci "subType": Any<String>, 326fb726d48Sopenharmony_ci "total": Any<Number>, 327fb726d48Sopenharmony_ci} 328fb726d48Sopenharmony_ci`); 329fb726d48Sopenharmony_ci }); 330fb726d48Sopenharmony_ci 331fb726d48Sopenharmony_ci it('NativeHookCallInfoTest09', function () { 332fb726d48Sopenharmony_ci let nativeHookCallInfo = new NativeHookCallInfo(); 333fb726d48Sopenharmony_ci nativeHookCallInfo = { 334fb726d48Sopenharmony_ci id: 'id', 335fb726d48Sopenharmony_ci pid: 'pid', 336fb726d48Sopenharmony_ci library: 'library', 337fb726d48Sopenharmony_ci title: 'title', 338fb726d48Sopenharmony_ci count: 0, 339fb726d48Sopenharmony_ci type: 0, 340fb726d48Sopenharmony_ci heapSize: 0, 341fb726d48Sopenharmony_ci heapSizeStr: 'heapSizeStr', 342fb726d48Sopenharmony_ci eventId: 0, 343fb726d48Sopenharmony_ci threadId: 0, 344fb726d48Sopenharmony_ci isSelected: false, 345fb726d48Sopenharmony_ci }; 346fb726d48Sopenharmony_ci expect(nativeHookCallInfo).not.toBeUndefined(); 347fb726d48Sopenharmony_ci expect(nativeHookCallInfo).toMatchInlineSnapshot( 348fb726d48Sopenharmony_ci{ 349fb726d48Sopenharmony_ci id: expect.any(String), 350fb726d48Sopenharmony_ci pid: expect.any(String), 351fb726d48Sopenharmony_ci library: expect.any(String), 352fb726d48Sopenharmony_ci title: expect.any(String), 353fb726d48Sopenharmony_ci count: expect.any(Number), 354fb726d48Sopenharmony_ci type: expect.any(Number), 355fb726d48Sopenharmony_ci heapSize: expect.any(Number), 356fb726d48Sopenharmony_ci heapSizeStr: expect.any(String), 357fb726d48Sopenharmony_ci eventId: expect.any(Number), 358fb726d48Sopenharmony_ci threadId: expect.any(Number), 359fb726d48Sopenharmony_ci isSelected: expect.any(Boolean) }, ` 360fb726d48Sopenharmony_ci{ 361fb726d48Sopenharmony_ci "count": Any<Number>, 362fb726d48Sopenharmony_ci "eventId": Any<Number>, 363fb726d48Sopenharmony_ci "heapSize": Any<Number>, 364fb726d48Sopenharmony_ci "heapSizeStr": Any<String>, 365fb726d48Sopenharmony_ci "id": Any<String>, 366fb726d48Sopenharmony_ci "isSelected": Any<Boolean>, 367fb726d48Sopenharmony_ci "library": Any<String>, 368fb726d48Sopenharmony_ci "pid": Any<String>, 369fb726d48Sopenharmony_ci "threadId": Any<Number>, 370fb726d48Sopenharmony_ci "title": Any<String>, 371fb726d48Sopenharmony_ci "type": Any<Number>, 372fb726d48Sopenharmony_ci} 373fb726d48Sopenharmony_ci`); 374fb726d48Sopenharmony_ci }); 375fb726d48Sopenharmony_ci 376fb726d48Sopenharmony_ci it('NativeHookCallInfoTest10', function () { 377fb726d48Sopenharmony_ci let nativeHookSamplerInfo = new NativeHookSamplerInfo(); 378fb726d48Sopenharmony_ci expect(nativeHookSamplerInfo.merageObj(NativeHookSamplerInfo)).toBeUndefined(); 379fb726d48Sopenharmony_ci }); 380fb726d48Sopenharmony_ci 381fb726d48Sopenharmony_ci it('NativeEventHeapTest11', function () { 382fb726d48Sopenharmony_ci let nativeEvent = new NativeEvent(); 383fb726d48Sopenharmony_ci nativeEvent = { 384fb726d48Sopenharmony_ci startTime: 0, 385fb726d48Sopenharmony_ci heapSize: 0, 386fb726d48Sopenharmony_ci eventType: '', 387fb726d48Sopenharmony_ci }; 388fb726d48Sopenharmony_ci expect(nativeEvent).not.toBeUndefined(); 389fb726d48Sopenharmony_ci expect(nativeEvent).toMatchInlineSnapshot( 390fb726d48Sopenharmony_ci{ 391fb726d48Sopenharmony_ci startTime: expect.any(Number), 392fb726d48Sopenharmony_ci heapSize: expect.any(Number), 393fb726d48Sopenharmony_ci eventType: expect.any(String) }, ` 394fb726d48Sopenharmony_ci{ 395fb726d48Sopenharmony_ci "eventType": Any<String>, 396fb726d48Sopenharmony_ci "heapSize": Any<Number>, 397fb726d48Sopenharmony_ci "startTime": Any<Number>, 398fb726d48Sopenharmony_ci} 399fb726d48Sopenharmony_ci`); 400fb726d48Sopenharmony_ci }); 401fb726d48Sopenharmony_ci}); 402