functionalscript 0.0.424 → 0.0.425

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 (37) hide show
  1. package/com/cpp/test/build.cjs +1 -1
  2. package/com/cpp/{test.f.cjs → testlib.f.cjs} +1 -1
  3. package/com/cs/test/build.cjs +1 -1
  4. package/com/cs/{test.f.cjs → testlib.f.cjs} +1 -1
  5. package/com/rust/test.f.cjs +2 -4
  6. package/com/types/{test.f.cjs → testlib.f.cjs} +0 -0
  7. package/commonjs/build/test.f.cjs +2 -4
  8. package/commonjs/package/dependencies/test.f.cjs +1 -3
  9. package/commonjs/package/test.f.cjs +1 -5
  10. package/commonjs/path/test.f.cjs +158 -170
  11. package/commonjs/test.cjs +52 -61
  12. package/html/test.f.cjs +12 -13
  13. package/json/test.f.cjs +41 -37
  14. package/json/tokenizer/test.f.cjs +238 -296
  15. package/nodejs/version/test.f.cjs +1 -3
  16. package/package.json +1 -1
  17. package/sha2/test.f.cjs +37 -40
  18. package/text/test.f.cjs +1 -3
  19. package/text/utf16/test.f.cjs +96 -109
  20. package/text/utf8/test.f.cjs +116 -135
  21. package/types/array/test.f.cjs +84 -84
  22. package/types/btree/find/test.f.cjs +2 -2
  23. package/types/btree/remove/test.f.cjs +6 -3
  24. package/types/btree/set/test.f.cjs +372 -370
  25. package/types/btree/test.f.cjs +11 -7
  26. package/types/byteSet/module.f.cjs +2 -4
  27. package/types/byteSet/test.f.cjs +37 -40
  28. package/types/function/compare/module.f.cjs +1 -1
  29. package/types/function/compare/test.f.cjs +1 -3
  30. package/types/function/test.f.cjs +1 -3
  31. package/types/list/test.f.cjs +208 -219
  32. package/types/map/test.f.cjs +57 -57
  33. package/types/nibbleSet/test.f.cjs +37 -40
  34. package/types/number/test.f.cjs +24 -26
  35. package/types/object/test.f.cjs +12 -13
  36. package/types/option/test.f.cjs +1 -3
  37. package/types/range/test.f.cjs +1 -3
@@ -1,44 +1,41 @@
1
1
  const _ = require('./module.f.cjs')
2
2
 
3
- {
4
- if (_.has(0)(_.empty)) { throw _.empty }
5
- if (_.has(1)(_.empty)) { throw _.empty }
6
- if (_.has(15)(_.empty)) { throw _.empty }
7
- }
8
-
9
- {
10
- const s = _.set(0)(_.empty)
11
- if (s !== 1) { throw s }
12
- if (!_.has(0)(s)) { throw s }
13
- if (_.has(1)(s)) { throw s }
14
- if (_.has(15)(s)) { throw s }
15
- }
16
-
17
- {
18
- const s = _.set(15)(_.empty)
19
- if (s !== 32768) { throw s }
20
- if (_.has(0)(s)) { throw s }
21
- if (_.has(1)(s)) { throw s }
22
- if (!_.has(15)(s)) { throw s }
23
- }
24
-
25
- {
26
- const a = _.set(0)(_.empty)
27
- const result = _.unset(0)(a)
28
- if (result !== 0) { throw result }
29
- }
30
-
31
- {
32
- const a = _.set(15)(_.empty)
33
- const result = _.unset(15)(a)
34
- if (result !== 0) { throw result }
35
- }
36
-
37
- {
38
- const result = _.setRange([2, 5])(_.empty)
39
- if (result !== 60) { throw result }
40
- }
41
-
42
3
  module.exports = {
43
-
4
+ has: () => {
5
+ if (_.has(0)(_.empty)) { throw _.empty }
6
+ if (_.has(1)(_.empty)) { throw _.empty }
7
+ if (_.has(15)(_.empty)) { throw _.empty }
8
+ },
9
+ set: [
10
+ () => {
11
+ const s = _.set(0)(_.empty)
12
+ if(s !== 1) { throw s }
13
+ if(!_.has(0)(s)) { throw s }
14
+ if (_.has(1)(s)) { throw s }
15
+ if (_.has(15)(s)) { throw s }
16
+ },
17
+ () => {
18
+ const s = _.set(15)(_.empty)
19
+ if (s !== 32768) { throw s }
20
+ if (_.has(0)(s)) { throw s }
21
+ if (_.has(1)(s)) { throw s }
22
+ if (!_.has(15)(s)) { throw s }
23
+ }
24
+ ],
25
+ unset: () => [
26
+ () => {
27
+ const a = _.set(0)(_.empty)
28
+ const result = _.unset(0)(a)
29
+ if (result !== 0) { throw result }
30
+ },
31
+ () => {
32
+ const a = _.set(15)(_.empty)
33
+ const result = _.unset(15)(a)
34
+ if (result !== 0) { throw result }
35
+ }
36
+ ],
37
+ setRange: () => {
38
+ const result = _.setRange([2, 5])(_.empty)
39
+ if (result !== 60) { throw result }
40
+ }
44
41
  }
