xdbc 1.0.217 → 1.0.218

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.
Files changed (89) hide show
  1. package/.gitattributes +8 -0
  2. package/.vscode/settings.json +3 -3
  3. package/.vscode/tasks.json +23 -23
  4. package/ASSESSMENT.md +249 -0
  5. package/README.md +131 -1
  6. package/__tests__/DBC/AE.test.ts +62 -62
  7. package/__tests__/DBC/ARRAY.test.ts +91 -91
  8. package/__tests__/DBC/DEFINED.test.ts +53 -53
  9. package/__tests__/DBC/DOM.test.ts +481 -0
  10. package/__tests__/DBC/Decorators.test.ts +367 -367
  11. package/__tests__/DBC/EQ.test.ts +13 -13
  12. package/__tests__/DBC/GREATER.test.ts +31 -31
  13. package/__tests__/DBC/HasAttribute.test.ts +60 -60
  14. package/__tests__/DBC/IF.test.ts +62 -62
  15. package/__tests__/DBC/INSTANCE.test.ts +13 -13
  16. package/__tests__/DBC/JSON.OP.test.ts +47 -47
  17. package/__tests__/DBC/JSON.Parse.test.ts +17 -17
  18. package/__tests__/DBC/OR.test.ts +14 -14
  19. package/__tests__/DBC/PLAIN_OBJECT.test.ts +109 -109
  20. package/__tests__/DBC/REGEX.test.ts +17 -17
  21. package/__tests__/DBC/TYPE.test.ts +13 -13
  22. package/__tests__/DBC/UNDEFINED.test.ts +45 -45
  23. package/__tests__/DBC/ZOD.test.ts +54 -54
  24. package/__tests__/DBC/onInfringement.test.ts +262 -0
  25. package/biome.json +40 -40
  26. package/dist/DBC/AE.js +172 -0
  27. package/dist/DBC/ARR/PLAIN_OBJECT.d.ts +0 -3
  28. package/dist/DBC/ARR/PLAIN_OBJECT.js +95 -0
  29. package/dist/DBC/ARRAY.d.ts +0 -3
  30. package/dist/DBC/ARRAY.js +90 -0
  31. package/dist/DBC/COMPARISON/GREATER.js +21 -0
  32. package/dist/DBC/COMPARISON/GREATER_OR_EQUAL.js +21 -0
  33. package/dist/DBC/COMPARISON/LESS.js +21 -0
  34. package/dist/DBC/COMPARISON/LESS_OR_EQUAL.js +21 -0
  35. package/dist/DBC/COMPARISON.js +98 -0
  36. package/dist/DBC/DEFINED.js +87 -0
  37. package/dist/DBC/DOM.d.ts +87 -0
  38. package/dist/DBC/DOM.js +223 -0
  39. package/dist/DBC/EQ/DIFFERENT.js +34 -0
  40. package/dist/DBC/EQ.js +101 -0
  41. package/dist/DBC/HasAttribute.js +101 -0
  42. package/dist/DBC/IF.js +96 -0
  43. package/dist/DBC/INSTANCE.js +122 -0
  44. package/dist/DBC/JSON.OP.js +120 -0
  45. package/dist/DBC/JSON.Parse.js +104 -0
  46. package/dist/DBC/OR.js +125 -0
  47. package/dist/DBC/REGEX.js +136 -0
  48. package/dist/DBC/TYPE.js +112 -0
  49. package/dist/DBC/UNDEFINED.js +87 -0
  50. package/dist/DBC/ZOD.js +99 -0
  51. package/dist/DBC.d.ts +18 -4
  52. package/dist/DBC.js +645 -0
  53. package/dist/Demo.d.ts +10 -0
  54. package/dist/Demo.js +713 -0
  55. package/dist/bundle.js +6140 -405
  56. package/dist/index.d.ts +22 -0
  57. package/dist/index.js +22 -0
  58. package/jest.config.js +32 -32
  59. package/package.json +71 -55
  60. package/src/DBC/AE.ts +269 -288
  61. package/src/DBC/ARR/PLAIN_OBJECT.ts +122 -133
  62. package/src/DBC/ARRAY.ts +117 -127
  63. package/src/DBC/COMPARISON/GREATER.ts +41 -46
  64. package/src/DBC/COMPARISON/GREATER_OR_EQUAL.ts +41 -45
  65. package/src/DBC/COMPARISON/LESS.ts +41 -45
  66. package/src/DBC/COMPARISON/LESS_OR_EQUAL.ts +41 -45
  67. package/src/DBC/COMPARISON.ts +149 -159
  68. package/src/DBC/DEFINED.ts +117 -122
  69. package/src/DBC/DOM.ts +291 -0
  70. package/src/DBC/EQ/DIFFERENT.ts +51 -57
  71. package/src/DBC/EQ.ts +154 -163
  72. package/src/DBC/HasAttribute.ts +149 -154
  73. package/src/DBC/IF.ts +173 -179
  74. package/src/DBC/INSTANCE.ts +168 -171
  75. package/src/DBC/JSON.OP.ts +178 -186
  76. package/src/DBC/JSON.Parse.ts +150 -157
  77. package/src/DBC/OR.ts +183 -187
  78. package/src/DBC/REGEX.ts +195 -196
  79. package/src/DBC/TYPE.ts +142 -149
  80. package/src/DBC/UNDEFINED.ts +115 -117
  81. package/src/DBC/ZOD.ts +130 -135
  82. package/src/DBC.ts +902 -904
  83. package/src/Demo.ts +537 -404
  84. package/src/index.ts +22 -0
  85. package/tsconfig.json +18 -18
  86. package/tsconfig.test.json +7 -7
  87. package/typedoc.json +16 -16
  88. package/webpack.config.js +27 -27
  89. package/Assessment.md +0 -507
