Skip to content

Commit 13b3c22

Browse files
Fix warnings under @deprecated (#2)
1 parent c8c6e8c commit 13b3c22

File tree

3 files changed

+24
-15
lines changed

3 files changed

+24
-15
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@
22
_build
33
target
44
.mooncakes/
5-
.moonagent/
5+
.moonagent/
6+
7+
_build/
8+
target/

jsondiff_wbtest.mbt

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
test "test scalar" {
33
assert_eq(JsonDiff::diff(42, 42).diff, None)
44
assert_eq(JsonDiff::diff("foo", "foo").diff, None)
5-
@json.inspect(JsonDiff::diff(42, 10).diff, content=[
5+
json_inspect(JsonDiff::diff(42, 10).diff, content=[
66
{ "__old": 42, "__new": 10 },
77
])
88
}
@@ -16,7 +16,7 @@ test "test objects" {
1616
)
1717
let old : Json = { "foo": 42, "bar": { "bbbar": 10, "bbboz": 11 } }
1818
let new : Json = { "foo": 42, "bar": { "bbbar": 12 } }
19-
@json.inspect(JsonDiff::diff(old, new).diff, content=[
19+
json_inspect(JsonDiff::diff(old, new).diff, content=[
2020
{ "bar": { "bbboz__deleted": 11, "bbbar": { "__old": 10, "__new": 12 } } },
2121
])
2222
inspect(
@@ -72,7 +72,7 @@ test "array of objects" {
7272
)
7373
let old : Json = [{ "foo": 10 }, { "foo": 20 }, { "foo": 30 }]
7474
let new : Json = [{ "foo": 10 }, { "foo": 30 }]
75-
@json.inspect(JsonDiff::diff(old, new).diff, content=[
75+
json_inspect(JsonDiff::diff(old, new).diff, content=[
7676
[[" "], ["-", { "foo": 20 }], [" "]],
7777
])
7878
inspect(
@@ -89,7 +89,7 @@ test "array of objects" {
8989
)
9090
let old : Json = [{ "foo": 10 }, { "foo": 30 }]
9191
let new : Json = [{ "foo": 10 }, { "foo": 20 }, { "foo": 30 }]
92-
@json.inspect(JsonDiff::diff(old, new).diff, content=[
92+
json_inspect(JsonDiff::diff(old, new).diff, content=[
9393
[[" "], ["+", { "foo": 20 }], [" "]],
9494
])
9595
inspect(
@@ -110,7 +110,7 @@ test "array of objects" {
110110
{ "name": "Foo", "a": 3, "b": 1, "c": 1 },
111111
{ "foo": 10 },
112112
]
113-
@json.inspect(JsonDiff::diff(old, new).diff, content=[
113+
json_inspect(JsonDiff::diff(old, new).diff, content=[
114114
[[" "], ["+", { "name": "Foo", "a": 3, "b": 1, "c": 1 }], [" "]],
115115
])
116116
inspect(
@@ -138,7 +138,7 @@ test "array of objects" {
138138
{ "foo": 21, "bar": { "bbbar": 50, "bbboz": 25 } },
139139
{ "foo": 30, "bar": { "bbbar": 92, "bbboz": 34 } },
140140
]
141-
@json.inspect(JsonDiff::diff(old, new).diff, content=[
141+
json_inspect(JsonDiff::diff(old, new).diff, content=[
142142
[[" "], ["~", { "foo": { "__old": 20, "__new": 21 } }], [" "]],
143143
])
144144
inspect(
@@ -175,11 +175,11 @@ test "scalar keys" {
175175
).diff,
176176
None,
177177
)
178-
@json.inspect(
178+
json_inspect(
179179
JsonDiff::diff({ "foo": 42, "bar": 10 }, { "bar": 10 }, keys_only=true).diff,
180180
content=[{ "foo__deleted": 42 }],
181181
)
182-
@json.inspect(
182+
json_inspect(
183183
JsonDiff::diff({ "bar": 10 }, { "foo": 42, "bar": 10 }, keys_only=true).diff,
184184
content=[{ "foo__added": 42 }],
185185
)
@@ -195,7 +195,7 @@ test "scalar keys" {
195195
).diff,
196196
None,
197197
)
198-
@json.inspect(
198+
json_inspect(
199199
JsonDiff::diff(
200200
{ "foo": 42, "bar": { "bbbar": 10, "bbboz": 11 } },
201201
{ "foo": 42, "bar": { "bbbar": 12 } },
@@ -215,13 +215,13 @@ test "array of scalar keys" {
215215
JsonDiff::diff([10, 20, 30], [10, 42, 30], keys_only=true).diff,
216216
None,
217217
)
218-
@json.inspect(JsonDiff::diff([10, 20, 30], [10, 30], keys_only=true).diff, content=[
218+
json_inspect(JsonDiff::diff([10, 20, 30], [10, 30], keys_only=true).diff, content=[
219219
[[" ", 10], ["-", 20], [" ", 30]],
220220
])
221-
@json.inspect(JsonDiff::diff([10, 30], [10, 20, 30], keys_only=true).diff, content=[
221+
json_inspect(JsonDiff::diff([10, 30], [10, 20, 30], keys_only=true).diff, content=[
222222
[[" ", 10], ["+", 20], [" ", 30]],
223223
])
224-
@json.inspect(JsonDiff::diff([10, 20], [10, 20, 30], keys_only=true).diff, content=[
224+
json_inspect(JsonDiff::diff([10, 20], [10, 20, 30], keys_only=true).diff, content=[
225225
[[" ", 10], [" ", 20], ["+", 30]],
226226
])
227227
}
@@ -246,7 +246,7 @@ test "array of object keys" {
246246
).diff,
247247
None,
248248
)
249-
@json.inspect(
249+
json_inspect(
250250
JsonDiff::diff(
251251
[{ "foo": 10 }, { "foo": 30 }],
252252
[{ "foo": 10 }, { "foo": 20 }, { "foo": 30 }],

moon.pkg.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1-
{}
1+
{
2+
"import": [
3+
"moonbitlang/core/cmp",
4+
"moonbitlang/core/double",
5+
"moonbitlang/core/hashmap"
6+
]
7+
}

0 commit comments

Comments
 (0)