@mchp-mcc/scf-pic8-osc-v1 4.3.2 → 4.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Changelog.md +18 -0
- package/Readme.md +18 -0
- package/lib/generated_module/src/index.js +0 -5
- package/output/autoCreator.js +1657 -0
- package/output/autoCreator.js.map +1 -0
- package/output/autoProcessor.js +1659 -0
- package/output/autoProcessor.js.map +1 -0
- package/output/clock.c.ftl +38 -7
- package/output/clock.h.ftl +5 -5
- package/output/creator.js +6283 -1566
- package/output/creator.js.map +1 -1
- package/output/processor.js +5394 -5863
- package/output/processor.js.map +1 -1
- package/package.json +88 -22
- package/src/ClockCalculator.test.ts +0 -117
- package/src/ClockCalculator.ts +0 -81
- package/src/CreatorFunctions.ts +0 -12
- package/src/DerivedData.test.tsx +0 -927
- package/src/DerivedData.ts +0 -304
- package/src/PinsLogic.test.ts +0 -917
- package/src/PinsLogic.ts +0 -297
- package/src/StringConstants.ts +0 -13
- package/src/moduleConfig.json +0 -580
- package/src/pinsdata.json +0 -90
package/src/DerivedData.test.tsx
DELETED
|
@@ -1,927 +0,0 @@
|
|
|
1
|
-
import { DerivedData } from "@microchip/scf-automodule-interface/lib/src/DerivedData";
|
|
2
|
-
import { getModel } from "../generated_module/src/App/AppModel";
|
|
3
|
-
import { mockState } from "../generated_module/tests/AppModel.test";
|
|
4
|
-
import { mockAssignedModule } from "../generated_module/tests/processor.test";
|
|
5
|
-
import * as Processor from "@microchip/scf-common/lib/Processor";
|
|
6
|
-
import { StringConstants } from "./StringConstants";
|
|
7
|
-
import { EmptyDerivedData, getDerivedData } from "./DerivedData";
|
|
8
|
-
|
|
9
|
-
describe("Export Interface test Cases ", () => {
|
|
10
|
-
describe("DerivedData Export osc_clocks interface test cases -- >", () => {
|
|
11
|
-
let mockModule = mockAssignedModule(mockState());
|
|
12
|
-
mockModule = {
|
|
13
|
-
...mockModule,
|
|
14
|
-
state: {
|
|
15
|
-
main: {
|
|
16
|
-
hardware: {
|
|
17
|
-
noscOsccon1: "LFINTOSC",
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
};
|
|
22
|
-
const model = getModel(mockModule, getDerivedData);
|
|
23
|
-
const derivedData = model?.getDerivedData() as DerivedData;
|
|
24
|
-
const derivedFunctions = derivedData?.getMyFunctions();
|
|
25
|
-
|
|
26
|
-
const osc_clocks_payload = {
|
|
27
|
-
extosc: "32768",
|
|
28
|
-
fosc: "7750",
|
|
29
|
-
hfintosc: "4000000",
|
|
30
|
-
lfintosc: "31000",
|
|
31
|
-
mfintosc: "500000",
|
|
32
|
-
mfintosc_31Khz: "31250",
|
|
33
|
-
sosc: "32768",
|
|
34
|
-
hasSosc: true,
|
|
35
|
-
soscEnabled: false,
|
|
36
|
-
soscPowerMode: "Low power",
|
|
37
|
-
};
|
|
38
|
-
it("Test for osc_clocks payload", () => {
|
|
39
|
-
expect(derivedFunctions?.["osc-clocks_payload"]?.()).toEqual(
|
|
40
|
-
osc_clocks_payload,
|
|
41
|
-
);
|
|
42
|
-
});
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
describe("DerivedData Export fosc_hz interface test cases -- >", () => {
|
|
46
|
-
let mockModule = mockAssignedModule(mockState());
|
|
47
|
-
mockModule = {
|
|
48
|
-
...mockModule,
|
|
49
|
-
state: {
|
|
50
|
-
main: {
|
|
51
|
-
hardware: {
|
|
52
|
-
noscOsccon1: "LFINTOSC",
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
};
|
|
57
|
-
const model = getModel(mockModule, getDerivedData);
|
|
58
|
-
const derivedData = model?.getDerivedData() as DerivedData;
|
|
59
|
-
const derivedFunctions = derivedData?.getMyFunctions();
|
|
60
|
-
|
|
61
|
-
const fosc_hz_payload = "7750";
|
|
62
|
-
it("Test for osc_clocks payload", () => {
|
|
63
|
-
expect(derivedFunctions?.["fosc-hz_payload"]?.()).toBe(fosc_hz_payload);
|
|
64
|
-
});
|
|
65
|
-
});
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
describe("Import Interface test Cases ", () => {
|
|
69
|
-
describe("DerivedData initializer_system test cases -- >", () => {
|
|
70
|
-
const mockModule = mockAssignedModule(mockState());
|
|
71
|
-
const model = getModel(mockModule, getDerivedData);
|
|
72
|
-
const derivedData = model?.getDerivedData() as DerivedData;
|
|
73
|
-
const derivedFunctions = derivedData?.getMyFunctions();
|
|
74
|
-
|
|
75
|
-
const initializer_system_results = {
|
|
76
|
-
initializer: {
|
|
77
|
-
name: "CLOCK_Initialize",
|
|
78
|
-
header: {
|
|
79
|
-
name: "clock.h",
|
|
80
|
-
path: "system/",
|
|
81
|
-
},
|
|
82
|
-
priority: 1,
|
|
83
|
-
},
|
|
84
|
-
};
|
|
85
|
-
it("Test for initializer_system interface results", () => {
|
|
86
|
-
expect(derivedFunctions?.initializer_system_results?.()).toEqual(
|
|
87
|
-
initializer_system_results,
|
|
88
|
-
);
|
|
89
|
-
});
|
|
90
|
-
});
|
|
91
|
-
|
|
92
|
-
describe("DerivedData config_device test cases -- >", () => {
|
|
93
|
-
const mockModule = mockAssignedModule(mockState());
|
|
94
|
-
const model = getModel(mockModule, getDerivedData);
|
|
95
|
-
const derivedData = model?.getDerivedData() as DerivedData;
|
|
96
|
-
const derivedFunctions = derivedData?.getMyFunctions();
|
|
97
|
-
|
|
98
|
-
const config_device_results = {
|
|
99
|
-
headers: [
|
|
100
|
-
{
|
|
101
|
-
name: "clock.h",
|
|
102
|
-
path: "system/",
|
|
103
|
-
},
|
|
104
|
-
],
|
|
105
|
-
};
|
|
106
|
-
it("Test for config_device interface results", () => {
|
|
107
|
-
expect(derivedFunctions?.config_device_results?.()).toEqual(
|
|
108
|
-
config_device_results,
|
|
109
|
-
);
|
|
110
|
-
});
|
|
111
|
-
});
|
|
112
|
-
|
|
113
|
-
describe("DerivedData config_request test cases -- >", () => {
|
|
114
|
-
const mockModule = mockAssignedModule(mockState());
|
|
115
|
-
const model = getModel(mockModule, getDerivedData);
|
|
116
|
-
const derivedData = model?.getDerivedData() as DerivedData;
|
|
117
|
-
const derivedFunctions = derivedData?.getMyFunctions();
|
|
118
|
-
|
|
119
|
-
const config_request_args = ["FEXTOSC", "CLKOUTEN", "MCLRE", "LVP"];
|
|
120
|
-
it("Test for config_request interface results", () => {
|
|
121
|
-
expect(derivedFunctions?.config_request_args?.()).toEqual(
|
|
122
|
-
config_request_args,
|
|
123
|
-
);
|
|
124
|
-
});
|
|
125
|
-
});
|
|
126
|
-
});
|
|
127
|
-
|
|
128
|
-
describe("Template Data test Cases ", () => {
|
|
129
|
-
describe("DerivedData for TemplateData -- >", () => {
|
|
130
|
-
const mockModule = mockAssignedModule(mockState());
|
|
131
|
-
const model = getModel(mockModule, getDerivedData);
|
|
132
|
-
const derivedData = model?.getDerivedData() as DerivedData;
|
|
133
|
-
const derivedFunctions = derivedData?.getMyFunctions();
|
|
134
|
-
const templateData = {
|
|
135
|
-
productName: "CCL",
|
|
136
|
-
productVersion: "1.8.2",
|
|
137
|
-
compiler: "XC8 v2.20",
|
|
138
|
-
tool: "MPLAB X 5.40",
|
|
139
|
-
deviceFrequency: "1000000",
|
|
140
|
-
initRegisters: {
|
|
141
|
-
OSCCON1: {
|
|
142
|
-
comment: "NDIV 4; NOSC HFINTOSC; ",
|
|
143
|
-
value: 98,
|
|
144
|
-
valueAsHex: "0x62",
|
|
145
|
-
name: "OSCCON1",
|
|
146
|
-
alias: "OSCCON1",
|
|
147
|
-
settings: {
|
|
148
|
-
NDIV: {
|
|
149
|
-
alias: "NDIV",
|
|
150
|
-
name: "NDIV",
|
|
151
|
-
value: 2,
|
|
152
|
-
valueAsHex: "0x2",
|
|
153
|
-
valueAsDescription: "4",
|
|
154
|
-
bitName: "OSCCON1bits.NDIV",
|
|
155
|
-
},
|
|
156
|
-
NOSC: {
|
|
157
|
-
alias: "NOSC",
|
|
158
|
-
name: "NOSC",
|
|
159
|
-
value: 6,
|
|
160
|
-
valueAsHex: "0x6",
|
|
161
|
-
valueAsDescription: "HFINTOSC",
|
|
162
|
-
bitName: "OSCCON1bits.NOSC",
|
|
163
|
-
},
|
|
164
|
-
},
|
|
165
|
-
},
|
|
166
|
-
OSCCON2: {
|
|
167
|
-
comment: "",
|
|
168
|
-
value: 112,
|
|
169
|
-
valueAsHex: "0x70",
|
|
170
|
-
name: "OSCCON2",
|
|
171
|
-
alias: "OSCCON2",
|
|
172
|
-
settings: {
|
|
173
|
-
CDIV: {
|
|
174
|
-
alias: "CDIV",
|
|
175
|
-
name: "CDIV",
|
|
176
|
-
value: 0,
|
|
177
|
-
valueAsHex: "0x0",
|
|
178
|
-
valueAsDescription: "1",
|
|
179
|
-
bitName: "OSCCON2bits.CDIV",
|
|
180
|
-
},
|
|
181
|
-
COSC: {
|
|
182
|
-
alias: "COSC",
|
|
183
|
-
name: "COSC",
|
|
184
|
-
value: 7,
|
|
185
|
-
valueAsHex: "0x7",
|
|
186
|
-
valueAsDescription: "EXTOSC",
|
|
187
|
-
bitName: "OSCCON2bits.COSC",
|
|
188
|
-
},
|
|
189
|
-
},
|
|
190
|
-
},
|
|
191
|
-
OSCCON3: {
|
|
192
|
-
comment: "SOSCPWR Low power; CSWHOLD may proceed; ",
|
|
193
|
-
value: 0,
|
|
194
|
-
valueAsHex: "0x0",
|
|
195
|
-
name: "OSCCON3",
|
|
196
|
-
alias: "OSCCON3",
|
|
197
|
-
settings: {
|
|
198
|
-
NOSCR: {
|
|
199
|
-
alias: "NOSCR",
|
|
200
|
-
name: "NOSCR",
|
|
201
|
-
value: 0,
|
|
202
|
-
valueAsHex: "0x0",
|
|
203
|
-
valueAsDescription: "not ready",
|
|
204
|
-
bitName: "OSCCON3bits.NOSCR",
|
|
205
|
-
},
|
|
206
|
-
ORDY: {
|
|
207
|
-
alias: "ORDY",
|
|
208
|
-
name: "ORDY",
|
|
209
|
-
value: 0,
|
|
210
|
-
valueAsHex: "0x0",
|
|
211
|
-
valueAsDescription: "clock switching",
|
|
212
|
-
bitName: "OSCCON3bits.ORDY",
|
|
213
|
-
},
|
|
214
|
-
SOSCPWR: {
|
|
215
|
-
alias: "SOSCPWR",
|
|
216
|
-
name: "SOSCPWR",
|
|
217
|
-
value: 0,
|
|
218
|
-
valueAsHex: "0x0",
|
|
219
|
-
valueAsDescription: "Low power",
|
|
220
|
-
bitName: "OSCCON3bits.SOSCPWR",
|
|
221
|
-
},
|
|
222
|
-
CSWHOLD: {
|
|
223
|
-
alias: "CSWHOLD",
|
|
224
|
-
name: "CSWHOLD",
|
|
225
|
-
value: 0,
|
|
226
|
-
valueAsHex: "0x0",
|
|
227
|
-
valueAsDescription: "may proceed",
|
|
228
|
-
bitName: "OSCCON3bits.CSWHOLD",
|
|
229
|
-
},
|
|
230
|
-
},
|
|
231
|
-
},
|
|
232
|
-
OSCEN: {
|
|
233
|
-
comment:
|
|
234
|
-
"EXTOEN disabled; HFOEN disabled; MFOEN disabled; LFOEN disabled; SOSCEN disabled; ADOEN disabled; ",
|
|
235
|
-
value: 0,
|
|
236
|
-
valueAsHex: "0x0",
|
|
237
|
-
name: "OSCEN",
|
|
238
|
-
alias: "OSCEN",
|
|
239
|
-
settings: {
|
|
240
|
-
EXTOEN: {
|
|
241
|
-
alias: "EXTOEN",
|
|
242
|
-
name: "EXTOEN",
|
|
243
|
-
value: 0,
|
|
244
|
-
valueAsHex: "0x0",
|
|
245
|
-
valueAsDescription: "disabled",
|
|
246
|
-
bitName: "OSCENbits.EXTOEN",
|
|
247
|
-
},
|
|
248
|
-
HFOEN: {
|
|
249
|
-
alias: "HFOEN",
|
|
250
|
-
name: "HFOEN",
|
|
251
|
-
value: 0,
|
|
252
|
-
valueAsHex: "0x0",
|
|
253
|
-
valueAsDescription: "disabled",
|
|
254
|
-
bitName: "OSCENbits.HFOEN",
|
|
255
|
-
},
|
|
256
|
-
MFOEN: {
|
|
257
|
-
alias: "MFOEN",
|
|
258
|
-
name: "MFOEN",
|
|
259
|
-
value: 0,
|
|
260
|
-
valueAsHex: "0x0",
|
|
261
|
-
valueAsDescription: "disabled",
|
|
262
|
-
bitName: "OSCENbits.MFOEN",
|
|
263
|
-
},
|
|
264
|
-
LFOEN: {
|
|
265
|
-
alias: "LFOEN",
|
|
266
|
-
name: "LFOEN",
|
|
267
|
-
value: 0,
|
|
268
|
-
valueAsHex: "0x0",
|
|
269
|
-
valueAsDescription: "disabled",
|
|
270
|
-
bitName: "OSCENbits.LFOEN",
|
|
271
|
-
},
|
|
272
|
-
SOSCEN: {
|
|
273
|
-
alias: "SOSCEN",
|
|
274
|
-
name: "SOSCEN",
|
|
275
|
-
value: 0,
|
|
276
|
-
valueAsHex: "0x0",
|
|
277
|
-
valueAsDescription: "disabled",
|
|
278
|
-
bitName: "OSCENbits.SOSCEN",
|
|
279
|
-
},
|
|
280
|
-
ADOEN: {
|
|
281
|
-
alias: "ADOEN",
|
|
282
|
-
name: "ADOEN",
|
|
283
|
-
value: 0,
|
|
284
|
-
valueAsHex: "0x0",
|
|
285
|
-
valueAsDescription: "disabled",
|
|
286
|
-
bitName: "OSCENbits.ADOEN",
|
|
287
|
-
},
|
|
288
|
-
},
|
|
289
|
-
},
|
|
290
|
-
OSCFRQ: {
|
|
291
|
-
comment: "HFFRQ 4_MHz; ",
|
|
292
|
-
value: 2,
|
|
293
|
-
valueAsHex: "0x2",
|
|
294
|
-
name: "OSCFRQ",
|
|
295
|
-
alias: "OSCFRQ",
|
|
296
|
-
settings: {
|
|
297
|
-
HFFRQ: {
|
|
298
|
-
alias: "HFFRQ",
|
|
299
|
-
name: "HFFRQ",
|
|
300
|
-
value: 2,
|
|
301
|
-
valueAsHex: "0x2",
|
|
302
|
-
valueAsDescription: "4_MHz",
|
|
303
|
-
bitName: "OSCFRQbits.HFFRQ",
|
|
304
|
-
},
|
|
305
|
-
},
|
|
306
|
-
},
|
|
307
|
-
OSCSTAT: {
|
|
308
|
-
comment: "",
|
|
309
|
-
value: 0,
|
|
310
|
-
valueAsHex: "0x0",
|
|
311
|
-
name: "OSCSTAT",
|
|
312
|
-
alias: "OSCSTAT",
|
|
313
|
-
settings: {
|
|
314
|
-
PLLR: {
|
|
315
|
-
alias: "PLLR",
|
|
316
|
-
name: "PLLR",
|
|
317
|
-
value: 0,
|
|
318
|
-
valueAsHex: "0x0",
|
|
319
|
-
valueAsDescription: "not ready",
|
|
320
|
-
bitName: "OSCSTATbits.PLLR",
|
|
321
|
-
},
|
|
322
|
-
ADOR: {
|
|
323
|
-
alias: "ADOR",
|
|
324
|
-
name: "ADOR",
|
|
325
|
-
value: 0,
|
|
326
|
-
valueAsHex: "0x0",
|
|
327
|
-
valueAsDescription: "not ready",
|
|
328
|
-
bitName: "OSCSTATbits.ADOR",
|
|
329
|
-
},
|
|
330
|
-
SOR: {
|
|
331
|
-
alias: "SOR",
|
|
332
|
-
name: "SOR",
|
|
333
|
-
value: 0,
|
|
334
|
-
valueAsHex: "0x0",
|
|
335
|
-
valueAsDescription: "not ready",
|
|
336
|
-
bitName: "OSCSTATbits.SOR",
|
|
337
|
-
},
|
|
338
|
-
LFOR: {
|
|
339
|
-
alias: "LFOR",
|
|
340
|
-
name: "LFOR",
|
|
341
|
-
value: 0,
|
|
342
|
-
valueAsHex: "0x0",
|
|
343
|
-
valueAsDescription: "not ready",
|
|
344
|
-
bitName: "OSCSTATbits.LFOR",
|
|
345
|
-
},
|
|
346
|
-
MFOR: {
|
|
347
|
-
alias: "MFOR",
|
|
348
|
-
name: "MFOR",
|
|
349
|
-
value: 0,
|
|
350
|
-
valueAsHex: "0x0",
|
|
351
|
-
valueAsDescription: "not ready",
|
|
352
|
-
bitName: "OSCSTATbits.MFOR",
|
|
353
|
-
},
|
|
354
|
-
HFOR: {
|
|
355
|
-
alias: "HFOR",
|
|
356
|
-
name: "HFOR",
|
|
357
|
-
value: 0,
|
|
358
|
-
valueAsHex: "0x0",
|
|
359
|
-
valueAsDescription: "not ready",
|
|
360
|
-
bitName: "OSCSTATbits.HFOR",
|
|
361
|
-
},
|
|
362
|
-
EXTOR: {
|
|
363
|
-
alias: "EXTOR",
|
|
364
|
-
name: "EXTOR",
|
|
365
|
-
value: 0,
|
|
366
|
-
valueAsHex: "0x0",
|
|
367
|
-
valueAsDescription: "not ready",
|
|
368
|
-
bitName: "OSCSTATbits.EXTOR",
|
|
369
|
-
},
|
|
370
|
-
},
|
|
371
|
-
},
|
|
372
|
-
OSCTUNE: {
|
|
373
|
-
comment: "TUN undefined; ",
|
|
374
|
-
value: 0,
|
|
375
|
-
valueAsHex: "0x0",
|
|
376
|
-
name: "OSCTUNE",
|
|
377
|
-
alias: "OSCTUNE",
|
|
378
|
-
settings: {
|
|
379
|
-
TUN: {
|
|
380
|
-
alias: "TUN",
|
|
381
|
-
name: "TUN",
|
|
382
|
-
value: 0,
|
|
383
|
-
valueAsDescription: undefined,
|
|
384
|
-
valueAsHex: "0x0",
|
|
385
|
-
bitName: "OSCTUNEbits.TUN",
|
|
386
|
-
},
|
|
387
|
-
},
|
|
388
|
-
},
|
|
389
|
-
ACTCON: {
|
|
390
|
-
comment: "ACTEN disabled; ACTUD enabled; ",
|
|
391
|
-
value: 0,
|
|
392
|
-
valueAsHex: "0x0",
|
|
393
|
-
name: "ACTCON",
|
|
394
|
-
alias: "ACTCON",
|
|
395
|
-
settings: {
|
|
396
|
-
ACTEN: {
|
|
397
|
-
alias: "ACTEN",
|
|
398
|
-
name: "ACTEN",
|
|
399
|
-
value: 0,
|
|
400
|
-
valueAsHex: "0x0",
|
|
401
|
-
valueAsDescription: "disabled",
|
|
402
|
-
bitName: "ACTCONbits.ACTEN",
|
|
403
|
-
},
|
|
404
|
-
ACTUD: {
|
|
405
|
-
alias: "ACTUD",
|
|
406
|
-
name: "ACTUD",
|
|
407
|
-
value: 0,
|
|
408
|
-
valueAsHex: "0x0",
|
|
409
|
-
valueAsDescription: "enabled",
|
|
410
|
-
bitName: "ACTCONbits.ACTUD",
|
|
411
|
-
},
|
|
412
|
-
ACTLOCK: {
|
|
413
|
-
alias: "ACTLOCK",
|
|
414
|
-
name: "ACTLOCK",
|
|
415
|
-
value: 0,
|
|
416
|
-
valueAsHex: "0x0",
|
|
417
|
-
valueAsDescription: "Not locked",
|
|
418
|
-
bitName: "ACTCONbits.ACTLOCK",
|
|
419
|
-
},
|
|
420
|
-
ACTORS: {
|
|
421
|
-
alias: "ACTORS",
|
|
422
|
-
name: "ACTORS",
|
|
423
|
-
value: 0,
|
|
424
|
-
valueAsHex: "0x0",
|
|
425
|
-
valueAsDescription: "In range",
|
|
426
|
-
bitName: "ACTCONbits.ACTORS",
|
|
427
|
-
},
|
|
428
|
-
},
|
|
429
|
-
},
|
|
430
|
-
},
|
|
431
|
-
header: {
|
|
432
|
-
name: "clock.h",
|
|
433
|
-
path: "../",
|
|
434
|
-
},
|
|
435
|
-
moduleNameUpperCase: "CLOCK CONTROL",
|
|
436
|
-
moduleNameLowerCase: "clock control",
|
|
437
|
-
};
|
|
438
|
-
it("Test for GetTemplateData value", () => {
|
|
439
|
-
expect(derivedFunctions.templateData?.()).toStrictEqual(templateData);
|
|
440
|
-
});
|
|
441
|
-
});
|
|
442
|
-
});
|
|
443
|
-
|
|
444
|
-
describe("Calculations test Cases ", () => {
|
|
445
|
-
describe("DerivedData for Calculation -- >", () => {
|
|
446
|
-
let mockModule = mockAssignedModule(mockState());
|
|
447
|
-
mockModule = {
|
|
448
|
-
...mockModule,
|
|
449
|
-
state: {
|
|
450
|
-
main: {
|
|
451
|
-
hardware: {
|
|
452
|
-
noscOsccon1: "LFINTOSC",
|
|
453
|
-
ndivOsccon1: "2",
|
|
454
|
-
},
|
|
455
|
-
},
|
|
456
|
-
},
|
|
457
|
-
};
|
|
458
|
-
const model = getModel(mockModule, getDerivedData);
|
|
459
|
-
const derivedData = model?.getDerivedData() as DerivedData;
|
|
460
|
-
const derivedFunctions = derivedData?.getMyFunctions();
|
|
461
|
-
|
|
462
|
-
it("Test for DerivedData", () => {
|
|
463
|
-
expect(derivedData).toBeDefined();
|
|
464
|
-
expect(derivedData?.getModel()).toBeDefined();
|
|
465
|
-
});
|
|
466
|
-
|
|
467
|
-
it("Test for currentSystemClk()", () => {
|
|
468
|
-
expect(derivedFunctions?.currentSystemClk()).toEqual(15500);
|
|
469
|
-
});
|
|
470
|
-
});
|
|
471
|
-
});
|
|
472
|
-
|
|
473
|
-
describe("Alerts/Notifications test Cases ", () => {
|
|
474
|
-
describe("Alert: Show Hint when clock source is EXTOSC", () => {
|
|
475
|
-
let mockModule = mockAssignedModule(mockState());
|
|
476
|
-
mockModule = {
|
|
477
|
-
...mockModule,
|
|
478
|
-
state: {
|
|
479
|
-
main: {
|
|
480
|
-
hardware: {
|
|
481
|
-
noscOsccon1: "EXTOSC",
|
|
482
|
-
},
|
|
483
|
-
},
|
|
484
|
-
},
|
|
485
|
-
};
|
|
486
|
-
const model = getModel(mockModule, getDerivedData);
|
|
487
|
-
const derivedData = model?.getDerivedData() as DerivedData;
|
|
488
|
-
const derivedFunctions = derivedData?.getMyFunctions();
|
|
489
|
-
const alert_OSC_1: Processor.Alert[] = [
|
|
490
|
-
{
|
|
491
|
-
type: Processor.AlertTypes.Hint,
|
|
492
|
-
text:
|
|
493
|
-
'Please configure required "External Oscillator Selection" in System Module config bits',
|
|
494
|
-
},
|
|
495
|
-
];
|
|
496
|
-
it("Test for Alerts value", () => {
|
|
497
|
-
expect(derivedFunctions.alerts?.()).toEqual(alert_OSC_1);
|
|
498
|
-
});
|
|
499
|
-
});
|
|
500
|
-
|
|
501
|
-
describe("Alert: Show Warning and Hint when clock source is 'EXTOSC with 4x PLL'", () => {
|
|
502
|
-
let mockModule = mockAssignedModule(mockState());
|
|
503
|
-
mockModule = {
|
|
504
|
-
...mockModule,
|
|
505
|
-
state: {
|
|
506
|
-
main: {
|
|
507
|
-
hardware: {
|
|
508
|
-
noscOsccon1: StringConstants.EXTOSC_4xPLL,
|
|
509
|
-
externalClk: 300000,
|
|
510
|
-
},
|
|
511
|
-
},
|
|
512
|
-
},
|
|
513
|
-
};
|
|
514
|
-
const model = getModel(mockModule, getDerivedData);
|
|
515
|
-
const derivedData = model?.getDerivedData() as DerivedData;
|
|
516
|
-
const derivedFunctions = derivedData?.getMyFunctions();
|
|
517
|
-
const alert_OSC_2: Processor.Alert[] = [
|
|
518
|
-
{
|
|
519
|
-
type: Processor.AlertTypes.Hint,
|
|
520
|
-
text:
|
|
521
|
-
'Please configure required "External Oscillator Selection" in System Module config bits',
|
|
522
|
-
},
|
|
523
|
-
{
|
|
524
|
-
type: Processor.AlertTypes.Warning,
|
|
525
|
-
text:
|
|
526
|
-
"The frequency selected does not fall within the PLL locking range. Therefore, the actual frequency produced by hardware maybe unpredictable when the PLL is enabled. Either change the clock frequency or select a different option in Oscillator select.",
|
|
527
|
-
},
|
|
528
|
-
];
|
|
529
|
-
it("Test for Alerts value", () => {
|
|
530
|
-
expect(derivedFunctions.alerts?.()).toEqual(alert_OSC_2);
|
|
531
|
-
});
|
|
532
|
-
});
|
|
533
|
-
|
|
534
|
-
describe("Alert: Show Warning when clock source is 'HFINTOSC with 2x PLL'", () => {
|
|
535
|
-
let mockModule = mockAssignedModule(mockState());
|
|
536
|
-
mockModule = {
|
|
537
|
-
...mockModule,
|
|
538
|
-
state: {
|
|
539
|
-
main: {
|
|
540
|
-
hardware: {
|
|
541
|
-
noscOsccon1: StringConstants.HFINTOSC_2xPLL,
|
|
542
|
-
hffrqOscfrq: "32_MHz",
|
|
543
|
-
ndivOsccon1: "4",
|
|
544
|
-
},
|
|
545
|
-
},
|
|
546
|
-
},
|
|
547
|
-
};
|
|
548
|
-
const model = getModel(mockModule, getDerivedData);
|
|
549
|
-
const derivedData = model?.getDerivedData() as DerivedData;
|
|
550
|
-
const derivedFunctions = derivedData?.getMyFunctions();
|
|
551
|
-
const alert_OSC_3: Processor.Alert[] = [
|
|
552
|
-
{
|
|
553
|
-
type: Processor.AlertTypes.Warning,
|
|
554
|
-
text:
|
|
555
|
-
"The frequency set in HF Internal Clock may not get generated by the clock hardware properly since it does not fall within the 2xPLL range of 8-16 MHz. Therefore, it is recommended that the option 'HFINTOSC' be selected in the Oscillator select combo box.",
|
|
556
|
-
},
|
|
557
|
-
];
|
|
558
|
-
it("Test for Alerts value", () => {
|
|
559
|
-
expect(derivedFunctions.alerts?.()).toEqual(alert_OSC_3);
|
|
560
|
-
});
|
|
561
|
-
});
|
|
562
|
-
|
|
563
|
-
describe("Alert: Show Warning when clock source is 'EXTOSC with 4x PLL' and system clock is > MAX_PLL ", () => {
|
|
564
|
-
let mockModule = mockAssignedModule(mockState());
|
|
565
|
-
mockModule = {
|
|
566
|
-
...mockModule,
|
|
567
|
-
state: {
|
|
568
|
-
main: {
|
|
569
|
-
hardware: {
|
|
570
|
-
noscOsccon1: StringConstants.EXTOSC_4xPLL,
|
|
571
|
-
externalClk: 16000002,
|
|
572
|
-
},
|
|
573
|
-
},
|
|
574
|
-
},
|
|
575
|
-
};
|
|
576
|
-
const model = getModel(mockModule, getDerivedData);
|
|
577
|
-
const derivedData = model?.getDerivedData() as DerivedData;
|
|
578
|
-
const derivedFunctions = derivedData?.getMyFunctions();
|
|
579
|
-
const alert_OSC_4: Processor.Alert[] = [
|
|
580
|
-
{
|
|
581
|
-
type: Processor.AlertTypes.Hint,
|
|
582
|
-
text:
|
|
583
|
-
'Please configure required "External Oscillator Selection" in System Module config bits',
|
|
584
|
-
},
|
|
585
|
-
{
|
|
586
|
-
type: Processor.AlertTypes.Warning,
|
|
587
|
-
text:
|
|
588
|
-
"The frequency selected does not fall within the PLL locking range. Therefore, the actual frequency produced by hardware maybe unpredictable when the PLL is enabled. Either change the clock frequency or select a different option in Oscillator select.",
|
|
589
|
-
},
|
|
590
|
-
];
|
|
591
|
-
it("Test for Alerts value", () => {
|
|
592
|
-
expect(derivedFunctions.alerts?.()).toEqual(alert_OSC_4);
|
|
593
|
-
});
|
|
594
|
-
});
|
|
595
|
-
|
|
596
|
-
describe("Alert: Show Warning when clock source is 'EXTOSC with 4x PLL' and system clock is > 64000000 ", () => {
|
|
597
|
-
let mockModule = mockAssignedModule(mockState());
|
|
598
|
-
mockModule = {
|
|
599
|
-
...mockModule,
|
|
600
|
-
state: {
|
|
601
|
-
main: {
|
|
602
|
-
hardware: {
|
|
603
|
-
noscOsccon1: StringConstants.EXTOSC_4xPLL,
|
|
604
|
-
externalClk: 64000001,
|
|
605
|
-
ndivOsccon1: "1",
|
|
606
|
-
},
|
|
607
|
-
},
|
|
608
|
-
},
|
|
609
|
-
};
|
|
610
|
-
const model = getModel(mockModule, getDerivedData);
|
|
611
|
-
if (model) {
|
|
612
|
-
model.getImportValue = (int_name: string): any => {
|
|
613
|
-
const intfdata = {
|
|
614
|
-
config_request: {
|
|
615
|
-
FEXTOSC: {
|
|
616
|
-
setting: "FEXTOSC",
|
|
617
|
-
name: "fextoscConfig1",
|
|
618
|
-
description: "External Oscillator Selection",
|
|
619
|
-
type: "ComboBox",
|
|
620
|
-
group: "CONFIG1",
|
|
621
|
-
tabs: ["main"],
|
|
622
|
-
displayOptionSetting: "description",
|
|
623
|
-
category: "hardware",
|
|
624
|
-
sdlHelp: {
|
|
625
|
-
tooltip: "Click for more Information",
|
|
626
|
-
url:
|
|
627
|
-
"v2/keyword-lookup?keyword=atmel;device:${deviceName};register:${registerName}&redirect=true",
|
|
628
|
-
},
|
|
629
|
-
defaultValue: {
|
|
630
|
-
value: "EC (external clock) above 8 MHz",
|
|
631
|
-
options: [
|
|
632
|
-
"LP (crystal oscillator) optimized for 32.768 kHz",
|
|
633
|
-
"XT (crystal oscillator) above 100 kHz, below 8 MHz",
|
|
634
|
-
"HS (crystal oscillator) above 8 MHz",
|
|
635
|
-
"Reserved (DO NOT USE)",
|
|
636
|
-
"Oscillator not enabled",
|
|
637
|
-
"EC (external clock) below 100 kHz",
|
|
638
|
-
"EC (external clock) for 500 kHz to 8 MHz",
|
|
639
|
-
"EC (external clock) above 8 MHz",
|
|
640
|
-
],
|
|
641
|
-
},
|
|
642
|
-
},
|
|
643
|
-
},
|
|
644
|
-
};
|
|
645
|
-
return intfdata[int_name];
|
|
646
|
-
};
|
|
647
|
-
}
|
|
648
|
-
|
|
649
|
-
const derivedData = model?.getDerivedData() as DerivedData;
|
|
650
|
-
const derivedFunctions = derivedData?.getMyFunctions();
|
|
651
|
-
const alert_OSC_5: Processor.Alert[] = [
|
|
652
|
-
{
|
|
653
|
-
type: Processor.AlertTypes.Hint,
|
|
654
|
-
text:
|
|
655
|
-
'Please configure required "External Oscillator Selection" in System Module config bits',
|
|
656
|
-
},
|
|
657
|
-
{
|
|
658
|
-
type: Processor.AlertTypes.Warning,
|
|
659
|
-
text:
|
|
660
|
-
"The frequency selected does not fall within the PLL locking range. Therefore, the actual frequency produced by hardware maybe unpredictable when the PLL is enabled. Either change the clock frequency or select a different option in Oscillator select.",
|
|
661
|
-
},
|
|
662
|
-
{
|
|
663
|
-
type: Processor.AlertTypes.Warning,
|
|
664
|
-
text:
|
|
665
|
-
"External clock frequency is greater than recommended value (64000000 Hz)",
|
|
666
|
-
},
|
|
667
|
-
];
|
|
668
|
-
it("Test for Alerts value", () => {
|
|
669
|
-
expect(derivedFunctions.alerts?.()).toEqual(alert_OSC_5);
|
|
670
|
-
});
|
|
671
|
-
});
|
|
672
|
-
|
|
673
|
-
describe("Alert: Show Warning when clock source is 'EXTOSC with 4x PLL' and system clock is > 20000000 ", () => {
|
|
674
|
-
let mockModule = mockAssignedModule(mockState());
|
|
675
|
-
mockModule = {
|
|
676
|
-
...mockModule,
|
|
677
|
-
state: {
|
|
678
|
-
main: {
|
|
679
|
-
hardware: {
|
|
680
|
-
noscOsccon1: StringConstants.EXTOSC_4xPLL,
|
|
681
|
-
externalClk: 20000001,
|
|
682
|
-
ndivOsccon1: "1",
|
|
683
|
-
},
|
|
684
|
-
},
|
|
685
|
-
},
|
|
686
|
-
};
|
|
687
|
-
const model = getModel(mockModule, getDerivedData);
|
|
688
|
-
if (model) {
|
|
689
|
-
model.getImportValue = (int_name: string): any => {
|
|
690
|
-
const intfdata = {
|
|
691
|
-
config_request: {
|
|
692
|
-
FEXTOSC: {
|
|
693
|
-
setting: "FEXTOSC",
|
|
694
|
-
name: "fextoscConfig1",
|
|
695
|
-
description: "External Oscillator Selection",
|
|
696
|
-
type: "ComboBox",
|
|
697
|
-
group: "CONFIG1",
|
|
698
|
-
tabs: ["main"],
|
|
699
|
-
displayOptionSetting: "description",
|
|
700
|
-
category: "hardware",
|
|
701
|
-
sdlHelp: {
|
|
702
|
-
tooltip: "Click for more Information",
|
|
703
|
-
url:
|
|
704
|
-
"v2/keyword-lookup?keyword=atmel;device:${deviceName};register:${registerName}&redirect=true",
|
|
705
|
-
},
|
|
706
|
-
defaultValue: {
|
|
707
|
-
value: "LP (crystal oscillator) optimized for 32.768 kHz",
|
|
708
|
-
options: [
|
|
709
|
-
"LP (crystal oscillator) optimized for 32.768 kHz",
|
|
710
|
-
"XT (crystal oscillator) above 100 kHz, below 8 MHz",
|
|
711
|
-
"HS (crystal oscillator) above 8 MHz",
|
|
712
|
-
"Reserved (DO NOT USE)",
|
|
713
|
-
"Oscillator not enabled",
|
|
714
|
-
"EC (external clock) below 100 kHz",
|
|
715
|
-
"EC (external clock) for 500 kHz to 8 MHz",
|
|
716
|
-
"EC (external clock) above 8 MHz",
|
|
717
|
-
],
|
|
718
|
-
},
|
|
719
|
-
},
|
|
720
|
-
},
|
|
721
|
-
};
|
|
722
|
-
return intfdata[int_name];
|
|
723
|
-
};
|
|
724
|
-
}
|
|
725
|
-
|
|
726
|
-
const derivedData = model?.getDerivedData() as DerivedData;
|
|
727
|
-
const derivedFunctions = derivedData?.getMyFunctions();
|
|
728
|
-
const alert_OSC_6: Processor.Alert[] = [
|
|
729
|
-
{
|
|
730
|
-
type: Processor.AlertTypes.Hint,
|
|
731
|
-
text:
|
|
732
|
-
'Please configure required "External Oscillator Selection" in System Module config bits',
|
|
733
|
-
},
|
|
734
|
-
{
|
|
735
|
-
type: Processor.AlertTypes.Warning,
|
|
736
|
-
text:
|
|
737
|
-
"The frequency selected does not fall within the PLL locking range. Therefore, the actual frequency produced by hardware maybe unpredictable when the PLL is enabled. Either change the clock frequency or select a different option in Oscillator select.",
|
|
738
|
-
},
|
|
739
|
-
{
|
|
740
|
-
type: Processor.AlertTypes.Warning,
|
|
741
|
-
text:
|
|
742
|
-
"External clock frequency is greater than recommended value (20000000 Hz)",
|
|
743
|
-
},
|
|
744
|
-
];
|
|
745
|
-
it("Test for Alerts value", () => {
|
|
746
|
-
expect(derivedFunctions.alerts?.()).toEqual(alert_OSC_6);
|
|
747
|
-
});
|
|
748
|
-
});
|
|
749
|
-
|
|
750
|
-
describe("Alert: Show Warning when clock source is 'EXTOSC with 4x PLL' and system clock is > 32000000 ", () => {
|
|
751
|
-
let mockModule = mockAssignedModule(mockState());
|
|
752
|
-
mockModule = {
|
|
753
|
-
...mockModule,
|
|
754
|
-
state: {
|
|
755
|
-
main: {
|
|
756
|
-
hardware: {
|
|
757
|
-
noscOsccon1: StringConstants.EXTOSC_4xPLL,
|
|
758
|
-
externalClk: 32000001,
|
|
759
|
-
ndivOsccon1: "1",
|
|
760
|
-
},
|
|
761
|
-
},
|
|
762
|
-
},
|
|
763
|
-
};
|
|
764
|
-
const model = getModel(mockModule, getDerivedData);
|
|
765
|
-
if (model) {
|
|
766
|
-
model.getImportValue = (int_name: string): any => {
|
|
767
|
-
const intfdata = {
|
|
768
|
-
config_request: {
|
|
769
|
-
FEXTOSC: {
|
|
770
|
-
setting: "FEXTOSC",
|
|
771
|
-
name: "fextoscConfig1",
|
|
772
|
-
description: "External Oscillator Selection",
|
|
773
|
-
type: "ComboBox",
|
|
774
|
-
group: "CONFIG1",
|
|
775
|
-
tabs: ["main"],
|
|
776
|
-
displayOptionSetting: "description",
|
|
777
|
-
category: "hardware",
|
|
778
|
-
sdlHelp: {
|
|
779
|
-
tooltip: "Click for more Information",
|
|
780
|
-
url:
|
|
781
|
-
"v2/keyword-lookup?keyword=atmel;device:${deviceName};register:${registerName}&redirect=true",
|
|
782
|
-
},
|
|
783
|
-
defaultValue: {
|
|
784
|
-
value: "Oscillator not enabled",
|
|
785
|
-
options: [
|
|
786
|
-
"LP (crystal oscillator) optimized for 32.768 kHz",
|
|
787
|
-
"XT (crystal oscillator) above 100 kHz, below 8 MHz",
|
|
788
|
-
"HS (crystal oscillator) above 8 MHz",
|
|
789
|
-
"Reserved (DO NOT USE)",
|
|
790
|
-
"Oscillator not enabled",
|
|
791
|
-
"EC (external clock) below 100 kHz",
|
|
792
|
-
"EC (external clock) for 500 kHz to 8 MHz",
|
|
793
|
-
"EC (external clock) above 8 MHz",
|
|
794
|
-
],
|
|
795
|
-
},
|
|
796
|
-
},
|
|
797
|
-
},
|
|
798
|
-
};
|
|
799
|
-
return intfdata[int_name];
|
|
800
|
-
};
|
|
801
|
-
}
|
|
802
|
-
|
|
803
|
-
const derivedData = model?.getDerivedData() as DerivedData;
|
|
804
|
-
const derivedFunctions = derivedData?.getMyFunctions();
|
|
805
|
-
const alert_OSC_7: Processor.Alert[] = [
|
|
806
|
-
{
|
|
807
|
-
type: Processor.AlertTypes.Hint,
|
|
808
|
-
text:
|
|
809
|
-
'Please configure required "External Oscillator Selection" in System Module config bits',
|
|
810
|
-
},
|
|
811
|
-
{
|
|
812
|
-
type: Processor.AlertTypes.Warning,
|
|
813
|
-
text:
|
|
814
|
-
"The frequency selected does not fall within the PLL locking range. Therefore, the actual frequency produced by hardware maybe unpredictable when the PLL is enabled. Either change the clock frequency or select a different option in Oscillator select.",
|
|
815
|
-
},
|
|
816
|
-
{
|
|
817
|
-
type: Processor.AlertTypes.Warning,
|
|
818
|
-
text:
|
|
819
|
-
"External clock frequency is greater than recommended value (32000000 Hz)",
|
|
820
|
-
},
|
|
821
|
-
];
|
|
822
|
-
it("Test for Alerts value", () => {
|
|
823
|
-
expect(derivedFunctions.alerts?.()).toEqual(alert_OSC_7);
|
|
824
|
-
});
|
|
825
|
-
});
|
|
826
|
-
});
|
|
827
|
-
|
|
828
|
-
describe("API test Cases ", () => {
|
|
829
|
-
describe("DerivedData for APIs -- >", () => {
|
|
830
|
-
let mockModule = mockAssignedModule(mockState());
|
|
831
|
-
mockModule = {
|
|
832
|
-
...mockModule,
|
|
833
|
-
state: {
|
|
834
|
-
main: {
|
|
835
|
-
hardware: {
|
|
836
|
-
noscOsccon1: "HFINTOSC",
|
|
837
|
-
},
|
|
838
|
-
},
|
|
839
|
-
},
|
|
840
|
-
};
|
|
841
|
-
const model = getModel(mockModule, getDerivedData);
|
|
842
|
-
const derivedData = model?.getDerivedData() as DerivedData;
|
|
843
|
-
const derivedFunctions = derivedData?.getMyFunctions();
|
|
844
|
-
|
|
845
|
-
it("Test for moduleName()", () => {
|
|
846
|
-
expect(derivedFunctions?.moduleName?.()).toEqual("Clock Control");
|
|
847
|
-
});
|
|
848
|
-
|
|
849
|
-
it("Test for isEnabled()", () => {
|
|
850
|
-
expect(derivedFunctions?.isEnabled?.("currentSystemClk")).toEqual(false);
|
|
851
|
-
expect(derivedFunctions?.isEnabled?.("hffrqOscfrq")).toEqual(true);
|
|
852
|
-
});
|
|
853
|
-
|
|
854
|
-
it("Test for isVisible() - 1", () => {
|
|
855
|
-
expect(derivedFunctions?.isVisible?.("hffrqOscfrq")).toEqual(true);
|
|
856
|
-
expect(derivedFunctions?.isVisible?.("lfIntOscFreq")).toEqual(false);
|
|
857
|
-
expect(derivedFunctions?.isVisible?.("externalClk")).toEqual(false);
|
|
858
|
-
});
|
|
859
|
-
|
|
860
|
-
it("Test for isVisible() - 2", () => {
|
|
861
|
-
mockModule = {
|
|
862
|
-
...mockModule,
|
|
863
|
-
state: {
|
|
864
|
-
main: {
|
|
865
|
-
hardware: {
|
|
866
|
-
noscOsccon1: "LFINTOSC",
|
|
867
|
-
},
|
|
868
|
-
},
|
|
869
|
-
},
|
|
870
|
-
};
|
|
871
|
-
const model = getModel(mockModule, getDerivedData);
|
|
872
|
-
const derivedData = model?.getDerivedData() as DerivedData;
|
|
873
|
-
const derivedFunctions = derivedData?.getMyFunctions();
|
|
874
|
-
|
|
875
|
-
expect(derivedFunctions?.isVisible?.("lfIntOscFreq")).toEqual(true);
|
|
876
|
-
expect(derivedFunctions?.isVisible?.("hffrqOscfrq")).toEqual(false);
|
|
877
|
-
});
|
|
878
|
-
|
|
879
|
-
it("Test for isVisible() - 3", () => {
|
|
880
|
-
mockModule = {
|
|
881
|
-
...mockModule,
|
|
882
|
-
state: {
|
|
883
|
-
main: {
|
|
884
|
-
hardware: {
|
|
885
|
-
noscOsccon1: "EXTOSC",
|
|
886
|
-
},
|
|
887
|
-
},
|
|
888
|
-
},
|
|
889
|
-
};
|
|
890
|
-
const model = getModel(mockModule, getDerivedData);
|
|
891
|
-
const derivedData = model?.getDerivedData() as DerivedData;
|
|
892
|
-
const derivedFunctions = derivedData?.getMyFunctions();
|
|
893
|
-
|
|
894
|
-
expect(derivedFunctions?.isVisible?.("externalClk")).toEqual(true);
|
|
895
|
-
});
|
|
896
|
-
|
|
897
|
-
it("Test for isVisible() - 4", () => {
|
|
898
|
-
mockModule = {
|
|
899
|
-
...mockModule,
|
|
900
|
-
state: {
|
|
901
|
-
main: {
|
|
902
|
-
hardware: {
|
|
903
|
-
noscOsccon1: "HFINTOSC with 2x PLL",
|
|
904
|
-
},
|
|
905
|
-
},
|
|
906
|
-
},
|
|
907
|
-
};
|
|
908
|
-
const model = getModel(mockModule, getDerivedData);
|
|
909
|
-
const derivedData = model?.getDerivedData() as DerivedData;
|
|
910
|
-
const derivedFunctions = derivedData?.getMyFunctions();
|
|
911
|
-
|
|
912
|
-
expect(derivedFunctions?.isVisible?.("hffrqOscfrq")).toEqual(true);
|
|
913
|
-
});
|
|
914
|
-
});
|
|
915
|
-
});
|
|
916
|
-
|
|
917
|
-
describe("EmptyDerivedData test Cases ", () => {
|
|
918
|
-
it("Test case - 1", () => {
|
|
919
|
-
expect(new EmptyDerivedData().getMyFunctions()).toStrictEqual({});
|
|
920
|
-
expect(new EmptyDerivedData().getModel()).toBeUndefined();
|
|
921
|
-
expect(getDerivedData(undefined)).toBeDefined();
|
|
922
|
-
});
|
|
923
|
-
|
|
924
|
-
it("Test case - 2", () => {
|
|
925
|
-
expect(getDerivedData(undefined)).toBeDefined();
|
|
926
|
-
});
|
|
927
|
-
});
|