package/dist/Demo.js ADDED
@@ -0,0 +1,713 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ var __metadata = (this && this.__metadata) || function (k, v) {
8
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
+ };
10
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
11
+ return function (target, key) { decorator(target, key, paramIndex); }
12
+ };
13
+ import { z } from "zod";
14
+ import { DBC } from "./DBC";
15
+ import { AE } from "./DBC/AE";
16
+ import { PLAIN_OBJECT } from "./DBC/ARR/PLAIN_OBJECT";
17
+ import { ARRAY } from "./DBC/ARRAY";
18
+ import { GREATER } from "./DBC/COMPARISON/GREATER";
19
+ import { GREATER_OR_EQUAL } from "./DBC/COMPARISON/GREATER_OR_EQUAL";
20
+ import { LESS } from "./DBC/COMPARISON/LESS";
21
+ import { LESS_OR_EQUAL } from "./DBC/COMPARISON/LESS_OR_EQUAL";
22
+ import { DEFINED } from "./DBC/DEFINED";
23
+ import { EQ } from "./DBC/EQ";
24
+ import { DIFFERENT } from "./DBC/EQ/DIFFERENT";
25
+ import { HasAttribute } from "./DBC/HasAttribute";
26
+ import { IF } from "./DBC/IF";
27
+ import { INSTANCE } from "./DBC/INSTANCE";
28
+ import { JSON_OP } from "./DBC/JSON.OP";
29
+ import { JSON_Parse } from "./DBC/JSON.Parse";
30
+ import { OR } from "./DBC/OR";
31
+ import { REGEX } from "./DBC/REGEX";
32
+ import { TYPE } from "./DBC/TYPE";
33
+ import { UNDEFINED } from "./DBC/UNDEFINED";
34
+ import { ZOD } from "./DBC/ZOD";
35
+ /** Demonstrative use of **D**esign **B**y **C**ontract Decorators */
36
+ export class Demo {
37
+ constructor() {
38
+ // #region Check Property Decorator
39
+ this.testProperty = "a";
40
+ // #endregion Check Static Method with ParamvalueProvider
41
+ }
42
+ // #endregion Check Property Decorator
43
+ // #region Check Parameter. & Returnvalue Decorator
44
+ testParamvalueAndReturnvalue(a) {
45
+ return `xxxx${a}`;
46
+ }
47
+ // #endregion Check Parameter. & Returnvalue Decorator
48
+ // #region Check Returnvalue Decorator
49
+ testReturnvalue(a) {
50
+ return a;
51
+ }
52
+ // #endregion Check Returnvalue Decorator
53
+ // #region Check EQ-DBC & Path to property of Parameter-value
54
+ testEQAndPath(o) { }
55
+ // #endregion Check EQ-DBC & Path to property of Parameter-value
56
+ // #region Check EQ-DBC & Path to property of Parameter-value with Inversion
57
+ testEQAndPathWithInversion(o) { }
58
+ // #endregion Check EQ-DBC & Path to property of Parameter-value with Inversion
59
+ // #region Check TYPE
60
+ testTYPE(o) { }
61
+ // #endregion Check TYPE
62
+ // #region Check AE
63
+ testAE(x) { }
64
+ // #endregion Check AE
65
+ // #region Check REGEX with AE
66
+ testREGEXWithAE(x) { }
67
+ // #endregion Check REGEX with AE
68
+ // #region Check INSTANCE
69
+ testINSTANCE(candidate) { }
70
+ // #endregion Check INSTANCE
71
+ // #region Check AE Range
72
+ testAERange(x) { }
73
+ // #endregion Check AE Range
74
+ // #region Check AE Index
75
+ testAEIndex(x) { }
76
+ // #endregion Check AE Index
77
+ // #region Check Comparison
78
+ testGREATER(input) { }
79
+ testGREATER_OR_EQUAL(input) { }
80
+ testLESS(input) { }
81
+ testLESS_OR_EQUAL(input) { }
82
+ testDIFFERENT(input) { }
83
+ // #endregion Check Comparison
84
+ // #region Check ARRAY
85
+ testARRAY(x) { }
86
+ // #endregion Check ARRAY
87
+ // #region Check PLAIN_OBJECT
88
+ testPLAIN_OBJECT(x) { }
89
+ // #endregion Check PLAIN_OBJECT
90
+ // #region Check DEFINED
91
+ testDEFINED(x) { }
92
+ // #endregion Check DEFINED
93
+ // #region Check UNDEFINED
94
+ testUNDEFINED(x) { }
95
+ // #endregion Check UNDEFINED
96
+ // #region Check HasAttribute
97
+ testHasAttribute(el) { }
98
+ // #endregion Check HasAttribute
99
+ // #region Check IF
100
+ testIF(x) { }
101
+ // #endregion Check IF
102
+ // #region Check OR
103
+ testOR(x) { }
104
+ // #endregion Check OR
105
+ // #region Check JSON_OP
106
+ testJSON_OP(x) { }
107
+ // #endregion Check JSON_OP
108
+ // #region Check JSON_Parse
109
+ testJSON_Parse(x) { }
110
+ // #endregion Check JSON_Parse
111
+ // #region Check ZOD
112
+ testZOD(x) { }
113
+ // #endregion Check ZOD
114
+ // #region Check Static Method with ParamvalueProvider
115
+ static testStaticMethod(message, count) {
116
+ return `${message} repeated ${count} times`;
117
+ }
118
+ }
119
+ __decorate([
120
+ REGEX.INVARIANT(/^a$/),
121
+ __metadata("design:type", Object)
122
+ ], Demo.prototype, "testProperty", void 0);
123
+ __decorate([
124
+ REGEX.POST(/^xxxx.*$/),
125
+ DBC.ParamvalueProvider,
126
+ __param(0, REGEX.PRE(/holla*/g)),
127
+ __metadata("design:type", Function),
128
+ __metadata("design:paramtypes", [String]),
129
+ __metadata("design:returntype", String)
130
+ ], Demo.prototype, "testParamvalueAndReturnvalue", null);
131
+ __decorate([
132
+ REGEX.POST(/^xxxx.*$/),
133
+ __metadata("design:type", Function),
134
+ __metadata("design:paramtypes", [String]),
135
+ __metadata("design:returntype", String)
136
+ ], Demo.prototype, "testReturnvalue", null);
137
+ __decorate([
138
+ DBC.ParamvalueProvider,
139
+ __param(0, EQ.PRE("SELECT", false, "tagName")),
140
+ __metadata("design:type", Function),
141
+ __metadata("design:paramtypes", [HTMLElement]),
142
+ __metadata("design:returntype", void 0)
143
+ ], Demo.prototype, "testEQAndPath", null);
144
+ __decorate([
145
+ DBC.ParamvalueProvider,
146
+ __param(0, EQ.PRE("SELECT", true, "tagName")),
147
+ __metadata("design:type", Function),
148
+ __metadata("design:paramtypes", [HTMLElement]),
149
+ __metadata("design:returntype", void 0)
150
+ ], Demo.prototype, "testEQAndPathWithInversion", null);
151
+ __decorate([
152
+ DBC.ParamvalueProvider,
153
+ __param(0, TYPE.PRE("string")),
154
+ __metadata("design:type", Function),
155
+ __metadata("design:paramtypes", [Object]),
156
+ __metadata("design:returntype", void 0)
157
+ ], Demo.prototype, "testTYPE", null);
158
+ __decorate([
159
+ DBC.ParamvalueProvider,
160
+ __param(0, AE.PRE([new TYPE("string")])),
161
+ __metadata("design:type", Function),
162
+ __metadata("design:paramtypes", [Array]),
163
+ __metadata("design:returntype", void 0)
164
+ ], Demo.prototype, "testAE", null);
165
+ __decorate([
166
+ DBC.ParamvalueProvider,
167
+ __param(0, AE.PRE(new REGEX(/^(?i:(NOW)|([+-]\d+[dmy]))$/i))),
168
+ __metadata("design:type", Function),
169
+ __metadata("design:paramtypes", [Array]),
170
+ __metadata("design:returntype", void 0)
171
+ ], Demo.prototype, "testREGEXWithAE", null);
172
+ __decorate([
173
+ DBC.ParamvalueProvider,
174
+ __param(0, INSTANCE.PRE(Date)),
175
+ __metadata("design:type", Function),
176
+ __metadata("design:paramtypes", [Object]),
177
+ __metadata("design:returntype", void 0)
178
+ ], Demo.prototype, "testINSTANCE", null);
179
+ __decorate([
180
+ DBC.ParamvalueProvider,
181
+ __param(0, AE.PRE([new TYPE("string"), new REGEX(/^abc$/)], 1, 2)),
182
+ __metadata("design:type", Function),
183
+ __metadata("design:paramtypes", [Array]),
184
+ __metadata("design:returntype", void 0)
185
+ ], Demo.prototype, "testAERange", null);
186
+ __decorate([
187
+ DBC.ParamvalueProvider,
188
+ __param(0, AE.PRE([new TYPE("string"), new REGEX(/^abc$/)], 1)),
189
+ __metadata("design:type", Function),
190
+ __metadata("design:paramtypes", [Array]),
191
+ __metadata("design:returntype", void 0)
192
+ ], Demo.prototype, "testAEIndex", null);
193
+ __decorate([
194
+ DBC.ParamvalueProvider,
195
+ __param(0, GREATER.PRE(2)),
196
+ __metadata("design:type", Function),
197
+ __metadata("design:paramtypes", [Number]),
198
+ __metadata("design:returntype", void 0)
199
+ ], Demo.prototype, "testGREATER", null);
200
+ __decorate([
201
+ DBC.ParamvalueProvider,
202
+ __param(0, GREATER_OR_EQUAL.PRE(2)),
203
+ __metadata("design:type", Function),
204
+ __metadata("design:paramtypes", [Number]),
205
+ __metadata("design:returntype", void 0)
206
+ ], Demo.prototype, "testGREATER_OR_EQUAL", null);
207
+ __decorate([
208
+ DBC.ParamvalueProvider,
209
+ __param(0, LESS.PRE(20)),
210
+ __metadata("design:type", Function),
211
+ __metadata("design:paramtypes", [Number]),
212
+ __metadata("design:returntype", void 0)
213
+ ], Demo.prototype, "testLESS", null);
214
+ __decorate([
215
+ DBC.ParamvalueProvider,
216
+ __param(0, LESS_OR_EQUAL.PRE(20)),
217
+ __metadata("design:type", Function),
218
+ __metadata("design:paramtypes", [Number]),
219
+ __metadata("design:returntype", void 0)
220
+ ], Demo.prototype, "testLESS_OR_EQUAL", null);
221
+ __decorate([
222
+ DBC.ParamvalueProvider,
223
+ __param(0, DIFFERENT.PRE(20)),
224
+ __metadata("design:type", Function),
225
+ __metadata("design:paramtypes", [Number]),
226
+ __metadata("design:returntype", void 0)
227
+ ], Demo.prototype, "testDIFFERENT", null);
228
+ __decorate([
229
+ DBC.ParamvalueProvider,
230
+ __param(0, ARRAY.PRE()),
231
+ __metadata("design:type", Function),
232
+ __metadata("design:paramtypes", [Object]),
233
+ __metadata("design:returntype", void 0)
234
+ ], Demo.prototype, "testARRAY", null);
235
+ __decorate([
236
+ DBC.ParamvalueProvider,
237
+ __param(0, PLAIN_OBJECT.PRE()),
238
+ __metadata("design:type", Function),
239
+ __metadata("design:paramtypes", [Object]),
240
+ __metadata("design:returntype", void 0)
241
+ ], Demo.prototype, "testPLAIN_OBJECT", null);
242
+ __decorate([
243
+ DBC.ParamvalueProvider,
244
+ __param(0, DEFINED.PRE()),
245
+ __metadata("design:type", Function),
246
+ __metadata("design:paramtypes", [Object]),
247
+ __metadata("design:returntype", void 0)
248
+ ], Demo.prototype, "testDEFINED", null);
249
+ __decorate([
250
+ DBC.ParamvalueProvider,
251
+ __param(0, UNDEFINED.PRE()),
252
+ __metadata("design:type", Function),
253
+ __metadata("design:paramtypes", [Object]),
254
+ __metadata("design:returntype", void 0)
255
+ ], Demo.prototype, "testUNDEFINED", null);
256
+ __decorate([
257
+ DBC.ParamvalueProvider,
258
+ __param(0, HasAttribute.PRE("data-test")),
259
+ __metadata("design:type", Function),
260
+ __metadata("design:paramtypes", [HTMLElement]),
261
+ __metadata("design:returntype", void 0)
262
+ ], Demo.prototype, "testHasAttribute", null);
263
+ __decorate([
264
+ DBC.ParamvalueProvider,
265
+ __param(0, IF.PRE(new TYPE("string"), new REGEX(/^hello/))),
266
+ __metadata("design:type", Function),
267
+ __metadata("design:paramtypes", [Object]),
268
+ __metadata("design:returntype", void 0)
269
+ ], Demo.prototype, "testIF", null);
270
+ __decorate([
271
+ DBC.ParamvalueProvider,
272
+ __param(0, OR.PRE([new TYPE("string"), new TYPE("number")])),
273
+ __metadata("design:type", Function),
274
+ __metadata("design:paramtypes", [Object]),
275
+ __metadata("design:returntype", void 0)
276
+ ], Demo.prototype, "testOR", null);
277
+ __decorate([
278
+ DBC.ParamvalueProvider,
279
+ __param(0, JSON_OP.PRE([{ name: "id", type: "number" }])),
280
+ __metadata("design:type", Function),
281
+ __metadata("design:paramtypes", [Object]),
282
+ __metadata("design:returntype", void 0)
283
+ ], Demo.prototype, "testJSON_OP", null);
284
+ __decorate([
285
+ DBC.ParamvalueProvider,
286
+ __param(0, JSON_Parse.PRE((_json) => { })),
287
+ __metadata("design:type", Function),
288
+ __metadata("design:paramtypes", [String]),
289
+ __metadata("design:returntype", void 0)
290
+ ], Demo.prototype, "testJSON_Parse", null);
291
+ __decorate([
292
+ DBC.ParamvalueProvider,
293
+ __param(0, ZOD.PRE(z.string())),
294
+ __metadata("design:type", Function),
295
+ __metadata("design:paramtypes", [Object]),
296
+ __metadata("design:returntype", void 0)
297
+ ], Demo.prototype, "testZOD", null);
298
+ __decorate([
299
+ DBC.ParamvalueProvider,
300
+ __param(0, TYPE.PRE("string")),
301
+ __param(1, TYPE.PRE("number")),
302
+ __metadata("design:type", Function),
303
+ __metadata("design:paramtypes", [String, Number]),
304
+ __metadata("design:returntype", String)
305
+ ], Demo, "testStaticMethod", null);
306
+ const demo = new Demo();
307
+ try {
308
+ demo.testProperty = "abd";
309
+ }
310
+ catch (X) {
311
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
312
+ console.log("INVARIANT Infringement", "OK");
313
+ console.log(X);
314
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
315
+ }
316
+ demo.testProperty = "a";
317
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
318
+ console.log("INVARIANT OK");
319
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
320
+ demo.testParamvalueAndReturnvalue("holla");
321
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
322
+ console.log("PARAMETER- & RETURNVALUE OK");
323
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
324
+ try {
325
+ demo.testParamvalueAndReturnvalue("yyyy");
326
+ }
327
+ catch (X) {
328
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
329
+ console.log("PARAMETER- & RETURNVALUE Infringement", "OK");
330
+ console.log(X);
331
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
332
+ }
333
+ demo.testReturnvalue("xxxx");
334
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
335
+ console.log("RETURNVALUE OK");
336
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
337
+ try {
338
+ demo.testReturnvalue("yyyy");
339
+ }
340
+ catch (X) {
341
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
342
+ console.log("RETURNVALUE Infringement", "OK");
343
+ console.log(X);
344
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
345
+ }
346
+ demo.testEQAndPath(document.createElement("select"));
347
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
348
+ console.log("EQ with Path Infringement OK");
349
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
350
+ try {
351
+ demo.testEQAndPathWithInversion(document.createElement("select"));
352
+ }
353
+ catch (X) {
354
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
355
+ console.log("EQ with Path and Inversion Infringement OK");
356
+ console.log(X);
357
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
358
+ }
359
+ demo.testTYPE("x");
360
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
361
+ console.log("TYPE OK");
362
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
363
+ try {
364
+ demo.testTYPE(0);
365
+ }
366
+ catch (X) {
367
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
368
+ console.log("TYPE Infringement OK");
369
+ console.log(X);
370
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
371
+ }
372
+ demo.testAE(["11", "10", "b"]);
373
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
374
+ console.log("AE OK");
375
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
376
+ try {
377
+ demo.testAE(["11", 11, "b"]);
378
+ }
379
+ catch (X) {
380
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
381
+ console.log("AE Infringement OK");
382
+ console.log(X);
383
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
384
+ }
385
+ demo.testREGEXWithAE(["+1d", "NOW", "-10y"]);
386
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
387
+ console.log("REGEX with AE OK");
388
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
389
+ try {
390
+ demo.testREGEXWithAE(["+1d", "+5d", "-x10y"]);
391
+ }
392
+ catch (X) {
393
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
394
+ console.log("REGEX with AE Infringement OK");
395
+ console.log(X);
396
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
397
+ }
398
+ demo.testINSTANCE(new Date());
399
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
400
+ console.log("INSTANCE OK");
401
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
402
+ try {
403
+ demo.testINSTANCE(demo);
404
+ }
405
+ catch (X) {
406
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
407
+ console.log("INSTANCE Infringement OK");
408
+ console.log(X);
409
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
410
+ }
411
+ demo.testAERange([11, "abc", "abc"]);
412
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
413
+ console.log("AE Range OK");
414
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
415
+ try {
416
+ demo.testAERange([11, "abc", /a/g]);
417
+ }
418
+ catch (X) {
419
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
420
+ console.log("AE Range Infringement OK");
421
+ console.log(X);
422
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
423
+ }
424
+ demo.testAEIndex([11, "abc", "abc"]);
425
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
426
+ console.log("AE Index OK");
427
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
428
+ try {
429
+ demo.testAEIndex(["11", 12, "/a/g"]);
430
+ }
431
+ catch (X) {
432
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
433
+ console.log("AE Index Infringement OK");
434
+ console.log(X);
435
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
436
+ }
437
+ demo.testGREATER(11);
438
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
439
+ console.log("GREATER OK");
440
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
441
+ try {
442
+ demo.testGREATER(2);
443
+ }
444
+ catch (X) {
445
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
446
+ console.log("GREATER Infringement OK");
447
+ console.log(X);
448
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
449
+ }
450
+ demo.testGREATER_OR_EQUAL(2);
451
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
452
+ console.log("GREATER_OR_EQUAL OK");
453
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
454
+ try {
455
+ demo.testGREATER_OR_EQUAL(1);
456
+ }
457
+ catch (X) {
458
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
459
+ console.log("GREATER_OR_EQUAL Infringement OK");
460
+ console.log(X);
461
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
462
+ }
463
+ demo.testLESS(10);
464
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
465
+ console.log("LESS OK");
466
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
467
+ try {
468
+ demo.testLESS(20);
469
+ }
470
+ catch (X) {
471
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
472
+ console.log("LESS Infringement OK");
473
+ console.log(X);
474
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
475
+ }
476
+ demo.testLESS_OR_EQUAL(20);
477
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
478
+ console.log("LESS OK");
479
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
480
+ try {
481
+ demo.testLESS_OR_EQUAL(21);
482
+ }
483
+ catch (X) {
484
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
485
+ console.log("LESS_OR_EQUAL Infringement OK");
486
+ console.log(X);
487
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
488
+ }
489
+ demo.testDIFFERENT(21);
490
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
491
+ console.log("DIFFERENT OK");
492
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
493
+ try {
494
+ demo.testDIFFERENT(20);
495
+ }
496
+ catch (X) {
497
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
498
+ console.log("DIFFERENT Infringement OK");
499
+ console.log(X);
500
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
501
+ }
502
+ // #region Inactivity Checks
503
+ window.WaXCode.DBC.executionSettings.checkPreconditions = false;
504
+ try {
505
+ demo.testLESS_OR_EQUAL(21);
506
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
507
+ console.log("INACTIVE PRECONDITIONS OK");
508
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
509
+ }
510
+ catch (X) {
511
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
512
+ console.log("INACTIVE PRECONDITIONS FAILED");
513
+ console.log(X);
514
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
515
+ }
516
+ window.WaXCode.DBC.executionSettings.checkPostconditions = false;
517
+ try {
518
+ demo.testReturnvalue("qqqqq");
519
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
520
+ console.log("INACTIVE POSTCONDITIONS OK");
521
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
522
+ }
523
+ catch (X) {
524
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
525
+ console.log("INACTIVE POSTCONDITIONS FAILED");
526
+ console.log(X);
527
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
528
+ }
529
+ window.WaXCode.DBC.executionSettings.checkInvariants = false;
530
+ try {
531
+ demo.testProperty = "b";
532
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
533
+ console.log("INACTIVE INVARIANTS OK");
534
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
535
+ }
536
+ catch (X) {
537
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
538
+ console.log("INACTIVE INVARIANTS FAILED");
539
+ console.log(X);
540
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
541
+ }
542
+ // #endregion Inactivity Checks
543
+ // Re-enable all checks for subsequent tests
544
+ window.WaXCode.DBC.executionSettings.checkPreconditions = true;
545
+ window.WaXCode.DBC.executionSettings.checkPostconditions = true;
546
+ window.WaXCode.DBC.executionSettings.checkInvariants = true;
547
+ // #region Static Method Test
548
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
549
+ console.log("TESTING STATIC METHOD WITH PARAMVALUEPROVIDER");
550
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
551
+ Demo.testStaticMethod("Hello", 3);
552
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
553
+ console.log("STATIC METHOD OK");
554
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
555
+ try {
556
+ Demo.testStaticMethod("Hello", "not a number");
557
+ }
558
+ catch (X) {
559
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
560
+ console.log("STATIC METHOD Infringement OK");
561
+ console.log(X);
562
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
563
+ }
564
+ try {
565
+ Demo.testStaticMethod(123, 5);
566
+ }
567
+ catch (X) {
568
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
569
+ console.log("STATIC METHOD Infringement (first param) OK");
570
+ console.log(X);
571
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
572
+ }
573
+ // #endregion Static Method Test
574
+ demo.testARRAY([1, 2, 3]);
575
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
576
+ console.log("ARRAY OK");
577
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
578
+ try {
579
+ demo.testARRAY("not an array");
580
+ }
581
+ catch (X) {
582
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
583
+ console.log("ARRAY Infringement OK");
584
+ console.log(X);
585
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
586
+ }
587
+ demo.testPLAIN_OBJECT({ key: "value" });
588
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
589
+ console.log("PLAIN_OBJECT OK");
590
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
591
+ try {
592
+ demo.testPLAIN_OBJECT([1, 2, 3]);
593
+ }
594
+ catch (X) {
595
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
596
+ console.log("PLAIN_OBJECT Infringement OK");
597
+ console.log(X);
598
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
599
+ }
600
+ demo.testDEFINED("something");
601
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
602
+ console.log("DEFINED OK");
603
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
604
+ try {
605
+ demo.testDEFINED(null);
606
+ }
607
+ catch (X) {
608
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
609
+ console.log("DEFINED Infringement OK");
610
+ console.log(X);
611
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
612
+ }
613
+ demo.testUNDEFINED(undefined);
614
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
615
+ console.log("UNDEFINED OK");
616
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
617
+ try {
618
+ demo.testUNDEFINED("not undefined");
619
+ }
620
+ catch (X) {
621
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
622
+ console.log("UNDEFINED Infringement OK");
623
+ console.log(X);
624
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
625
+ }
626
+ const elWithAttr = document.createElement("div");
627
+ elWithAttr.setAttribute("data-test", "");
628
+ demo.testHasAttribute(elWithAttr);
629
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
630
+ console.log("HasAttribute OK");
631
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
632
+ try {
633
+ demo.testHasAttribute(document.createElement("div"));
634
+ }
635
+ catch (X) {
636
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
637
+ console.log("HasAttribute Infringement OK");
638
+ console.log(X);
639
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
640
+ }
641
+ demo.testIF(42);
642
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
643
+ console.log("IF OK (non-string, condition not triggered)");
644
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
645
+ demo.testIF("helloWorld");
646
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
647
+ console.log("IF OK (string matching regex)");
648
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
649
+ try {
650
+ demo.testIF("world");
651
+ }
652
+ catch (X) {
653
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
654
+ console.log("IF Infringement OK (string not matching regex)");
655
+ console.log(X);
656
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
657
+ }
658
+ demo.testOR("hello");
659
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
660
+ console.log("OR OK (string)");
661
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
662
+ demo.testOR(42);
663
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
664
+ console.log("OR OK (number)");
665
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
666
+ try {
667
+ demo.testOR(true);
668
+ }
669
+ catch (X) {
670
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
671
+ console.log("OR Infringement OK");
672
+ console.log(X);
673
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
674
+ }
675
+ demo.testJSON_OP({ id: 1 });
676
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
677
+ console.log("JSON_OP OK");
678
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
679
+ try {
680
+ demo.testJSON_OP({ name: "missing id" });
681
+ }
682
+ catch (X) {
683
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
684
+ console.log("JSON_OP Infringement OK");
685
+ console.log(X);
686
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
687
+ }
688
+ demo.testJSON_Parse('{"key":"value"}');
689
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
690
+ console.log("JSON_Parse OK");
691
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
692
+ try {
693
+ demo.testJSON_Parse("not valid json{");
694
+ }
695
+ catch (X) {
696
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
697
+ console.log("JSON_Parse Infringement OK");
698
+ console.log(X);
699
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
700
+ }
701
+ demo.testZOD("hello");
702
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
703
+ console.log("ZOD OK");
704
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
705
+ try {
706
+ demo.testZOD(42);
707
+ }
708
+ catch (X) {
709
+ console.log("⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄⌄");
710
+ console.log("ZOD Infringement OK");
711
+ console.log(X);
712
+ console.log("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
713
+ }