@@ -1,28 +1,26 @@
1
1
  const { sum, min, max, cmp } = require('./module.f.cjs')
2
2
 
3
- {
4
- const result = sum([2, 3, 4, 5])
5
- if (result !== 14) { throw result }
6
- }
7
-
8
- {
9
- const result = min([])
10
- if (result !== undefined) { throw result }
11
- }
12
-
13
- {
14
- const result = min([1, 2, 12, -4, 8])
15
- if (result !== -4) { throw result }
16
- }
17
-
18
- {
19
- const result = max([1, 2, 12, -4, 8])
20
- if (result !== 12) { throw result }
21
- }
22
-
23
- {
24
- const result = cmp(4)(5)
25
- if (result !== -1) { throw result }
26
- }
27
-
28
- module.exports = {}
3
+ module.exports = {
4
+ sum: () => {
5
+ const result = sum([2, 3, 4, 5])
6
+ if (result !== 14) { throw result }
7
+ },
8
+ min: {
9
+ empty: () => {
10
+ const result = min([])
11
+ if (result !== undefined) { throw result }
12
+ },
13
+ multi: () => {
14
+ const result = min([1, 2, 12, -4, 8])
15
+ if (result !== -4) { throw result }
16
+ }
17
+ },
18
+ max: () => {
19
+ const result = max([1, 2, 12, -4, 8])
20
+ if (result !== 12) { throw result }
21
+ },
22
+ cmp: () => {
23
+ const result = cmp(4)(5)
24
+ if (result !== -1) { throw result }
25
+ }
26
+ }
@@ -1,15 +1,14 @@
1
1
  const _ = require('./module.f.cjs')
2
2
 
3
- {
4
- const a = {}
5
- const value = _.at('constructor')(a)
6
- if (value !== undefined) { throw value }
7
- }
8
-
9
- {
10
- const a = { constructor: 42}
11
- const value = _.at('constructor')(a)
12
- if (value !== 42) { throw value }
13
- }
14
-
15
- module.exports = {}
3
+ module.exports = {
4
+ ctor: () => {
5
+ const a = {}
6
+ const value = _.at('constructor')(a)
7
+ if (value !== undefined) { throw value }
8
+ },
9
+ property: () => {
10
+ const a = { constructor: 42 }
11
+ const value = _.at('constructor')(a)
12
+ if (value !== 42) { throw value }
13
+ }
14
+ }
@@ -1,11 +1,9 @@
1
1
  const _ = require('./module.f.cjs')
2
2
 
3
- {
3
+ module.exports = () => {
4
4
  const optionSq = _.map(v => v * v)
5
5
  const sq3 = optionSq(3)
6
6
  if (sq3 !== 9) { throw sq3 }
7
7
  const sqUndefined = optionSq(undefined)
8
8
  if (sqUndefined !== undefined) { throw sqUndefined }
9
9
  }
10
-
11
- module.exports = {}
@@ -1,11 +1,9 @@
1
1
  const _ = require('./module.f.cjs')
2
2
 
3
- {
3
+ module.exports = () => {
4
4
  if (!_.contains([0, 5])(1)) { throw 1 }
5
5
  if (!_.contains([0, 5])(0)) { throw 0 }
6
6
  if (!_.contains([0, 5])(5)) { throw 5 }
7
7
  if (_.contains([0, 5])(-1)) { throw -1 }
8
8
  if (_.contains([0, 5])(6)) { throw 6 }
9
9
  }
10
-
11
- module.exports = {}