|
1 | 1 | { |
2 | 2 | "$schema": "../../schemas/v0/tests.schema.json", |
3 | | - "scenario": "Math function", |
| 3 | + "scenario": "Offset function", |
4 | 4 | "description": "The built-in formatter and selector for addition and subtraction.", |
5 | 5 | "defaultTestProperties": { |
6 | 6 | "bidiIsolation": "none", |
7 | 7 | "locale": "en-US" |
8 | 8 | }, |
9 | 9 | "tests": [ |
10 | 10 | { |
11 | | - "src": "{:math add=13}", |
| 11 | + "src": "{:offset add=13}", |
12 | 12 | "expErrors": [{ "type": "bad-operand" }] |
13 | 13 | }, |
14 | 14 | { |
15 | | - "src": "{foo :math add=13}", |
| 15 | + "src": "{foo :offset add=13}", |
16 | 16 | "expErrors": [{ "type": "bad-operand" }] |
17 | 17 | }, |
18 | 18 | { |
19 | | - "src": "{42 :math}", |
| 19 | + "src": "{42 :offset}", |
20 | 20 | "expErrors": [{ "type": "bad-option" }] |
21 | 21 | }, |
22 | 22 | { |
23 | | - "src": "{42 :math add=foo}", |
| 23 | + "src": "{42 :offset add=foo}", |
24 | 24 | "expErrors": [{ "type": "bad-option" }] |
25 | 25 | }, |
26 | 26 | { |
27 | | - "src": "{42 :math subtract=foo}", |
| 27 | + "src": "{42 :offset subtract=foo}", |
28 | 28 | "expErrors": [{ "type": "bad-option" }] |
29 | 29 | }, |
30 | 30 | { |
31 | | - "src": "{42 :math foo=13}", |
| 31 | + "src": "{42 :offset foo=13}", |
32 | 32 | "expErrors": [{ "type": "bad-option" }] |
33 | 33 | }, |
34 | 34 | { |
35 | | - "src": "{42 :math add=13 subtract=13}", |
| 35 | + "src": "{42 :offset add=13 subtract=13}", |
36 | 36 | "expErrors": [{ "type": "bad-option" }] |
37 | 37 | }, |
38 | 38 | { |
39 | | - "src": "{41 :math add=1}", |
| 39 | + "src": "{41 :offset add=1}", |
40 | 40 | "exp": "42" |
41 | 41 | }, |
42 | 42 | { |
43 | | - "src": "{52 :math subtract=10}", |
| 43 | + "src": "{52 :offset subtract=10}", |
44 | 44 | "exp": "42" |
45 | 45 | }, |
46 | 46 | { |
47 | | - "src": "{41 :math add=1 foo=13}", |
| 47 | + "src": "{41 :offset add=1 foo=13}", |
48 | 48 | "exp": "42" |
49 | 49 | }, |
50 | 50 | { |
51 | | - "src": ".local $x = {41 :integer signDisplay=always} {{{$x :math add=1}}}", |
| 51 | + "src": ".local $x = {41 :integer signDisplay=always} {{{$x :offset add=1}}}", |
52 | 52 | "exp": "+42" |
53 | 53 | }, |
54 | 54 | { |
55 | | - "src": ".local $x = {52 :number signDisplay=always} {{{$x :math subtract=10}}}", |
| 55 | + "src": ".local $x = {52 :number signDisplay=always} {{{$x :offset subtract=10}}}", |
56 | 56 | "exp": "+42" |
57 | 57 | }, |
58 | 58 | { |
59 | | - "src": "{$x :math add=1}", |
| 59 | + "src": "{$x :offset add=1}", |
60 | 60 | "params": [{ "name": "x", "value": 41 }], |
61 | 61 | "exp": "42" |
62 | 62 | }, |
63 | 63 | { |
64 | | - "src": "{$x :math subtract=10}", |
| 64 | + "src": "{$x :offset subtract=10}", |
65 | 65 | "params": [{ "name": "x", "value": 52 }], |
66 | 66 | "exp": "42" |
67 | 67 | }, |
68 | 68 | { |
69 | | - "src": ".local $x = {1 :math add=1} .match $x 1 {{=1}} 2 {{=2}} * {{other}}", |
| 69 | + "src": ".local $x = {1 :offset add=1} .match $x 1 {{=1}} 2 {{=2}} * {{other}}", |
70 | 70 | "exp": "=2" |
71 | 71 | }, |
72 | 72 | { |
73 | | - "src": ".local $x = {10 :integer} .local $y = {$x :math subtract=6} .match $y 10 {{=10}} 4 {{=4}} * {{other}}", |
| 73 | + "src": ".local $x = {10 :integer} .local $y = {$x :offset subtract=6} .match $y 10 {{=10}} 4 {{=4}} * {{other}}", |
74 | 74 | "exp": "=4" |
75 | 75 | } |
76 | 76 | ] |
|
0 commit comments